kernel_samsung_a53x/drivers/vfio
Alex Williamson 9d2e59af03 vfio: Introduce interface to flush virqfd inject workqueue
[ Upstream commit b620ecbd17a03cacd06f014a5d3f3a11285ce053 ]

In order to synchronize changes that can affect the thread callback,
introduce an interface to force a flush of the inject workqueue.  The
irqfd pointer is only valid under spinlock, but the workqueue cannot
be flushed under spinlock.  Therefore the flush work for the irqfd is
queued under spinlock.  The vfio_irqfd_cleanup_wq workqueue is re-used
for queuing this work such that flushing the workqueue is also ordered
relative to shutdown.

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20240308230557.805580-4-alex.williamson@redhat.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 09:22:45 +01:00
..
fsl-mc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdev Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci vfio/pci: Lock external INTx masking ops 2024-11-19 09:22:45 +01:00
platform vfio/platform: Disable virqfds on cleanup 2024-11-19 09:22:35 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio_iommu_spapr_tce.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio_iommu_type1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio_spapr_eeh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virqfd.c vfio: Introduce interface to flush virqfd inject workqueue 2024-11-19 09:22:45 +01:00