]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Fix VMXON emulation
authorAbel Gordon <abelg@il.ibm.com>
Thu, 18 Apr 2013 11:36:55 +0000 (14:36 +0300)
committerGleb Natapov <gleb@redhat.com>
Mon, 22 Apr 2013 07:52:01 +0000 (10:52 +0300)
commita97327694a69778bc7a5926c151b2b4856bae0c6
tree8a0f2f1c497c72f80800e3336d6c9d86b1ff0be9
parentb61714efad4ccbc193b2fcb5bf5fb90d922ce745
KVM: nVMX: Fix VMXON emulation

handle_vmon doesn't check if L1 is already in root mode (VMXON
was previously called). This patch adds this missing check and calls
nested_vmx_failValid if VMX is already ON.
We need this check because L0 will allocate the shadow vmcs when L1
executes VMXON and we want to avoid host leaks (due to shadow vmcs
allocation) if L1 executes VMXON repeatedly.

Signed-off-by: Abel Gordon <abelg@il.ibm.com>
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
arch/x86/kvm/vmx.c