RE: [PATCH v2 23/31] coco/tdx-host: Setup all trusted IOMMUs on TDX Connect init
From: Tian, Kevin
Date: Fri Apr 24 2026 - 02:58:47 EST
> From: Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx>
> Sent: Wednesday, April 22, 2026 5:27 PM
>
> On Thu, Apr 09, 2026 at 07:51:56AM +0000, Tian, Kevin wrote:
> > > From: Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx>
> > > Sent: Saturday, March 28, 2026 12:01 AM
> > >
> > > Setup all trusted IOMMUs on TDX Connect initialization and clear all on
> > > TDX Connect removal.
> > >
> > > Trusted IOMMU setup is the pre-condition for all following TDX Connect
> > > operations such as SPDM/IDE setup. It is more of a platform
> > > configuration than a standalone IOMMU configuration, so put the
> > > implementation in tdx-host driver.
> > >
> >
> > not sure what above tries to tell. why is it a platform configuration
> > when you have seamcalls on each IOMMU?
>
> This is to say the TDH.IOMMU.SETUP relates to PCIe SPDM/IDE, it is not
> just about IOMMU. By identifying the
>
> for_each_iommu(iommu)
> tdh.iommu.setup(iommu)
>
> as a platform configuration, it justifies why we trigger this
> configuration at tdx-host driver probe, rather than in some
> IOMMU/IOMMUFD API.
iommu drivers also involve PCI, e.g. call pci_enable_ats(), etc.
so having relation to PCIe SPDM/IDE is not an argument of
platform vs. IOMMU.
Actually I'm OK to put that logic in tdx-host. Just the explanation
here doesn't make much sense...