Re: [PATCH v3 03/10] x86/virt/tdx: Convert the features metadata reader

From: Edgecombe, Rick P

Date: Wed Sep 30 2026 - 20:48:14 EST


On Tue, 2026-09-29 at 22:38 -0700, Chao Gao wrote:
> Continue converting the metadata readers to the table-driven helper.
>
> Add a table that pairs each field ID with the 'struct
> tdx_sys_info_features' member that holds its value, and read all fields by
> walking that table.
>
> Even though the structure has only one field, add a table anyway for
> symmetry with the other classes. Adding a field later then becomes a
> one-line change.
>
> Annotate the table as __initconst as it is referenced only during init.
>
> AI was used under supervision to review code and workshop logs.
>
> Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx>
Reviewed-by: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>