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:24:39 EST


On Wed, 2026-07-22 at 08:12 -0700, Sean Christopherson wrote:
> > > > + ret = tdx_pamt_get(page_to_pfn(sept_pt), &to_tdx(vcpu)-
> > > > >pamt_cache);
> > > > + if (ret)
>
> Shouldn't this be a KVM_BUG_ON()?  To Sashiko's point about this creating an
> infinite fault loop, that simply shouldn't happen.  The whole point of using
> caches for the paging assets is to guarantee success.

Missed this one the first time. Yes it does seem like a good KVM_BUG_ON() case.
I'll update it.