[PATCH 0/5] iommu/vt-d: Introduce trusted DMA initialization support

From: Lu Baolu

Date: Tue Sep 15 2026 - 04:01:16 EST


Hi,

This series adds Intel VT-d trusted extension support to the host Intel
IOMMU driver as groundwork for TEE I/O trusted DMA (e.g. TDX Connect).

The trusted extension introduces a parallel, extension-specific path for
trusted DMA assets used by confidential device assignment. Existing VT-d
functionality remains unchanged for regular host DMA paths.

>From the TDX Connect architecture perspective, VT-d is enhanced with:

1) Trusted DMA translation root table
- A second root-table address register, restricted to SEAM SAI.
- Programmed by the TDX module with the root of TDX-managed DMA
translation tables for TD-assigned devices.

2) Trusted invalidation queue
- A second invalidation-queue address register plus dedicated
head/tail registers, also restricted to SEAM SAI.

3) IOTLB / DID isolation
- When TDX Connect is enabled, VT-d restricts VMM DID usage and
reserves the DID MSB namespace bit for TDX-module use.

This posting focuses on VT-d-side enablement only: it enables those
extension-defined resources and control points while preserving existing
host VT-d behavior for non-trusted flows. Higher-layer integration
(TDX guest/device flows) will be posted separately.

The trusted IOMMU extensions establish an architecture where only
TEE-I/O DMA requests can access TD private memory, and only the TDX
module can configure TEE-I/O access-control permissions. The host
allocates memory for data structures used by the TDX module to
manage trusted DMA, then requests the TDX module (via SEAMCALL) to
enable the extension in each IOMMU.

Non-TEE-I/O DMA requests are unaffected and continue to be managed
by the host through existing IOMMU interfaces.

Patch Breakdown:

- Patch 1: Implements low-level SEAMCALL wrappers (TDH.IOMMU.SETUP/CLEAR)
to interface with the TDX module.
- Patch 2: Parses platform global metadata fields to calculate required
IOMMU metadata page requirements.
- Patch 3: Introduces the core driver entry points.
- Patch 4: Implements the metadata page allocation and SEAMCALL
sequences required to configure and release IOMMU units in trusted
mode.
- Patch 5: Restricts the domain ID (DID) space allocated to the host by
reserving the MSB for exclusive use by the TDX module.

ABI History:

TDH.IOMMU.CLEAR previously required the host to provide, as input, the
parameter page used for TDH.IOMMU.SETUP. This ABI has changed to remove
that requirement. Because this ABI change is not yet public, it may
cause confusion when referring to the ABI specification.

Reference:

Implementation details follow the interfaces and behavior defined in the
TDX Connect Application Binary Interface (ABI) Reference Specification
and Intel TDX Connect Architecture Specification:

Link: https://cdrdv2.intel.com/v1/dl/getContent/858625 # [1]
Link: https://www.intel.com/content/www/us/en/content-details/862706/intel-tdx-connect-architecture-specification.html # [2]

This is part of the effort to implement the TDX PCIe Link Encryption
feature, which includes the following components:

[ ] TDX module extensions initialization, posted in [3]
[X] Introduce trusted DMA initialization support
[ ] SEAMCALL helpers for TDX PCIe Link Encryption
[ ] PCIe Link Encryption Establishment via TDX platform services

A full preview of these dependencies and follow-up changes is avaiable
at [4].

Link: https://lore.kernel.org/r/20260618081355.3253581-1-yilun.xu@xxxxxxxxxxxxxxx # [3]
Link: https://github.com/intel-staging/tdx/tree/tdisp_phase1 # [4]

Please review. Any feedback is highly appreciated.

Thanks,
Baolu

Lu Baolu (5):
x86/virt/tdx: Add SEAMCALL wrappers for IOMMU setup/clear
x86/virt/tdx: Read global metadata for trusted IOMMU
iommu/vt-d: Add interfaces for trusted DMA initialization
iommu/vt-d: Add helpers to set up and tear down TDX extensions
iommu/vt-d: Reserve MSB of domain ID space for TDX module

drivers/iommu/intel/Kconfig | 14 ++
drivers/iommu/intel/Makefile | 1 +
arch/x86/include/asm/tdx.h | 3 +
arch/x86/include/asm/tdx_global_metadata.h | 5 +
arch/x86/virt/vmx/tdx/tdx.h | 2 +
drivers/iommu/intel/iommu.h | 24 ++
include/linux/dmar.h | 12 +
arch/x86/virt/vmx/tdx/tdx.c | 56 +++++
arch/x86/virt/vmx/tdx/tdx_global_metadata.c | 20 ++
drivers/iommu/intel/dmar.c | 3 +
drivers/iommu/intel/iommu.c | 11 +
drivers/iommu/intel/tdxc.c | 248 ++++++++++++++++++++
12 files changed, 399 insertions(+)
create mode 100644 drivers/iommu/intel/tdxc.c

--
2.43.0