the bitrig marco_vmm branch has been updated by marco with 36 new commits:

commit 8a9be2ba5cf4bb62d203e95b9b82e1c949357c17
diff: https://github.com/bitrig/bitrig/commit/8a9be2b
author: mlarkin <[email protected]>
date: Sat Feb 20 20:49:08 2016 +0000


Add "interrupt pending on vcpu" ioctl to vmm. Needed for upcoming interrupt
controller work in vmd(8).

ok stefan@, mpi@

M       sys/arch/amd64/amd64/vmm.c
M       sys/arch/amd64/include/vmmvar.h

commit 8d5a2d8aa9cd547109f8e9064204a210efb64fa7
diff: https://github.com/bitrig/bitrig/commit/8d5a2d8
author: stefan <[email protected]>
date: Tue Feb 16 19:00:16 2016 +0000

Pass down the initial value of CR0 down to the RESETCPU ioctl() as well.
This gives us the opportunity later to start VCPUs in real-mode, etc.
(for those CPUs that support unrestricted guest).

You need to build an updated kernel for this first, the ioctl interface
has changed.

ok mlarkin@, deraadt@

M       usr.sbin/vmd/vmm.c

commit d6b5b572276cd362eaffb0fb233079ba02afac9c
diff: https://github.com/bitrig/bitrig/commit/d6b5b57
author: stefan <[email protected]>
date: Tue Feb 16 18:59:30 2016 +0000

Allow userland to initialize CR0 when resetting a VCPU instead of
hardcoding it. Be careful to obey VMX's must-be-0 and must-be-1
restrictions for CR0.
This gives us the opportunity later to start VCPUs in real-mode, etc.
(for those CPUs that support unrestricted guest).

Be sure to update your vmd(8) also, the ioctl interface has
changed.

ok mlarkin@, deraadt@

M       sys/arch/amd64/amd64/vmm.c
M       sys/arch/amd64/include/vmmvar.h

commit b0898c83add2c01f0393747553e7c075ff56d95d
diff: https://github.com/bitrig/bitrig/commit/b0898c8
author: stefan <[email protected]>
date: Mon Feb 8 18:23:04 2016 +0000

Set EPT bits of guest pages in pmap_enter instead of doing it
after an uvm_fault: uvm_fault maps in neighboring pages of
the faulting page. We want EPT bits set for those as soon as
possible as well. This avoids additional EPT violations
causing further uvm_faults when the guest accesses the
neighboring pages.

discussion with and ok mlarkin@

M       sys/arch/amd64/amd64/pmap.c
M       sys/arch/amd64/amd64/vmm.c
M       sys/arch/amd64/include/pmap.h

commit 0370feaa99b97214d5f2c8fb7646249182b831cd
diff: https://github.com/bitrig/bitrig/commit/0370fea
author: jsg <[email protected]>
date: Sun Feb 7 10:17:19 2016 +0000

avoid a double free in an error path
ok stefan@

M       usr.sbin/vmd/virtio.c

commit c7b125286c539e51e7dd1ba1bcc2fb3ebd091112
diff: https://github.com/bitrig/bitrig/commit/c7b1252
author: reyk <[email protected]>
date: Fri Feb 5 11:40:15 2016 +0000

Fix a possible use-after-free in vmd, forward the result to the
control socket before free'ing the vm.

Found by and OK jsg@

M       usr.sbin/vmd/vmd.c

commit bd0183f18c88e3416da2e3cda9aec9970eccfde8
diff: https://github.com/bitrig/bitrig/commit/bd0183f
author: jsg <[email protected]>
date: Fri Jan 29 00:47:51 2016 +0000

Move a pool_put() to avoid a use after free.
ok mlarkin@ stefan@

M       sys/arch/amd64/amd64/vmm.c

commit 0f1639579a0a5b339eb844e9d90adf7857776fc2
diff: https://github.com/bitrig/bitrig/commit/0f16395
author: reyk <[email protected]>
date: Tue Jan 26 07:58:35 2016 +0000

lseek() + write() can be replaced by a slightly shorter ftruncate()
call. Note that using ftruncate() to extend a file is not portable
(POSIX allows either zero-filling until the given size is reached, or
alternatively erroring out), but that shouldn't be a proble as vmm(4)
isn't cross-platform either.  unlink() the image file when extending
it fails for consistency with the other error case (the file can't be
created).

>From Martin Natano
OK mlarkin@

M       usr.sbin/vmctl/vmctl.c

commit 28af333fa7b6c75af6c7b37076539753e7b69c38
diff: https://github.com/bitrig/bitrig/commit/28af333
author: reyk <[email protected]>
date: Tue Jan 26 07:55:47 2016 +0000

The division "res->size /= 1024 / 1024" is a no-op: 1024 / 1024 is
evaluated first, resulting in res->size /= 1.  Remove the division and
the following check, as it can never fail; it is a left-over from
previous code that didn't check the size in the caller.

>From Martin Natano
OK mlarkin@

M       usr.sbin/vmctl/main.c

commit f87165943ac0067d3d90b3a0b2c5587667da0b74
diff: https://github.com/bitrig/bitrig/commit/f871659
author: jsg <[email protected]>
date: Mon Jan 25 12:44:16 2016 +0000

Zero when malloc'ing a buffer to be copyed out to userland to avoid
an information leak when not all of the buffer is written to.

ok mlarkin@

M       sys/arch/amd64/amd64/vmm.c

commit 24e49cd5e824aaaacc41925d834547e7b74f8b78
diff: https://github.com/bitrig/bitrig/commit/24e49cd
author: stefan <[email protected]>
date: Sat Jan 16 08:55:40 2016 +0000

vmd(8) sometimes attempts page-crossing data copies between the host
and guest. The readpage/writepage ioctls of vmm(4) do not support this
and they return EINVAL on such attempts since recently.

Avoid page-crossing guest memory accesses by changing read_page() and
write_page() into read_mem() and write_mem() that can copy arbitrary
lengths of data between host<->guest without page-crossing accesses.

This also allows us to remove page-wise copy-loops in a few places.

ok mlarkin@

M       usr.sbin/vmd/loadfile_elf.c
M       usr.sbin/vmd/virtio.c
M       usr.sbin/vmd/vmd.h
M       usr.sbin/vmd/vmm.c

commit ade6280390fb1adf184c1f799a2b2aa3d84e770c
diff: https://github.com/bitrig/bitrig/commit/ade6280
author: mlarkin <[email protected]>
date: Thu Jan 14 02:46:40 2016 +0000


stdio.h is not needed here anymore.

M       usr.sbin/vmd/pci.c
M       usr.sbin/vmd/virtio.c

commit a88d0cd6b158fdc369e036818ce743a31fdf64a7
diff: https://github.com/bitrig/bitrig/commit/a88d0cd
author: reyk <[email protected]>
date: Wed Jan 13 13:08:20 2016 +0000

Update the comments in vmctl.c that are describing function arguments.

M       usr.sbin/vmctl/vmctl.c

commit 7fcbf60b2028bb64c7763c014a50ae5657791b36
diff: https://github.com/bitrig/bitrig/commit/7fcbf60
author: reyk <[email protected]>
date: Wed Jan 13 12:55:18 2016 +0000

Update the comment that is decribing terminate_vm()'s arguments,
sort the description of arguments for init_emulated_hw().

Pointed out my mlarkin

M       usr.sbin/vmd/vmm.c

commit 7a64fb3ce889a75c82401549c997cbe9b9c00816
diff: https://github.com/bitrig/bitrig/commit/7a64fb3
author: stefan <[email protected]>
date: Sun Jan 10 18:18:25 2016 +0000

Page fault handling tweaks for vmm:
- compute fault reason for uvm_fault() (e.g. page not present,
  protection violation) instead of passing a protection code
- a page does not need to be zero'd after faulting it in. uvm_fault() does
  that for fresh anon pages already, and we also do not want a page that
  is swapped back in have its contents wiped.

ok mlarkin@

M       sys/arch/amd64/amd64/vmm.c
M       sys/arch/amd64/include/specialreg.h

commit 4c056c9b3eefd1c688d1249aebb55ff599c68216
diff: https://github.com/bitrig/bitrig/commit/4c056c9
author: jsg <[email protected]>
date: Sun Jan 10 10:01:07 2016 +0000

remove a duplicate break statement

M       usr.sbin/vmd/control.c

commit ac6f53c8168c6a9d401839dd8bd5a8dbf95972ba
diff: https://github.com/bitrig/bitrig/commit/ac6f53c
author: reyk <[email protected]>
date: Fri Jan 8 11:20:58 2016 +0000

Add "vmm" pledge to allow restricted ioctl access to /dev/vmm.

This will allow to pledge vmd(8)'s vmm and vm processes, so that VMs
themselves run "sandboxed", including their host-side virtio layer.
It will remain disabled for now (in userland) to not get into the way
of ongoing development and upcoming changes in vmd and the ioctl
interface.

OK mlarkin@ deraadt@ "kernel side in, but not the callers in userland"

M       sys/arch/amd64/amd64/conf.c
M       sys/arch/amd64/amd64/vmm.c
M       sys/arch/amd64/include/conf.h
A       sys/kern/kern_pledge.c
A       sys/sys/pledge.h

commit d0fbce8bbe1193a26389068dc9db629d0721711e
diff: https://github.com/bitrig/bitrig/commit/d0fbce8
author: reyk <[email protected]>
date: Fri Jan 8 11:28:05 2016 +0000

Keep the pledge of the vmm and vm processes disabled for now as long
as there is some more expected progress in the kernel interface.  It
can be tested, and should work, with the previous kernel commit of the
"vmm" pledge, but is not called.

M       usr.sbin/vmd/vmm.c

commit b864803285f170537d39e72959e2d7fb8ef63d19
diff: https://github.com/bitrig/bitrig/commit/b864803
author: stefan <[email protected]>
date: Fri Jan 8 08:12:21 2016 +0000

Must set MAX_PORTS to 65536, since we assign to
ioports_map[VMM_PCI_IO_BAR_END (= 65535)]. Fixes an off-by-one.

ok mlarkin@, reyk@

M       usr.sbin/vmd/vmm.c

commit 98466f330023f459b77210cb0ba35d60572b6436
diff: https://github.com/bitrig/bitrig/commit/98466f3
author: semarie <[email protected]>
date: Tue Jan 5 16:25:34 2016 +0000

don't use the second argument of pledge(2) as the whitelist is not stabilized
for now.

ok reyk@

M       usr.sbin/vmctl/main.c

commit d85c15230e8660b08673d62bc2fb011624f69f09
diff: https://github.com/bitrig/bitrig/commit/d85c152
author: mlarkin <[email protected]>
date: Tue Jan 5 06:55:28 2016 +0000


Make some things static that are only used in loadfile_elf.c

diff from Michal Mazurek, thanks!

M       usr.sbin/vmd/loadfile_elf.c

commit fe9242c8505e3e1b797e111dcc6ba211b01c72e1
diff: https://github.com/bitrig/bitrig/commit/fe9242c
author: mlarkin <[email protected]>
date: Tue Jan 5 06:54:03 2016 +0000


Fail fast if elf64_exec fails. No need to populate the bootargs/stack
and gdt pages if we couldn't load the kernel.

diff from Michal Mazurek, thanks!

M       usr.sbin/vmd/loadfile_elf.c

commit aa63c79c62c5c4562226ea0b9265ef441e3c6f39
diff: https://github.com/bitrig/bitrig/commit/aa63c79
author: mlarkin <[email protected]>
date: Tue Jan 5 06:51:54 2016 +0000


more bzero -> memset conversions

from Michal Mazurek, thanks!

M       usr.sbin/vmd/loadfile_elf.c

commit a5ee3d4fb3a6bb8b2cd9c8fa7db9629078045f38
diff: https://github.com/bitrig/bitrig/commit/a5ee3d4
author: mlarkin <[email protected]>
date: Mon Jan 4 07:27:24 2016 +0000


Use an bitmap of handler function pointers to track I/O device to handler
function mappings. First step in reworking device support in vmd to better
handle interrupts.

M       usr.sbin/vmd/vmm.c

commit 420af6715243c61be18c29105e8eb1a895126514
diff: https://github.com/bitrig/bitrig/commit/420af67
author: mlarkin <[email protected]>
date: Mon Jan 4 02:07:28 2016 +0000


bzero -> memset for consistency

M       usr.sbin/vmd/pci.c
M       usr.sbin/vmd/virtio.c
M       usr.sbin/vmd/vmm.c

