Re: [PATCH v3 5/7] iommu: Introduce TDISP T=0 state for confidential IOMMUs

From: Jason Gunthorpe

Date: Thu Nov 26 2026 - 14:53:58 EST


On Thu, Nov 26, 2026 at 11:41:38AM -0800, Nicolin Chen wrote:
> On Thu, Nov 26, 2026 at 10:57:15AM -0400, Jason Gunthorpe wrote:
> > On Wed, Nov 25, 2026 at 08:49:30PM -0800, Nicolin Chen wrote:
> > > On Wed, Nov 25, 2026 at 02:07:45PM -0400, Jason Gunthorpe wrote:
> > > > Though I am wondering if we really need the ATS stuff. Why do we need
> > > > that? The pci_ats_required() in the hypervisor should force ATS since
> > > > the hypervisor is not going to construct a vSTE or use a nesting
> > > > domain that would inhibit that? Can we just drop this whole patch?
> > >
> > > Ah, you're right. It was added for non-pci_ats_required (non-CXL)
> > > cases where the ATS state needs to be in sync with the hypervisor.
> > >
> > > However, the justification/usecase here is pci_ats_required alone.
> > >
> > > One small concern is whether VMM always exposes the underlying ATS
> > > state or not to the guest VM. QEMU seems to do so. I did a test by
> > > dropping the patch: lspci in the VM still shows: ATSCtl: Enable+
> >
> > It probably shouldn't do that, but it is also not harmful. The guest
> > PCI controls should be fully ignored by the VMM..
>
> Would a PCI device driver (running in the guest) check the guest
> level ATSCtl state for its ATS pathway?
>
> If VMM is not supposed to read through the physical config space,
> without this patch, I suppose ATSCtl would be disabled and ATS on
> RID might not be functional?

VMM does not bind guest vPCI ATS Control to the physical ATS control.

ATS is controlled through the vSTE only on all arches.

Without a vIOMMU ATS is controlled entirely by host preference ie
always on if available usualy.

There is no need for the guest to read or write the vPCI ATS config
space, but it does anyhow because it doesn't know it is a guest.

Jason