Re: [PATCH v3 7/9] coco/tdx-host: Add skeleton to support PCI link encryption

From: Xu Yilun

Date: Mon Nov 23 2026 - 10:36:54 EST


> > > +static inline bool tdx_supports_tdisp(const struct tdx_sys_info *sysinfo)
> > > +{
> > > + if (!(sysinfo->features.tdx_features0 & TDX_FEATURES0_TDXCONNECT))
> > > + return false;
> > > +
> > > + return false; /* To be enabled when kernel is ready */
> > > +}
> >
> > Patch 2 open-codes the same TDX_FEATURES0_TDXCONNECT check. Can this
> > helper be moved to patch 2 and used there?
>
> These checks serve different purposes: the metadata patch checks whether
> the TDX module supports TDX Connect; tdx_supports_tdisp() decides
> whether the kernel is ready to register the link tsm. The latter may
> include additional checks, such as quirks, so I would like to keep the

But I don't see the need to distinguish them. Any case the kernel is not
ready to handle TDX Trusted I/O, but must read its metadata?

> helper for the tsm registration.