VMM: Set the host stacktop on every VMX entry
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 2 Dec 2016 19:18:51 +0000 (14:18 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 14 Dec 2016 00:43:24 +0000 (19:43 -0500)
commit2e64cf15d837bda711671f3cd023c07421c4641f
tree0ad5f0f983ca99e52ea886bc5e6731464c1f3e0c
parent5a3093bfe0ef978ea1b4831256e2bd4553b7a900
VMM: Set the host stacktop on every VMX entry

We had been assuming that if you returned to the VM, that the kernel was
still on the same stack.  That's not true - the kernel could have blocked
the kthread that handled the vmexit.  (Despite my warnings to not block in
vmexit_dispatch(), it might be safe).

This popped up as a problem when implementing lazy VMCS unload.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/process64.c
kern/arch/x86/vmm/intel/vmx.c