]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: remove incorrect vpid check in nested invvpid emulation
authorHaozhong Zhang <haozhong.zhang@intel.com>
Wed, 25 Nov 2015 09:21:39 +0000 (17:21 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 25 Nov 2015 14:52:55 +0000 (15:52 +0100)
commit8522ad4cecf79bca40bb37e0e412870173886407
tree6bf43a5affc9ecc1a8d027dbb2fad3e72eb2ea36
parentf0d75060b2c6bd0a408306a68bfcd88ea950304d
KVM: nVMX: remove incorrect vpid check in nested invvpid emulation

This patch removes the vpid check when emulating nested invvpid
instruction of type all-contexts invalidation. The existing code is
incorrect because:
 (1) According to Intel SDM Vol 3, Section "INVVPID - Invalidate
     Translations Based on VPID", invvpid instruction does not check
     vpid in the invvpid descriptor when its type is all-contexts
     invalidation.
 (2) According to the same document, invvpid of type all-contexts
     invalidation does not require there is an active VMCS, so/and
     get_vmcs12() in the existing code may result in a NULL-pointer
     dereference. In practice, it can crash both KVM itself and L1
     hypervisors that use invvpid (e.g. Xen).

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c