diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2022-10-07 16:04:39 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2022-10-07 16:10:52 +0200 |
commit | 4b22ef042d6f54a6e5899555f2db71749133eca8 (patch) | |
tree | 10838fcdc932cb2db6cacbd5764b47f5e5f51278 /drivers/vfio/pci | |
parent | vfio: Change vfio_group->group_rwsem to a mutex (diff) | |
download | linux-4b22ef042d6f54a6e5899555f2db71749133eca8.tar.xz linux-4b22ef042d6f54a6e5899555f2db71749133eca8.zip |
vfio: Add vfio_file_is_group()
This replaces uses of vfio_file_iommu_group() which were only detecting if
the file is a VFIO file with no interest in the actual group.
The only remaning user of vfio_file_iommu_group() is in KVM for the SPAPR
stuff. It passes the iommu_group into the arch code through kvm for some
reason.
Tested-by: Matthew Rosato <mjrosato@linux.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/1-v2-15417f29324e+1c-vfio_group_disassociate_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci')
-rw-r--r-- | drivers/vfio/pci/vfio_pci_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c index 59a28251bb0b..badc9d828cac 100644 --- a/drivers/vfio/pci/vfio_pci_core.c +++ b/drivers/vfio/pci/vfio_pci_core.c @@ -1313,7 +1313,7 @@ static int vfio_pci_ioctl_pci_hot_reset(struct vfio_pci_core_device *vdev, } /* Ensure the FD is a vfio group FD.*/ - if (!vfio_file_iommu_group(file)) { + if (!vfio_file_is_group(file)) { fput(file); ret = -EINVAL; break; |