Re: [PATCH 09/17] KVM: TDX: Add helper to handle mapping leaf SPTE into S-EPT

Edgecombe, Rick P
2026-04-01T23:59:43Z

On Mon, 2026-03-30 at 14:43 +0800, Yan Zhao wrote:
> >
> > +static int tdx_sept_set_private_spte(struct kvm *kvm, gfn_t gfn,
> > +      enum pg_level level, u64 mirror_spte)
> > +{
> >
> > + if (KVM_BUG_ON(!is_shadow_present_pte(mirror_spte), kvm))
> > + return -EIO;
> > +
> > + if (!is_last_spte(mirror_spte, level))
> > + return tdx_sept_link_private_spt(kvm, gfn, level,
> > mirror_spte);
> For symmetry, what about renaming tdx_sept_link_private_spt() to
> tdx_sept_map_nonleaf_spte()?

Yea, it fits better.