Re: [PATCH v1 08/26] x86/virt/tdx: Add tdx_enable_ext() to enable of TDX Module Extensions

Dave Hansen
2025-11-21T15:38:04Z

On 11/21/25 07:15, Dave Hansen wrote:
> On 11/21/25 04:54, Xu Yilun wrote:
> ...
>> For now, TDX Module Extensions consume quite large amount of memory
>> (12800 pages), print this readout value on TDX Module Extentions
>> initialization.
> Overall, the description is looking better, thanks!
>
> A few more nits, though. Please don't talk about things in terms of
> number of pages. Just give the usage in megabytes.

Oh, and please at least have a discussion with the memory management
folks about consuming this amount of memory forever. I think it's quite
possible they will prefer it be allocated in a way other than thousands
of plain old allocations.

For example, imagine memory was fragmented and those 12800 pages came
from 12,800 different 2M regions. Well, now you've got ~50GB of memory
that is _permanently_ fragmented and will never be able to satisfy a 2M
allocation.

You might get an answer that it's better to do a small number of
max-size buddy allocations than a large number of PAGE_SIZE allocations.