Re: [PATCH v2 23/31] coco/tdx-host: Setup all trusted IOMMUs on TDX Connect init

Xu Yilun
2026-04-27T03:32:51Z

On Fri, Apr 24, 2026 at 06:54:54AM +0000, Tian, Kevin wrote:
> > From: Xu Yilun <yilun.xu@linux.intel.com>
> > 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@linux.intel.com>
> > > > 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.

OK, I think I could delete the platform vs. IOMMU thing in commit log.

>
> Actually I'm OK to put that logic in tdx-host. Just the explanation
> here doesn't make much sense...
>