]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/x86/kvm/vmx.c
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)
commit145c28dd19a2a05aa798e77bd7e679847fe8bee3
tree8a0f2f1c497c72f80800e3336d6c9d86b1ff0be9
parent20b97feaf615da2c43361e1dda7efd068a4446ef
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