Re: [PATCH v1 3/8] x86/virt/tdx: Add a table-driven TDX global metadata reader
From: Edgecombe, Rick P
Date: Mon Aug 10 2026 - 14:36:38 EST
On Mon, 2026-08-10 at 14:43 +0800, Chao Gao wrote:
> > We are supposed to be able to extract the size from the field id too. We
> > could
> > leave the bits out of the field id and have it constructed on the fly, or we
> > could do a static assert based on the size matching between field id size
> > and
> > struct size. It depends on how we want to have the field ids defines I
> > guess.
>
> Patch 8 does exactly that -- it pulls the element size from bits 33:32
> of the field ID and static-asserts it against sizeof the destination
> C member.
Doh! Yea looks good. So then if we keeping the full field code in the define it
is easier to cross reference (makes sense), it seems consistent.