Re: [PATCH v4 06/17] KVM: x86/mmu: Allocate DPAMT pages for vCPU-induced page split
From: Yan Zhao
Date: Sat Oct 10 2026 - 02:39:12 EST
On Wed, Oct 07, 2026 at 11:45:48PM +0800, Edgecombe, Rick P wrote:
> On Mon, 2026-09-28 at 17:10 +0800, Yan Zhao wrote:
> > From: Sean Christopherson <seanjc@xxxxxxxxxx>
> >
> > Extend the TDP MMU to allocate Dynamic PAMT backing pages (DPAMT pages) for
> > vCPU-induced huge page splits in mirror roots when DPAMT is enabled.
> >
> > Leverage the .topup_external_cache() interface to topup the DPAMT cache
> > when allocating a new child page table for splitting. The DPAMT cache is
> > currently a per-vCPU thread-local list. When a vCPU-induced page split
> > occurs, DPAMT pages can be drawn locklessly from the list.
> >
> > Pass min_nr_spts as 1 to .topup_external_cache(), indicating there's one
> > new S-EPT page table page. So, tdx_topup_external_pamt_cache() will
> > allocate DPAMT page pairs for both the newly added S-EPT page table page
> > and the demoted guest private page.
> >
> > tdp_mmu_alloc_sp_for_split() is currently not reachable from a non-vCPU
> > context for mirror roots, since dirty page tracking is not yet allowed on
> > mirror roots. So, simply add a WARN if tdx_topup_external_pamt_cache() is
> > invoked under a non-vCPU context.
> >
> > Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> > Signed-off-by: Yan Zhao <yan.y.zhao@xxxxxxxxx>
> > ---
> > v4: new patch.
>
> New? It is essentially this with a new log, right?
> https://lore.kernel.org/kvm/20260129011517.3545883-39-seanjc@xxxxxxxxxx/#t
Ha, "new patch" is relative to v3.
It's indeed introduced by Sean from the DPAMT combined v5.
> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>
>
>
>