iommufd: Add helper to retrieve iommufd_ctx and devid
authorYi Liu <yi.l.liu@intel.com>
Tue, 18 Jul 2023 10:55:37 +0000 (03:55 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 25 Jul 2023 16:17:55 +0000 (10:17 -0600)
commit78d3df457ae5eb53ef1f295a8a704691abea1b1d
tree160fde0446de63145f237bcbdbdfedc00482ba11
parent86b0a96c2952fa07b782b37f6ec783ace63a01a6
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>
drivers/iommu/iommufd/device.c
include/linux/iommufd.h