Re: [RFC PATCH 0/7] TDX: Enable PCIe link encryption for trusted I/O
From: Edgecombe, Rick P
Date: Fri Nov 20 2026 - 20:35:35 EST
On Mon, 2026-11-16 at 03:10 -0800, Chao Gao wrote:
> == Points for discussion ==
>
> 1. Raw DOE frames (See patch 3)
>
> The TDX module produces and consumes whole DOE objects, header included,
> but the PCI DOE API takes payloads only. The TDX-TSM driver therefore
> strips and rebuilds the DOE header itself. The code is small, but it
> puts DOE format details in a TSM driver, while the DOE core already
> handles them. A PCI DOE API that takes whole objects would keep them in
> the core, but the TDX-TSM driver would be its only user. Is such an API
> worth adding, or can we live with the DOE format handling in the
> TDX-TSM driver?
Why can't the TDX module return what we need? I guess AMD's firmware must
already return just the payload. Any idea what ARM will do?
>
> 2. Default IDE Stream (See patch 5)
>
> TDISP requires each device to have one default IDE stream [8]. The PCI
> core does not set Default Stream, so each TSM driver sets it itself, by
> looking up the device's IDE settings with pci_ide_to_settings() and
> setting default_stream. AMD's driver already does this, and the TDX-TSM
> driver does the same. Since the requirement is shared, the PCI core
> could instead set Default Stream on the device's TC0 stream, which is
> what TDISP expects. Should this move into the PCI core now, or can it be
> a later cleanup?
Not very sure on this point. Do you think the TSM drivers would never want to
pick a different default stream? If they did is there a point to moving it?
Might be better to wait to see how it shakes out.
>
> == Limitations ==
>
> The TDX module configures the root port's IDE settings and accepts
> only one address range for the stream. The root port therefore encrypts
> only traffic to the device's prefetchable MMIO range, and a device with
> no prefetchable range cannot be connected. We are evaluating whether
> this can be lifted.
Can you describe how it impacts the initial support here? Is it about enabling
more devices, or simplifying the initial code?
>
> Link encryption needs the root complex to enter a TDX mode, in which
> only the TDX module can configure the root port's IDE settings. The
> kernel opts in to this mode with TDH.IOMMU.SETUP. As its name suggests,
> this SEAMCALL also puts the IOMMU into TDX mode, which changes the
> IOMMU's behavior. Unfortunately, the two cannot be enabled separately,
> even though link encryption does not need IOMMU TDX mode.
Hmm, usually TDX is not easy to enable on a system. So users are not likely to
accidentally hit the existing limitations. So I'm thinking we just do the same
here. Document the limits and not add a switch. But the limits should be cleanly
handled and understood. Which is a WIP.