]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: vmx: fix VPID is 0000H in non-root operation
authorWanpeng Li <wanpeng.li@hotmail.com>
Wed, 16 Sep 2015 11:31:11 +0000 (19:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:49:12 +0000 (14:49 -0700)
commitf9f83f3cfce00b9b862620f77b2809d13771a37b
tree626e9d747433e7f46cb7930d6c853243be88934f
parent91e4921b5e8b189723916f616664f809d15f3025
KVM: vmx: fix VPID is 0000H in non-root operation

commit 04bb92e4b4cf06a66889d37b892b78f926faa9d4 upstream.

Reference SDM 28.1:

The current VPID is 0000H in the following situations:
- Outside VMX operation. (This includes operation in system-management
  mode under the default treatment of SMIs and SMM with VMX operation;
  see Section 34.14.)
- In VMX root operation.
- In VMX non-root operation when the “enable VPID” VM-execution control
  is 0.

The VPID should never be 0000H in non-root operation when "enable VPID"
VM-execution control is 1. However, commit 34a1cd60 ("kvm: x86: vmx:
move some vmx setting from vmx_init() to hardware_setup()") remove the
codes which reserve 0000H for VMX root operation.

This patch fix it by again reserving 0000H for VMX root operation.

Fixes: 34a1cd60d17f62c1f077c1478a6c2ca8c3d17af4
Reported-by: Wincy Van <fanwenyi0529@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx.c