[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5802ecf9-3dfa-40a2-b61f-60b2f9985640@intel.com>
Date: Thu, 6 Nov 2025 14:07:15 +0800
From: Xiaoyao Li <xiaoyao.li@...el.com>
To: Sukrit Bhatnagar <Sukrit.Bhatnagar@...y.com>,
Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
<pbonzini@...hat.com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Yuan Yao <yuan.yao@...el.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: VMX: Fix check for valid GVA on an EPT violation
On 11/6/2025 1:28 PM, Sukrit Bhatnagar wrote:
> 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: f3009482512e ("KVM: VMX: Set PFERR_GUEST_{FINAL,PAGE}_MASK if and only if the GVA is valid")
> Signed-off-by: Sukrit Bhatnagar <Sukrit.Bhatnagar@...y.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@...el.com>
> ---
> arch/x86/kvm/vmx/common.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/vmx/common.h b/arch/x86/kvm/vmx/common.h
> index bc5ece76533a..412d0829d7a2 100644
> --- a/arch/x86/kvm/vmx/common.h
> +++ b/arch/x86/kvm/vmx/common.h
> @@ -98,7 +98,7 @@ static inline int __vmx_handle_ept_violation(struct kvm_vcpu *vcpu, gpa_t gpa,
> error_code |= (exit_qualification & EPT_VIOLATION_PROT_MASK)
> ? PFERR_PRESENT_MASK : 0;
>
> - if (error_code & EPT_VIOLATION_GVA_IS_VALID)
> + if (exit_qualification & EPT_VIOLATION_GVA_IS_VALID)
> error_code |= (exit_qualification & EPT_VIOLATION_GVA_TRANSLATED) ?
> PFERR_GUEST_FINAL_MASK : PFERR_GUEST_PAGE_MASK;
>
Powered by blists - more mailing lists