diff options
| author | Yi Liu <[email protected]> | 2023-07-18 03:55:37 -0700 |
|---|---|---|
| committer | Alex Williamson <[email protected]> | 2023-07-25 10:17:55 -0600 |
| commit | 78d3df457ae5eb53ef1f295a8a704691abea1b1d (patch) | |
| tree | 160fde0446de63145f237bcbdbdfedc00482ba11 /include/linux | |
| parent | 86b0a96c2952fa07b782b37f6ec783ace63a01a6 (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 <[email protected]>
Tested-by: Yanting Jiang <[email protected]>
Tested-by: Terrence Xu <[email protected]>
Tested-by: Zhenzhong Duan <[email protected]>
Signed-off-by: Yi Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/iommufd.h | 3 |
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); |