Re: [PATCH v2 4/5] x86/virt/tdx: Add extra memory to TDX module for the extensions

From: Tony Lindgren

Date: Tue Sep 22 2026 - 03:32:26 EST


On Tue, Sep 15, 2026 at 06:26:57PM +0800, Xu Yilun wrote:
> --- a/arch/x86/virt/vmx/tdx/tdx.c
> +++ b/arch/x86/virt/vmx/tdx/tdx.c
> @@ -1181,6 +1181,136 @@ static __init int init_tdmrs(struct tdmr_info_list *tdmr_list)
> return 0;
> }
>
> +#define TDX_HPA_LIST_MAX_NR_PAGES (PAGE_SIZE / sizeof(u64))
> +
> +/*
> + * This is the "HPA_LIST" data structure defined in the "Intel TDX Module ABI
> + * Specification".
> + *
> + * It is the in-memory ABI that the kernel uses to add memory to the TDX
> + * module.
> + */
> +struct tdx_hpa_list {
> + u64 phys[TDX_HPA_LIST_MAX_NR_PAGES];
> +};

Here too you could simplify the comments similar to what I suggested for
patch 1/5.

Other than that:

Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>