Re: [PATCH 2/2] iommufd: Report ATS not supported status via IOMMU_GET_HW_INFO

From: Jason Gunthorpe

Date: Fri Mar 13 2026 - 12:53:41 EST


On Tue, Mar 03, 2026 at 03:03:48PM +0000, Shameer Kolothum wrote:
> If the IOMMU driver reports that ATS is not supported for a device, set
> the IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED flag in the returned hardware
> capabilities.
>
> When this flag is set, ATS is not supported and not used for the device.
>
> Signed-off-by: Shameer Kolothum <skolothumtho@xxxxxxxxxx>
> ---
> include/uapi/linux/iommufd.h | 3 +++
> drivers/iommu/iommufd/device.c | 3 +++
> 2 files changed, 6 insertions(+)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

> diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
> index 1dafbc552d37..d85a2d3e1b40 100644
> --- a/include/uapi/linux/iommufd.h
> +++ b/include/uapi/linux/iommufd.h
> @@ -695,11 +695,14 @@ enum iommu_hw_info_type {
> * @IOMMU_HW_CAP_PCI_PASID_PRIV: Privileged Mode Supported, user ignores it
> * when the struct
> * iommu_hw_info::out_max_pasid_log2 is zero.
> + * @IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED: ATS is not supported and not used on
> + * this device.

Same comment to clarify what this means. Does it mean ATS can be
turned on if the right HWPT is attached, or does it mean ATS is on
right now.

Jason