Re: [PATCH v2 06/31] x86/virt/tdx: Read global metadata for TDX Module Extensions/Connect
From: Xu Yilun
Date: Thu Apr 23 2026 - 08:21:52 EST
On Tue, Apr 21, 2026 at 03:19:52PM -0700, Dan Williams wrote:
> Xu Yilun wrote:
> > Add reading of the global metadata for TDX Module Extensions & TDX
> > Connect. Add them in a batch as TDX Connect is currently the only user
> > of TDX Module Extensions and no way to initialize TDX Module Extensions
> > without firstly enabling TDX Connect.
> >
> > TDX Module Extensions & TDX Connect are optional features enumerated by
> > TDX_FEATURES0. Check the TDX_FEATURES0 before reading these metadata to
> > avoid failing the whole TDX initialization.
>
> I think it is important to distinguish "optional" module features vs
> required Linux features. Linux requires all features that a module
> advertises to succeed at core TDX init time.
Agree. But I want to reduce the scope to only about metadata reading in
this patch. So:
TDX Module Extensions is an optional features enumerated by
TDX_FEATURES0. But in the implementation, Linux requires that all
features that a Module advertises must have a complete, valid set of
metadata, and the check must succeed at core TDX initialization time.
Check TDX_FEATURES0 before reading these metadata. If a feature is
advertised, a failure in reading associated metadata causes the whole
TDX initialization to fail, otherwise skip.
>
> Otherwise, this looks ok / consistent with other metadata reading. It
> sets the precedent that if TDX Connect is advertised it must succeed all
> core initialization.