Re: [PATCH v1 1/8] x86/virt/tdx: Stop treating tdx_global_metadata.h as auto-generated
From: Dave Hansen
Date: Tue Aug 04 2026 - 19:44:58 EST
On 8/4/26 04:29, Chao Gao wrote:
> From: Dave Hansen <dave@xxxxxxxx>
>
> The TDX module exposes its capabilities and limits through "Global
> Scope Metadata" fields, defined in the Intel TDX Module ABI spec.
> The kernel mirrors a small subset of those fields in C structures
> (for example, struct tdx_sys_info_version/features). Those structures
> are populated by reading each field via the TDH.SYS.RD SEAMCALL.
>
> Today the header that holds these structures is generated by an
> out-of-tree script from a JSON file listing all of the TDX module's
> metadata. That made it trivial to add a new field, but everything
> else suffered for it:
>
> - The header is opaque to anyone who doesn't have the script and
> the JSON file handy, and the "Automatically generated" tag tells
> reviewers their edits will be clobbered.
> - The script ships outside the tree, so reproducing changes
> requires fetching it from a mailing list link.
> - The structures are short and stable; the script's value over
> a hand-edited header is small.
Well, and the big one: after we started doing this, the "ABI Definitions
for Intel® TDX" was declared to be not an ABI. So, even if we code to
the JSON, there's no guarantee the JSON will be stable.
<sigh>
Honestly that's what matters. The script and all the other fluff is just
noise.
> Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx>
So, I'm curious: What made you feel OK to sign-off on this? I'm not
judging. I'm open-minded on this. All I know is *I* wasn't ready to
sign-off on this.
I really want to know what your thought process was.