Re: [PATCH v3 04/10] x86/virt/tdx: Convert the tdmr metadata reader

From: Edgecombe, Rick P

Date: Wed Sep 30 2026 - 20:38:02 EST


On Tue, 2026-09-29 at 22:38 -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>