kernel - Fix a system lockup with vmm
commite1ea8b243e0eeb23a3181ea4ba7c273ac2f7048a
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 8 Oct 2016 02:10:06 +0000 (7 19:10 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 8 Oct 2016 02:10:06 +0000 (7 19:10 -0700)
tree6a3a31fc079ae4a4d6388a70319fbc461e4798f7
parentaffce8d3de14a8bdfa871ac8cec5638fa36b63c8
kernel - Fix a system lockup with vmm

* Fix an issue where vkernel_lwp_exit() was improperly trying to kfree()
  the vklp->ve pointer for the guest-thread case.  This field holds a
  user-supplied address in that case, not a kernel structure.

* Yield the cpu more aggressively in the VMM_GUEST_RUN loop.  We were
  testing for pending interrupts but we were not calling lwkt_switch()

* Do not exit the vkernel on a call or jump to address 0.  This debugging
  code should have been removed and wasn't.  A user process running under
  the vkernel could cause the vkernel itself to exit.

* Numerous syntactical cleanups.

Reported-by: tuxillo
sys/kern/sys_vmm.c
sys/platform/pc64/include/pmap.h
sys/platform/pc64/vmm/ept.c
sys/platform/pc64/vmm/vmm.c
sys/platform/pc64/vmm/vmm.h
sys/platform/pc64/vmm/vmx.c
sys/platform/pc64/x86_64/pmap.c
sys/sys/proc.h
sys/vm/vm_vmspace.c