]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommufd: Report ATS not supported status via IOMMU_GET_HW_INFO
authorShameer Kolothum <skolothumtho@nvidia.com>
Tue, 17 Mar 2026 11:16:03 +0000 (11:16 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Tue, 17 Mar 2026 13:05:05 +0000 (14:05 +0100)
commita11661a58c06f7fdfef03a368ef20d05a4ea4ed0
tree14fb2af46be3d93c7257d543d30e39dc3c33e3e6
parenta82efb8747d1b8a7c0a377dc79c2aac204eae788
iommufd: Report ATS not supported status via IOMMU_GET_HW_INFO

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.

This uses a negative flag for UAPI compatibility. Existing userspace
assumes ATS is supported if no flag is present. This also ensures that
new userspace works correctly on both old and new kernels, where a
zero value implies ATS support.

When this flag is set, ATS cannot be used for the device. When it is
clear, ATS may be enabled when an appropriate HWPT is attached.

Reviewed-by: Samiullah Khawaja <skhawaja@google.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/iommufd/device.c
include/uapi/linux/iommufd.h