Skip to content

Commit d0164c1

Browse files
Sukrit Bhatnagarsean-jc
authored andcommitted
KVM: VMX: Fix check for valid GVA on an EPT violation
On an EPT violation, bit 7 of the exit qualification is set if the guest linear-address is valid. The derived page fault error code should not be checked for this bit. Fixes: f300948 ("KVM: VMX: Set PFERR_GUEST_{FINAL,PAGE}_MASK if and only if the GVA is valid") Cc: [email protected] Signed-off-by: Sukrit Bhatnagar <[email protected]> Reviewed-by: Xiaoyao Li <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent ae43105 commit d0164c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/vmx/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static inline int __vmx_handle_ept_violation(struct kvm_vcpu *vcpu, gpa_t gpa,
9898
error_code |= (exit_qualification & EPT_VIOLATION_PROT_MASK)
9999
? PFERR_PRESENT_MASK : 0;
100100

101-
if (error_code & EPT_VIOLATION_GVA_IS_VALID)
101+
if (exit_qualification & EPT_VIOLATION_GVA_IS_VALID)
102102
error_code |= (exit_qualification & EPT_VIOLATION_GVA_TRANSLATED) ?
103103
PFERR_GUEST_FINAL_MASK : PFERR_GUEST_PAGE_MASK;
104104

0 commit comments

Comments
 (0)