Re: [PATCH v4 11/16] KVM: TDX: Add x86 ops for external spt cache
From: Huang, Kai
Date: Tue Jan 20 2026 - 05:01:11 EST
On Tue, 2026-01-20 at 17:18 +0800, Yan Zhao wrote:
> > When sp->spt is allocated via per-vCPU mmu_shadow_page_cache, it is
> > actually initialized to SHADOW_NONPRESENT_VALUE:
> >
> > vcpu->arch.mmu_shadow_page_cache.init_value =
> > SHADOW_NONPRESENT_VALUE;
> >
> > So the way sp->spt is allocated in tdp_mmu_alloc_sp_for_split() is
> > actually broken IMHO because entries in sp->spt is never initialized.
> The sp->spt allocated in tdp_mmu_alloc_sp_for_split() is initialized in
> tdp_mmu_split_huge_page()...
Oh right, we already have a huge SPTE to copy from in this case, so no
problem here, but seems the inconsistency is still there to me.