Re: [PATCH v4 08/10] x86/virt/tdx: Remove tdx_global_metadata.c

From: Binbin Wu

Date: Tue Oct 13 2026 - 06:46:12 EST


On 10/12/2026 5:47 PM, Chao Gao wrote:
> tdx_global_metadata.c held the script-generated metadata readers,
> deliberately kept in their own file so that generated code stayed separate
> from hand-written code. It cannot be compiled on its own because it lacks
> the low-level SEAMCALL wrappers, so tdx.c #includes it directly.
>
> Including one C file into another is unusual, and now that the readers are
> maintained by hand there is nothing left to isolate. get_tdx_sys_info() is
> the only function still in the file.
>
> Move get_tdx_sys_info() verbatim into tdx.c and delete
> tdx_global_metadata.c along with its #include.
>
> 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>

Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>