linux-stable/drivers/vfio
Jason Gunthorpe 50d63b5bbf vfio: Change vfio_external_user_iommu_id() to vfio_file_iommu_group()
The only caller wants to get a pointer to the struct iommu_group
associated with the VFIO group file. Instead of returning the group ID
then searching sysfs for that string to get the struct iommu_group just
directly return the iommu_group pointer already held by the vfio_group
struct.

It already has a safe lifetime due to the struct file kref, the vfio_group
and thus the iommu_group cannot be destroyed while the group file is open.

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/3-v3-f7729924a7ea+25e33-vfio_kvm_no_group_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2022-05-13 10:14:19 -06:00
..
fsl-mc vfio: Set DMA ownership for VFIO devices 2022-04-28 15:32:20 +02:00
mdev vfio/mdev: Use the driver core to create the 'remove' file 2022-04-21 07:36:56 -04:00
pci Merge remote-tracking branch 'iommu/vfio-notifier-fix' into v5.19/vfio/next 2022-05-13 10:04:22 -06:00
platform vfio: Set DMA ownership for VFIO devices 2022-04-28 15:32:20 +02:00
Kconfig vfio: Use kconfig if XX/endif blocks instead of repeating 'depends on' 2021-08-26 10:36:51 -06:00
Makefile vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices 2020-10-07 14:17:33 -06:00
vfio.c vfio: Change vfio_external_user_iommu_id() to vfio_file_iommu_group() 2022-05-13 10:14:19 -06:00
vfio.h vfio: clean up the check for mediated device in vfio_iommu_type1 2021-09-30 12:46:44 -06:00
vfio_iommu_spapr_tce.c vfio/spapr_tce: reject mediated devices 2021-09-30 12:46:44 -06:00
vfio_iommu_type1.c vfio/iommu_type1: replace kfree with kvfree 2021-12-21 12:30:34 -07:00
vfio_spapr_eeh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
virqfd.c vfio/virqfd: Drain events from eventfd in virqfd_wakeup() 2020-11-15 09:49:10 -05:00