Re: [PATCH v9 08/11] KVM: TDX: Get/put PAMT pages when (un)mapping private memory
"Edgecombe, Rick P" <[email protected]>
| Newsgroups | dev.linux.lists.sashiko-reviews,org.kernel.vger.kvm |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2026-08-06 at 07:16 +0000, [email protected] wrote: > > [Severity: Critical] > > When tdh_mem_sept_add() returns an error like TDX_OPERAND_BUSY, this path > > calls tdx_pamt_put(), which frees the page back to the global allocator > > instead of returning it to the vCPU cache. > > > > Since a busy error returns -EBUSY and triggers a RET_PF_RETRY loop in > > kvm_tdp_mmu_map_private_pfn(): > > > > kvm_tdp_mmu_map_private_pfn() { > > ... > > do { > > ... > > r = kvm_tdp_mmu_map(vcpu, &fault); > > } while (r == RET_PF_RETRY); > > ... > > } > > > > Does this repeatedly drain the vCPU's memory cache without topping it up? > > > > The loop re-attempts the mapping without calling mmu_topup_memory_caches(), > > meaning repeated contentions could quickly exhaust the cache capacity. This is the same false positive we get every time. Existing issue. Sean was going to send a cleanup. Oh he just did.