Re: [PATCH v7 08/11] KVM: TDX: Get/put PAMT pages when (un)mapping private memory
From: Edgecombe, Rick P
Date: Wed Jul 22 2026 - 15:51:48 EST
On Wed, 2026-07-22 at 12:34 -0700, Sean Christopherson wrote:
> Maybe put it in code? E.g.
>
> /*
> * Minus one page to exclude the root SPT, but plus one page for a
> * possible 4KiB private mapping.
> */
> min_nr_spts += -1 + 1;
>
> return tdx_topup_pamt_cache(&to_tdx(vcpu)->pamt_cache, min_nr_spts);
Haha, yea. I felt too silly writing that code. But I'm ok. This has definitely
had enough confusion over the versions to warrant something.