Re: [PATCH v4 04/10] x86/virt/tdx: Convert the tdmr metadata reader
From: Xu Yilun
Date: Wed Oct 14 2026 - 04:00:03 EST
On Mon, Oct 12, 2026 at 02:47:31AM -0700, Chao Gao wrote:
> Continue converting the metadata readers to the table-driven helper.
>
> The "TDMR info" metadata class has two readers: one for the fields that are
> always present, and one for the fields that exist only when the module
> supports Dynamic PAMT.
>
> Add a table for each, both pairing field IDs with the 'struct
> tdx_sys_info_tdmr' members that hold their values, and read all fields by
> walking the tables.
>
> Annotate both tables as __initconst since they are referenced only during
> init.
>
> AI was used under supervision to review the code and workshop the
> changelog.
>
> Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx>
> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>
Reviewed-by: Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx>