Re: [PATCH v9 03/11] x86/virt/tdx: Add tdx_alloc/free_control_page() helpers
From: Dave Hansen
Date: Thu Aug 06 2026 - 13:23:05 EST
On 8/6/26 10:17, Dave Hansen wrote:
> I know the changelog tried to hand wave this away a bit. But the
> comments in here need to say something about tdx_pamt_get() being
> unusable on its own. The normal convention would be to __ it, too.
BTW, here's what I'm looking for. Something like:
/*
* Allocate Dynamic PAMT memory for the given page.
*
* Only call this when the pfn is known not to already have Dynamic
* PAMT pages in the TDX module for it.
*/
static int __tdx_pamt_get(kvm_pfn_t pfn)
{
struct page *pamt_pages[TDX_DPAMT_ENTRY_PAGE_CNT];
u64 tdx_status;
...
See? Let's talk about the rules around when this can and should be called.