the bitrig marco_vmm branch has been updated by marco with 30 new commits: commit 9b87353b23bf10841cea4286920d5ca35df3290f diff: https://github.com/bitrig/bitrig/commit/9b87353 author: mlarkin <[email protected]> date: Thu Dec 24 09:40:27 2015 +0000
Normalize return values from various exit functions. Another diff from Stefan Kempf <sn.kempf at t-online.de>. M sys/arch/amd64/amd64/vmm.c commit 0e37c99c637edda95e6e3babe493f0fa945df199 diff: https://github.com/bitrig/bitrig/commit/0e37c99 author: mlarkin <[email protected]> date: Thu Dec 24 09:26:45 2015 +0000 Make sure we don't overflow a page during vm_readpage/vm_writepage. Noticed over a month ago by Stefan Kempf <sn.kempf at t-online.de>, and I shamefully just got around to committing it. Thanks Stefan. M sys/arch/amd64/amd64/vmm.c commit 20922ceaa7f97fe5269471e972440e4db3a1f70a diff: https://github.com/bitrig/bitrig/commit/20922ce author: mlarkin <[email protected]> date: Thu Dec 17 09:29:28 2015 +0000 Move vcpu register state init to vmd. Allows vmd bootloader to make the decision as to how the vcpu should be set up for initial start and reset. Also removes some hardcoded register constants from vmm(4). ok jsing@, mpi@ M sys/arch/amd64/amd64/vmm.c M sys/arch/amd64/include/vmmvar.h M usr.sbin/vmd/loadfile.h M usr.sbin/vmd/loadfile_elf.c M usr.sbin/vmd/vmm.c commit a443d30fbec6f2d592eaffda16af6ada9afa98f8 diff: https://github.com/bitrig/bitrig/commit/a443d30 author: mlarkin <[email protected]> date: Tue Dec 15 03:24:26 2015 +0000 remove some not interesting debug printfs M sys/arch/amd64/amd64/vmm.c commit 0c872351555f24d0d71af1be1d9d1d11c5fc11e5 diff: https://github.com/bitrig/bitrig/commit/0c87235 author: mlarkin <[email protected]> date: Tue Dec 15 02:18:34 2015 +0000 if a vcpu run thread in vmd exits unexpectedly, teardown the VM's kernel components as well. ok deraadt@ M usr.sbin/vmd/vmm.c commit 27f549edf86685fdc313ad3e26f1a818d05dec11 diff: https://github.com/bitrig/bitrig/commit/27f549e author: mlarkin <[email protected]> date: Tue Dec 15 01:56:51 2015 +0000 support reset vcpu by triple fault (kernel part, userland fix will come later). discussed with deraadt@ and reyk@ at length. M sys/arch/amd64/amd64/vmm.c M sys/arch/amd64/include/vmmvar.h commit 6d1b8feaac7ed47bf5cb5346b6cc08d09d14b47d diff: https://github.com/bitrig/bitrig/commit/6d1b8fe author: mlarkin <[email protected]> date: Mon Dec 14 07:46:03 2015 +0000 Support only one vcpu for now, until we implement SMP support. M sys/arch/amd64/amd64/vmm.c commit 877faab1312b4c641e1a5effb7db015326413c24 diff: https://github.com/bitrig/bitrig/commit/877faab author: mlarkin <[email protected]> date: Mon Dec 14 06:59:07 2015 +0000 track used memory in each VM. This is passed back to vmctl status. ok reyk@, beck@, mpi@ M sys/arch/amd64/amd64/vmm.c M sys/arch/amd64/include/vmmvar.h M usr.sbin/vmctl/vmctl.c commit 1d84be47993d40d437c530ef830526d8fda56612 diff: https://github.com/bitrig/bitrig/commit/1d84be4 author: deraadt <[email protected]> date: Wed Dec 9 02:29:09 2015 +0000 successful vmm enter/leave does not need to be reported ok mlarkin M sys/arch/amd64/amd64/vmm.c commit 3c47fbe3fa2523bed9063126287878372465be28 diff: https://github.com/bitrig/bitrig/commit/3c47fbe author: mlarkin <[email protected]> date: Sun Dec 6 20:12:15 2015 +0000 add function prototype M sys/arch/amd64/amd64/vmm.c commit 86e4d1f68d37d61a6d0f79c9d0921ce784c04634 diff: https://github.com/bitrig/bitrig/commit/86e4d1f author: mlarkin <[email protected]> date: Sun Dec 6 20:04:25 2015 +0000 move around some deck chairs in preparation for supporting VM reboot. this diff moves the cpu register init code into its own function which will soon be called from vmd to reset processor state. no functional change with this diff. M sys/arch/amd64/amd64/vmm.c commit eb62f43fa9412f6d1f02ed72e115effee12e105b diff: https://github.com/bitrig/bitrig/commit/eb62f43 author: mlarkin <[email protected]> date: Sun Dec 6 18:42:18 2015 +0000 Don't bother printing out the count of what type of cpu we have. Instead just print the feature being used (eg, VMX/EPT). suggested by and ok deraadt@ M sys/arch/amd64/amd64/vmm.c commit 4697169ad01dfc882c07ee35a0859e55ce0c502d diff: https://github.com/bitrig/bitrig/commit/4697169 author: mlarkin <[email protected]> date: Sun Dec 6 18:31:26 2015 +0000 don't allow opening of /dev/vmm if we are in an unsupported configuration or if vmm0 didn't attach, prevents later panics if we try to use vmm in such a state. reported by many on tech/misc M sys/arch/amd64/amd64/vmm.c commit 7de326a461c16cd9e5803533700e94468506b692 diff: https://github.com/bitrig/bitrig/commit/7de326a author: mlarkin <[email protected]> date: Sun Dec 6 01:16:58 2015 +0000 restore VMM mode after resume from suspend/hibernate M sys/arch/amd64/amd64/cpu.c M sys/arch/amd64/amd64/vmm.c commit 4669643b3ffef9f8098a0399e0ef42f3541cb82b diff: https://github.com/bitrig/bitrig/commit/4669643 author: mpi <[email protected]> date: Tue Dec 1 12:03:55 2015 +0000 Pass M_NOWAIT when allocating a temporary page in vm_writepage() to be coherent with the rest of the allocations. While here report the correct errno if an allocation fails. ok mlarkin@ M sys/arch/amd64/amd64/vmm.c commit b3d1692b90e7646b61a69c4e872d46cab1b9e25e diff: https://github.com/bitrig/bitrig/commit/b3d1692 author: mpi <[email protected]> date: Tue Dec 1 12:01:38 2015 +0000 Instead of using a supplementary variable to check if we found a VCPU or a VM in an iteration, check against NULL. ok mlarkin@ M sys/arch/amd64/amd64/vmm.c commit 21f25ddafb2e3c26e9aebca533818aded2616cb2 diff: https://github.com/bitrig/bitrig/commit/21f25dd author: mpi <[email protected]> date: Tue Dec 1 10:18:35 2015 +0000 Do not wait when allocating a page in vcpu_init(). Should help with the possible hang when trying to create a VM when the host is out of memory. It also improves coherency as all the allocations in vmm(4) are done without sleeping. ok mlarkin@ M sys/arch/amd64/amd64/vmm.c commit e1f889241d0f0e38dbd7d378425ddca0d37e3965 diff: https://github.com/bitrig/bitrig/commit/e1f8892 author: mpi <[email protected]> date: Tue Dec 1 10:14:05 2015 +0000 KNF ok mlarkin@ M sys/arch/amd64/amd64/vmm.c commit 5afa98caba2476dacc5b4ef1a4331e89b4679cf8 diff: https://github.com/bitrig/bitrig/commit/5afa98c author: mpi <[email protected]> date: Tue Dec 1 10:12:15 2015 +0000 Prettify dmesg output. ok reyk@, mlarkin@ M sys/arch/amd64/amd64/vmm.c commit 9a5169fea2a7b4d857d4390d3322edd5f4dd7c40 diff: https://github.com/bitrig/bitrig/commit/9a5169f author: mpi <[email protected]> date: Tue Dec 1 10:08:10 2015 +0000 Properly disable SVM until its support is added back. Should prevent a NULL dereference when initializing VM. ok mlarkin@ M sys/arch/amd64/amd64/vmm.c commit de136db05d6b6d0c544f5aaecd3411f8b8772dd6 diff: https://github.com/bitrig/bitrig/commit/de136db author: jsg <[email protected]> date: Thu Nov 26 08:32:09 2015 +0000 init pat_default to 0 as it may potentially be used uninitialised ok mlarkin@ M sys/arch/amd64/amd64/vmm.c commit 9ab63b75cebd9c8e96d55534f726deb4676bfe2e diff: https://github.com/bitrig/bitrig/commit/9ab63b7 author: reyk <[email protected]> date: Fri Dec 11 10:16:53 2015 +0000 The vmctl "id" argument can now be a number of or a vm name, eg. vmctl stop 3 vmctl stop "openbsd.vm" M usr.sbin/vmctl/main.c M usr.sbin/vmctl/vmctl.8 M usr.sbin/vmctl/vmctl.c M usr.sbin/vmctl/vmctl.h M usr.sbin/vmd/vmd.c M usr.sbin/vmd/vmd.h commit 11544c533177dfc06d65d0e0c3ace4b8b142da07 diff: https://github.com/bitrig/bitrig/commit/11544c5 author: reyk <[email protected]> date: Fri Dec 11 09:24:10 2015 +0000 Remove unused argument in parse_vmid() M usr.sbin/vmctl/main.c M usr.sbin/vmctl/vmctl.h commit 783e3c507509954400018c0768c5f2639be64317 diff: https://github.com/bitrig/bitrig/commit/783e3c5 author: reyk <[email protected]> date: Fri Dec 11 09:08:05 2015 +0000 Allow to specify relative pathnames on the command line (eg. -k ./bsd). M usr.sbin/vmctl/main.c commit ba0e046f20ab87e137b69b65f2a2a16d9a7e85a1 diff: https://github.com/bitrig/bitrig/commit/ba0e046 author: reyk <[email protected]> date: Tue Dec 8 13:15:09 2015 +0000 style(9) says that is OK to not include sys/cdefs.h directly, as it comes from sys/types.h (include-what-you-use doesn't know this policy). Pointed out by Jan Schreiber M usr.sbin/vmctl/main.c commit 1f91af16cb79b5f9365bbd0bb43987fa14619a14 diff: https://github.com/bitrig/bitrig/commit/1f91af1 author: reyk <[email protected]> date: Tue Dec 8 08:02:15 2015 +0000 vmctl console - id is not optional M usr.sbin/vmctl/main.c commit 0aa4330948542062996ffe28c0cef90633dcba84 diff: https://github.com/bitrig/bitrig/commit/0aa4330 author: reyk <[email protected]> date: Tue Dec 8 08:01:20 2015 +0000 Add "vmctl console" to connect to a specified VM console by id. Requested by mlarkin@ M usr.sbin/vmctl/main.c M usr.sbin/vmctl/vmctl.8 M usr.sbin/vmctl/vmctl.c M usr.sbin/vmctl/vmctl.h commit 4ddc778b276c2e41429e66522fd2790f859ccdbf diff: https://github.com/bitrig/bitrig/commit/4ddc778 author: deraadt <[email protected]> date: Mon Dec 7 18:23:24 2015 +0000 use O_EXCL rather than a race M usr.sbin/vmctl/vmctl.c commit eb2af0ca90dcc67015ecbc7f8f6e61a8ffa26080 diff: https://github.com/bitrig/bitrig/commit/eb2af0c author: reyk <[email protected]> date: Sun Dec 6 02:26:14 2015 +0000 Print the TTY in the vmctl status output. M usr.sbin/vmctl/vmctl.c M usr.sbin/vmd/vmd.c M usr.sbin/vmd/vmd.h commit 3cf37621708ff5105415302adbe1f02177b54441 diff: https://github.com/bitrig/bitrig/commit/3cf3762 author: reyk <[email protected]> date: Sun Dec 6 01:58:21 2015 +0000 When a new vm is created with VMM_IOC_CREATE, the kernel assigns a unique id to it. This happens in the vm child process and has to be communicated to the parent processes to track the vm. Knowing the vm id in the parent and vmm processes also allows to remove vm from the daemons list on terminate requests later. M usr.sbin/vmctl/vmctl.c M usr.sbin/vmd/vmd.c
