aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/kvm/svm/nested.c
diff options
context:
space:
mode:
authorKrish Sadhukhan <krish.sadhukhan@oracle.com>2020-08-29 00:48:22 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2020-09-28 07:57:23 -0400
commitfb0f33fdefe9f473dc5f7b71345096c8d60ab9dd (patch)
tree5d395dee638386809fe454801cab262211a9e3fe /arch/x86/kvm/svm/nested.c
parentKVM: x86: emulating RDPID failure shall return #UD rather than #GP (diff)
downloadwireguard-linux-fb0f33fdefe9f473dc5f7b71345096c8d60ab9dd.tar.xz
wireguard-linux-fb0f33fdefe9f473dc5f7b71345096c8d60ab9dd.zip
KVM: nSVM: CR3 MBZ bits are only 63:52
Commit 761e4169346553c180bbd4a383aedd72f905bc9a created a wrong mask for the CR3 MBZ bits. According to APM vol 2, only the upper 12 bits are MBZ. Fixes: 761e41693465 ("KVM: nSVM: Check that MBZ bits in CR3 and CR4 are not set on vmrun of nested guests", 2020-07-08) Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com> Message-Id: <20200829004824.4577-2-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm/nested.c')
-rw-r--r--arch/x86/kvm/svm/nested.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index cf6e74b9461d..da5e87d002e9 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -237,7 +237,7 @@ static bool nested_vmcb_checks(struct vcpu_svm *svm, struct vmcb *vmcb12)
} else {
if (!(vmcb12->save.cr4 & X86_CR4_PAE) ||
!(vmcb12->save.cr0 & X86_CR0_PE) ||
- (vmcb12->save.cr3 & MSR_CR3_LONG_RESERVED_MASK))
+ (vmcb12->save.cr3 & MSR_CR3_LONG_MBZ_MASK))
return false;
}
if (kvm_valid_cr4(&svm->vcpu, vmcb12->save.cr4))