mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
KVM: SVM: Clear C-bit from the page fault address
When SEV is active, on #VMEXIT the page fault address will contain the C-bit. We must clear the C-bit before handling the fault. Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: "Radim Krčmář" <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Tom Lendacky <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Reviewed-by: Borislav Petkov <[email protected]> Signed-off-by: Brijesh Singh <[email protected]>
This commit is contained in:
1 parent
1e80fdc09d
commit
0ede79e132
1 file changed
+2
-2
+2
-2
@@ -2430,7 +2430,7 @@ static void svm_set_dr7(struct kvm_vcpu *vcpu, unsigned long value)
|
||||
|
||||
static int pf_interception(struct vcpu_svm *svm)
|
||||
{
|
||||
u64 fault_address = svm->vmcb->control.exit_info_2;
|
||||
u64 fault_address = __sme_clr(svm->vmcb->control.exit_info_2);
|
||||
u64 error_code = svm->vmcb->control.exit_info_1;
|
||||
|
||||
return kvm_handle_page_fault(&svm->vcpu, error_code, fault_address,
|
||||
@@ -2440,7 +2440,7 @@ static int pf_interception(struct vcpu_svm *svm)
|
||||
|
||||
static int npf_interception(struct vcpu_svm *svm)
|
||||
{
|
||||
u64 fault_address = svm->vmcb->control.exit_info_2;
|
||||
u64 fault_address = __sme_clr(svm->vmcb->control.exit_info_2);
|
||||
u64 error_code = svm->vmcb->control.exit_info_1;
|
||||
|
||||
trace_kvm_page_fault(fault_address, error_code);
|
||||
|
||||
Reference in new issue
Block a user