Re: [PATCH v3 00/16] TDX: Enable Dynamic PAMT
From: Dave Hansen
Date: Mon Sep 29 2025 - 12:22:49 EST
On 9/29/25 04:17, Kiryl Shutsemau wrote:
>> Do you have any suggestions for a better approach?
>>
>> e.g., could the PAMT pages be allocated from a dedicated pool that ensures they
>> reside in different 2MB ranges from guest private pages and TD control pages?
> It can work: allocate 2M a time for PAMT and piecemeal it to TDX module
> as needed. But it means if 2M allocation is failed, TDX is not functional.
>
> Maybe just use a dedicated kmem_cache for PAMT allocations. Although, I
> am not sure if there's a way to specify to kmem_cache what pages to ask
> from page allocator.
That seems a bit obtuse rather than just respecting normal lock ordering
rules. No?