History

iommu/tegra241-cmdqv: Add IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV support

Add a new vEVENTQ type for VINTFs that are assigned to the user space. Simply report the two 64-bit LVCMDQ_ERR_MAPs register values.

Nicolin Chen committed 1 year ago

Commit 32b2d3a1 parent 4dc0d122 files · +37 −0Browse files

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

Unified · Split

include/uapi/linux/iommufd.h+15−0
@@ -1146,10 +1146,12 @@ struct iommufd_vevent_header { · 1145 unmodified lines
11461146 * enum iommu_veventq_type - Virtual Event Queue Type
11471147 * @IOMMU_VEVENTQ_TYPE_DEFAULT: Reserved for future use
11481148 * @IOMMU_VEVENTQ_TYPE_ARM_SMMUV3: ARM SMMUv3 Virtual Event Queue
1149+ * @IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV Extension IRQ
11491150 */
11501151 enum iommu_veventq_type {
11511152 IOMMU_VEVENTQ_TYPE_DEFAULT = 0,
11521153 IOMMU_VEVENTQ_TYPE_ARM_SMMUV3 = 1,
1154+ IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV = 2,
11531155 };
11541156
11551157 /**
@@ -1173,6 +1175,19 @@ struct iommu_vevent_arm_smmuv3 { · 17 unmodified lines
11731175 __aligned_le64 evt[4];
11741176 };
11751177
1178+/**
1179+ * struct iommu_vevent_tegra241_cmdqv - Tegra241 CMDQV IRQ
1180+ * (IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV)
1181+ * @lvcmdq_err_map: 128-bit logical vcmdq error map, little-endian.
1182+ * (Refer to register LVCMDQ_ERR_MAPs per VINTF )
1183+ *
1184+ * The 128-bit register value from HW exclusively reflect the error bits for a
1185+ * Virtual Interface represented by a vIOMMU object. Read and report directly.
1186+ */
1187+struct iommu_vevent_tegra241_cmdqv {
1188+ __aligned_le64 lvcmdq_err_map[2];
1189+};
1190+
11761191 /**
11771192 * struct iommu_veventq_alloc - ioctl(IOMMU_VEVENTQ_ALLOC)
11781193 * @size: sizeof(struct iommu_veventq_alloc)