summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/iommu-priv.h
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2024-07-02 08:34:38 +0200
committerWill Deacon <will@kernel.org>2024-07-04 14:46:18 +0200
commit8519e689834a3ecf9a36332a9abb1844bd34e459 (patch)
treebf9b947d33c972b11efe210add348d7b002fc1e4 /drivers/iommu/iommu-priv.h
parentiommu: Add attach handle to struct iopf_group (diff)
downloadlinux-8519e689834a3ecf9a36332a9abb1844bd34e459.tar.xz
linux-8519e689834a3ecf9a36332a9abb1844bd34e459.zip
iommu: Extend domain attach group with handle support
Unlike the SVA case where each PASID of a device has an SVA domain attached to it, the I/O page faults are handled by the fault handler of the SVA domain. The I/O page faults for a user page table might be handled by the domain attached to RID or the domain attached to the PASID, depending on whether the PASID table is managed by user space or kernel. As a result, there is a need for the domain attach group interfaces to have attach handle support. The attach handle will be forwarded to the fault handler of the user domain. Add some variants of the domain attaching group interfaces so that they could support the attach handle and export them for use in IOMMUFD. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20240702063444.105814-5-baolu.lu@linux.intel.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/iommu/iommu-priv.h')
-rw-r--r--drivers/iommu/iommu-priv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/iommu/iommu-priv.h b/drivers/iommu/iommu-priv.h
index f1536a5ebb0d..c37801c32f33 100644
--- a/drivers/iommu/iommu-priv.h
+++ b/drivers/iommu/iommu-priv.h
@@ -31,4 +31,12 @@ void iommu_device_unregister_bus(struct iommu_device *iommu,
struct iommu_attach_handle *iommu_attach_handle_get(struct iommu_group *group,
ioasid_t pasid,
unsigned int type);
+int iommu_attach_group_handle(struct iommu_domain *domain,
+ struct iommu_group *group,
+ struct iommu_attach_handle *handle);
+void iommu_detach_group_handle(struct iommu_domain *domain,
+ struct iommu_group *group);
+int iommu_replace_group_handle(struct iommu_group *group,
+ struct iommu_domain *new_domain,
+ struct iommu_attach_handle *handle);
#endif /* __LINUX_IOMMU_PRIV_H */