]> git.baikalelectronics.ru Git - kernel.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)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 16 Sep 2015 13:17:27 +0000 (15:17 +0200)
commitc2d3997772fa9ff8f01a7f4ad96755baa8651975
tree31e7249964de71dc1371b78f3296f184fcb5adac
parentfe4c90ff4264e71dd238e8fe9fa386c3f02c0495
KVM: vmx: fix VPID is 0000H in non-root operation

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 6d31b7b0 ("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.

Cc: stable@vger.kernel.org # 3.19+
Fixes: 6d31b7b0e6f7ce3c6cc59c42ffbc06437ed8fe5c
Reported-by: Wincy Van <fanwenyi0529@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c