Re: [PATCH v2 1/5] x86/virt/tdx: Move TDH.SYS.CONFIG operations into a wrapper

From: Tony Lindgren

Date: Tue Sep 22 2026 - 03:15:34 EST


On Tue, Sep 15, 2026 at 06:26:54PM +0800, Xu Yilun wrote:
> --- a/arch/x86/virt/vmx/tdx/tdx.c
> +++ b/arch/x86/virt/vmx/tdx/tdx.c
> @@ -998,11 +998,33 @@ static __init int construct_tdmrs(struct list_head *tmb_list,
> return ret;
> }
>
> +/*
> + * This is an array of HPAs, each points to a TDMR_INFO data structure (see
> + * struct tdmr_info).
> + *
> + * It is the in-memory ABI that the kernel passes to the TDX module to specify
> + * the ranges of TD Memory Regions (TDMRs) and their associated PAMT memory.
> + */
> +struct tdmr_info_pa_array {
> + DECLARE_FLEX_ARRAY(u64, phys);
> +};

I think you can simplify the comments above a bit, how about:

TDX module in-memory ABI to specify the TD Memory Regions (TDMRs) and their
associated PAMT memory. An array of HPAs. Each element points to a TDMR_INFO,
see struct tdmr_info.

Other than that:

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