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

From: Shameer Kolothum Thodi

Date: Fri Mar 13 2026 - 13:10:55 EST




> -----Original Message-----
> From: Jason Gunthorpe <jgg@xxxxxxxx>
> Sent: 13 March 2026 16:51
> To: Shameer Kolothum Thodi <skolothumtho@xxxxxxxxxx>
> Cc: iommu@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; joro@xxxxxxxxxx;
> will@xxxxxxxxxx; robin.murphy@xxxxxxx; baolu.lu@xxxxxxxxxxxxxxx;
> kevin.tian@xxxxxxxxx; Nicolin Chen <nicolinc@xxxxxxxxxx>; Nathan Chen
> <nathanc@xxxxxxxxxx>; Matt Ochs <mochs@xxxxxxxxxx>; Krishnakant Jaju
> <kjaju@xxxxxxxxxx>
> Subject: Re: [PATCH 2/2] iommufd: Report ATS not supported status via
> IOMMU_GET_HW_INFO
>
> External email: Use caution opening links or attachments
>
>
> 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.

Since this one is negative : ATS is not supported and cannot be used.

Thanks,
Shameer