History

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.

Shameer Kolothum committed 8 months ago

Commit a11661a1 parent a82efb82 files · +8 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/iommufd.h+4−0
@@ -695,11 +695,15 @@ enum iommu_hw_info_type { · 694 unmodified lines
695695 * @IOMMU_HW_CAP_PCI_PASID_PRIV: Privileged Mode Supported, user ignores it
696696 * when the struct
697697 * iommu_hw_info::out_max_pasid_log2 is zero.
698+ * @IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED: ATS is not supported or cannot be used
699+ * on this device (absence implies ATS
700+ * may be enabled)
698701 */
699702 enum iommufd_hw_capabilities {
700703 IOMMU_HW_CAP_DIRTY_TRACKING = 1 << 0,
701704 IOMMU_HW_CAP_PCI_PASID_EXEC = 1 << 1,
702705 IOMMU_HW_CAP_PCI_PASID_PRIV = 1 << 2,
706+ IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED = 1 << 3,
703707 };
704708
705709 /**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t