Re: [RFC PATCH v2 14/23] KVM: TDX: Split and inhibit huge mappings if a VMExit carries level info

From: Huang, Kai

Date: Tue Nov 11 2025 - 06:07:22 EST


On Thu, 2025-08-07 at 17:44 +0800, Yan Zhao wrote:
> @@ -2044,6 +2091,9 @@ static int tdx_handle_ept_violation(struct kvm_vcpu *vcpu)
>   */
>   exit_qual = EPT_VIOLATION_ACC_WRITE;
>  
> + if (tdx_check_accept_level(vcpu, gpa_to_gfn(gpa)))
> + return RET_PF_RETRY;
> +

I don't think you should return RET_PF_RETRY here.

This is still at very early stage of EPT violation. The caller of
tdx_handle_ept_violation() is expecting either 0, 1, or negative error code.