linux/drivers/vfio
Jason Gunthorpe db44c17458 vfio/pci: Reorganize VFIO_DEVICE_PCI_HOT_RESET to use the device set
Like vfio_pci_dev_set_try_reset() this code wants to reset all of the
devices in the "reset group" which is the same membership as the device
set.

Instead of trying to reconstruct the device set from the PCI list go
directly from the device set's device list to execute the reset.

The same basic structure as vfio_pci_dev_set_try_reset() is used. The
'vfio_devices' struct is replaced with the device set linked list and we
simply sweep it multiple times under the lock.

This eliminates a memory allocation and get/put traffic and another
improperly locked test of pci_dev_driver().

Reviewed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Link: https://lore.kernel.org/r/10-v4-9ea22c5e6afb+1adf-vfio_reflck_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2021-08-11 09:50:11 -06:00
..
fsl-mc vfio/fsl: Move to the device set infrastructure 2021-08-11 09:50:11 -06:00
mdev vfio: Provide better generic support for open/release vfio_device_ops 2021-08-11 09:50:10 -06:00
pci vfio/pci: Reorganize VFIO_DEVICE_PCI_HOT_RESET to use the device set 2021-08-11 09:50:11 -06:00
platform vfio/platform: Use open_device() instead of open coding a refcnt scheme 2021-08-11 09:50:11 -06:00
Kconfig vfio: Use config not menuconfig for VFIO_NOIOMMU 2021-08-02 15:23:42 -06:00
Makefile vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices 2020-10-07 14:17:33 -06:00
vfio_iommu_spapr_tce.c vfio/spapr_tce: convert get_user_pages() --> pin_user_pages() 2020-07-27 13:43:38 -06:00
vfio_iommu_type1.c VFIO update for v5.14-rc1 2021-07-03 11:49:33 -07:00
vfio_spapr_eeh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vfio.c vfio: Provide better generic support for open/release vfio_device_ops 2021-08-11 09:50:10 -06:00
virqfd.c vfio/virqfd: Drain events from eventfd in virqfd_wakeup() 2020-11-15 09:49:10 -05:00