Re: [PATCH 1/2] iommu: Add device ATS not supported capability
From: Samiullah Khawaja
Date: Tue Mar 03 2026 - 19:16:33 EST
On Tue, Mar 03, 2026 at 07:28:35PM -0400, Jason Gunthorpe wrote:
On Tue, Mar 03, 2026 at 10:42:48PM +0000, Samiullah Khawaja wrote:
On Tue, Mar 03, 2026 at 03:03:47PM +0000, Shameer Kolothum wrote:
> PCIe ATS may be disabled by platform firmware, root complex limitations,
> or kernel policy even when a device advertises the ATS capability in its
> PCI configuration space.
>
> Add a new IOMMU_CAP_PCI_ATS_NOT_SUPPORTED capability to allow IOMMU
> drivers to report the effective ATS decision for a device.
nit: Maybe have IOMMU_CAP_PCI_ATS_SUPPORTED instead of the negative
variant of the capability. As this will affect only new users who might
check this capability so this does not really have to be negative.
It is deliberately negative for UAPI reasons.
Currently all userspace should assume ATS is supported.
The negative means new userspace that is sensitive will still work
correctly on old and new kernels that both return 0 as meaning ATS is
supported.
Ah yes, for old userspace missing cap means ATS is supported.
Perhaps this should be touched on in the commit message.
+1
Jason