linux/drivers/vfio/pci
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
..
Kconfig vfio/pci: zap_vma_ptes() needs MMU 2021-05-24 13:40:13 -06:00
Makefile vfio/pci: remove vfio_pci_nvlink2 2021-04-06 11:54:13 -06:00
trace.h vfio/pci: Cleanup license mess 2019-01-22 11:06:05 -07:00
vfio_pci_config.c vfio/pci: Fix error return code in vfio_ecap_init() 2021-05-24 12:14:18 -06:00
vfio_pci_igd.c vfio/pci: Make vfio_pci_regops->rw() return ssize_t 2021-08-02 15:23:42 -06:00
vfio_pci_intrs.c vfio/pci: Clear token on bypass registration failure 2020-10-19 07:13:55 -06:00
vfio_pci_private.h vfio/pci: Move to the device set infrastructure 2021-08-11 09:50:11 -06:00
vfio_pci_rdwr.c vfio/pci: Implement ioeventfd thread handler for contended memory lock 2020-11-03 11:07:40 -07:00
vfio_pci_zdev.c vfio-pci/zdev: fix possible segmentation fault issue 2021-02-02 09:06:02 -07:00
vfio_pci.c vfio/pci: Reorganize VFIO_DEVICE_PCI_HOT_RESET to use the device set 2021-08-11 09:50:11 -06:00