Skip to content

Commit 6d1b867

Browse files
sean-jcbonzini
authored andcommitted
KVM: SVM: Don't strip the C-bit from CR2 on #PF interception
Don't strip the C-bit from the faulting address on an intercepted #PF, the address is a virtual address, not a physical address. Fixes: 0ede79e ("KVM: SVM: Clear C-bit from the page fault address") Cc: [email protected] Cc: Brijesh Singh <[email protected]> Cc: Tom Lendacky <[email protected]> Signed-off-by: Sean Christopherson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 73ad160 commit 6d1b867

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/svm/svm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ static void svm_set_dr7(struct kvm_vcpu *vcpu, unsigned long value)
18981898

18991899
static int pf_interception(struct vcpu_svm *svm)
19001900
{
1901-
u64 fault_address = __sme_clr(svm->vmcb->control.exit_info_2);
1901+
u64 fault_address = svm->vmcb->control.exit_info_2;
19021902
u64 error_code = svm->vmcb->control.exit_info_1;
19031903

19041904
return kvm_handle_page_fault(&svm->vcpu, error_code, fault_address,

0 commit comments

Comments
 (0)