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

From: Edgecombe, Rick P

Date: Wed Sep 23 2026 - 18:54:12 EST


On Fri, 2026-09-18 at 06:29 -0700, 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>