Re: [PATCH v1 3/8] x86/virt/tdx: Add a table-driven TDX global metadata reader

"Edgecombe, Rick P" <[email protected]>
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 2026-08-04 at 04:29 -0700, Chao Gao wrote:
> +/*
> + * Mapping between a TDX global metadata field and the C member that
> + * holds its value. Use TD_SYSINFO_MAP() to populate entries.
> + */
> +struct tdx_sys_field {
> +	u64 field_id;
> +	u16 offset;
> +	u8  size;

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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.