summaryrefslogtreecommitdiff
path: root/include/linux/iommufd.h
diff options
context:
space:
mode:
authorYi Liu <yi.l.liu@intel.com>2023-07-18 03:55:37 -0700
committerAlex Williamson <alex.williamson@redhat.com>2023-07-25 10:17:55 -0600
commit78d3df457ae5eb53ef1f295a8a704691abea1b1d (patch)
tree160fde0446de63145f237bcbdbdfedc00482ba11 /include/linux/iommufd.h
parent86b0a96c2952fa07b782b37f6ec783ace63a01a6 (diff)
iommufd: Add helper to retrieve iommufd_ctx and devid
This is needed by the vfio-pci driver to report affected devices in the hot-reset for a given device. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Tested-by: Yanting Jiang <yanting.jiang@intel.com> Tested-by: Terrence Xu <terrence.xu@intel.com> Tested-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Link: https://lore.kernel.org/r/20230718105542.4138-6-yi.l.liu@intel.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/linux/iommufd.h')
-rw-r--r--include/linux/iommufd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iommufd.h b/include/linux/iommufd.h
index f241bafa03da..68defed9ea48 100644
--- a/include/linux/iommufd.h
+++ b/include/linux/iommufd.h
@@ -25,6 +25,9 @@ void iommufd_device_unbind(struct iommufd_device *idev);
int iommufd_device_attach(struct iommufd_device *idev, u32 *pt_id);
void iommufd_device_detach(struct iommufd_device *idev);
+struct iommufd_ctx *iommufd_device_to_ictx(struct iommufd_device *idev);
+u32 iommufd_device_to_id(struct iommufd_device *idev);
+
struct iommufd_access_ops {
u8 needs_pin_pages : 1;
void (*unmap)(void *data, unsigned long iova, unsigned long length);