kernel - Fix a system lockup with vmm
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 8 Oct 2016 02:10:06 +0000 (19:10 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 16 Oct 2016 21:41:44 +0000 (14:41 -0700)
commit8e73479e3c0ecf0d527bad07de2065334da5e59b
treeaf957cb84bcbe6fa331e45d4e3d6a99c112e5eff
parent84f5e3457abecf35e96ebd677b64300098a2818b
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