commit 16317c2af2f5f5f5e190459babd40750c765147a
diff: https://github.com/bitrig/bitrig/commit/16317c2
author: mlarkin <[email protected]>
date: Mon Jan 4 01:35:56 2016 +0000


Do proper termination of VMs by doing proper VCPU run state management.

This should fix some of the odd termination errors people have been seeing
(vmctl status showing running VMs after they have exited/crashed, and
invalid instruction panics on vmptrld during certain races)

This diff also implements dropping the biglock when running a VCPU, and
reacquiring the lock as needed based on the type of exit (normal vs.
external interrupt)

diff supplied by Stefan Kempf <sn.kempf at t-online.de>, many thanks!

M       sys/arch/amd64/amd64/vmm.c
M       sys/arch/amd64/include/vmmvar.h

commit 044128fc863fbe06f6a4937699d8f08814e0edb2
diff: https://github.com/bitrig/bitrig/commit/044128f
author: mlarkin <[email protected]>
date: Sun Jan 3 23:03:30 2016 +0000


Clarify vmctl console operation.

>From Michal Mazurek, thanks!

M       usr.sbin/vmctl/vmctl.8

commit ee404512096f8030c2aa2e87f4928ac583dc64b8
diff: https://github.com/bitrig/bitrig/commit/ee40451
author: mlarkin <[email protected]>
date: Sun Jan 3 22:36:09 2016 +0000


Add a cleanup block, fix a couple of memory leaks, fix a typo and a bit
of KNF.

Submitted by Michal Mazurek, thanks!

M       usr.sbin/vmd/virtio.c

commit b0cd176a8302ef4b0584ae5866cb4b6646c8e15b
diff: https://github.com/bitrig/bitrig/commit/b0cd176
author: benno <[email protected]>
date: Sat Jan 2 15:05:21 2016 +0000

fix typo in comment, found by Michal Mazurek, thanks

M       usr.sbin/vmd/vmd.h

commit 86a42c9b19d5dbd45b18822eb0913d1b6b77daf4
diff: https://github.com/bitrig/bitrig/commit/86a42c9
author: mlarkin <[email protected]>
date: Mon Nov 9 00:38:22 2015 +0000


regen

M       sys/dev/pci/pcidevs.h
M       sys/dev/pci/pcidevs_data.h

commit be5e77ada7741236b42d8e397c6220c36c48a7a0
diff: https://github.com/bitrig/bitrig/commit/be5e77a
author: mlarkin <[email protected]>
date: Mon Nov 9 00:37:44 2015 +0000


Allocate a currently unused vendor ID for our vmm's pchb.

discussed with deraadt

M       sys/dev/pci/pcidevs

commit 361cdb6a9f088fc30fe45f1f848d465d8e68a69c
diff: https://github.com/bitrig/bitrig/commit/361cdb6
author: jsg <[email protected]>
date: Mon Nov 2 04:44:09 2015 +0000

regen

M       sys/dev/pci/pcidevs.h
M       sys/dev/pci/pcidevs_data.h

commit 302a45094a914431e4bb9d514bc4a5b6ecfe6783
diff: https://github.com/bitrig/bitrig/commit/302a450
author: jsg <[email protected]>
date: Mon Nov 2 04:43:24 2015 +0000

add some "Broadwell H" ids and another asmedia xhci

M       sys/dev/pci/pcidevs

commit 97d47ebf1b7006585e6a8a539b80f98a7dd7a331
diff: https://github.com/bitrig/bitrig/commit/97d47eb
author: jsg <[email protected]>
date: Thu Oct 29 05:08:30 2015 +0000

regen

M       sys/dev/pci/pcidevs.h
M       sys/dev/pci/pcidevs_data.h

commit 2a6867f0eb47f0ebae823b1cba7eff322da9700c
diff: https://github.com/bitrig/bitrig/commit/2a6867f
author: Marco Peereboom <[email protected]>
date: Tue Feb 23 11:45:57 2016 -0600

remove dup vmop_info_result

M       usr.sbin/vmd/vmd.h

commit fe1c57fbe0300d687a9bc8844e880dba5163d502
diff: https://github.com/bitrig/bitrig/commit/fe1c57f
author: jsg <[email protected]>
date: Thu Oct 29 05:06:56 2015 +0000

add some amd family 16h model 30h-3fh, mullins/bolton ids

M       sys/dev/pci/pcidevs

Reply via email to