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

From: Binbin Wu

Date: Wed Nov 19 2025 - 01:39:36 EST




On 11/19/2025 2:29 PM, Yan Zhao wrote:
[...]
+static inline int tdx_check_accept_level(struct kvm_vcpu *vcpu, gfn_t gfn)
The function name sounds like it is just doing check, but it may split a
hugepage on mismatch.

How about tdx_enforce_accept_level_mapping() or something else to reflect
the change could be make?
What about tdx_honor_guest_accept_level()?

It looks good to me.