Re: [PATCH v2 4/4] coco/tdx-host: Initialize trusted DMA on all capable IOMMUs
From: Baolu Lu
Date: Mon Oct 19 2026 - 04:16:45 EST
On 10/16/2026 10:58 PM, Jason Gunthorpe wrote:
That's going to be a bit of a PITA, since the DIDs can be in use when- The TDX Connect architecture places requirements on the hostDidn't get this. Both ECMD and DID reservation are TDX specific things.
iommu driver while the secure IOMMU is being set up. For example,
the host iommu driver must block the enhanced command (ECMD)
interface while the TDH.IOMMU.SETUP SEAMCALL runs, and it must
reserve the upper half of the domain ID space. These steps have
to happen atomically under the iommu driver's own locks. As a
result, the Intel iommu driver needs to merge the two steps above
into one.
How are they related to the two steps in the ARM sides and why calls
for merging?
and why are they must be done atomically? they are conditions to
execute TDH.IOMMU.SETUP, but it is perfectly fine to reserve DID
at an early point then block ECMD later...
the tdx module is start potentially.
I suppose you can start out by just failing if this has happened.
But as soon as reasonably possible once the system opts into a TDX
operation the VT-d drivers should stop using the upper did space.
Otherwise you will have to implement live DID renaming, which is a
PITA in an iommu driver.
Yes, agreed.
Thanks,
baolu