Re: [PATCH v3 12/16] x86/virt/tdx: Add helpers to allow for pre-allocating pages

Dave Hansen
2025-09-26T15:19:39Z

On 9/18/25 16:22, Rick Edgecombe wrote:
> +/*
> + * Simple structure for pre-allocating Dynamic
> + * PAMT pages outside of locks.
> + */
> +struct tdx_prealloc {
> + struct list_head page_list;
> + int cnt;
> +};

This is compact and all. But it's really just an open-coded, simplified
version of what mempool_t plus mempool_init_page_pool() would do.

Could you take a look at that and double check that it's not a good fit
here, please?