linux/drivers/vfio
Shay Drory d6e18a4bec vfio/mlx5: Fallback to STOP_COPY upon specific PRE_COPY error
Before a SAVE command is issued, a QUERY command is issued in order to
know the device data size.
In case PRE_COPY is used, the above commands are issued while the device
is running. Thus, it is possible that between the QUERY and the SAVE
commands the state of the device will be changed significantly and thus
the SAVE will fail.

Currently, if a SAVE command is failing, the driver will fail the
migration. In the above case, don't fail the migration, but don't allow
for new SAVEs to be executed while the device is in a RUNNING state.
Once the device will be moved to STOP_COPY, SAVE can be executed again
and the full device state will be read.

Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20221206083438.37807-14-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2022-12-06 12:36:44 -07:00
..
fsl-mc vfio: Remove vfio_free_device 2022-11-10 11:30:23 -07:00
mdev vfio/mdev: add mdev available instance checking to the core 2022-10-04 12:06:58 -06:00
pci vfio/mlx5: Fallback to STOP_COPY upon specific PRE_COPY error 2022-12-06 12:36:44 -07:00
platform vfio: Remove vfio_free_device 2022-11-10 11:30:23 -07:00
container.c vfio: Change vfio_group->group_rwsem to a mutex 2022-10-04 12:06:58 -06:00
iova_bitmap.c vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries 2022-12-02 10:09:25 -07:00
Kconfig vfio: Fold vfio_virqfd.ko into vfio.ko 2022-12-05 12:04:32 -07:00
Makefile vfio: Fold vfio_virqfd.ko into vfio.ko 2022-12-05 12:04:32 -07:00
vfio_iommu_spapr_tce.c vfio: Move vfio_spapr_iommu_eeh_ioctl into vfio_iommu_spapr_tce.c 2022-12-05 12:04:32 -07:00
vfio_iommu_type1.c Merge branches 'apple/dart', 'arm/mediatek', 'arm/omap', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-09-26 15:52:31 +02:00
vfio_main.c vfio: Extend the device migration protocol with PRE_COPY 2022-12-06 12:36:43 -07:00
vfio.h vfio: Fold vfio_virqfd.ko into vfio.ko 2022-12-05 12:04:32 -07:00
virqfd.c vfio: Fold vfio_virqfd.ko into vfio.ko 2022-12-05 12:04:32 -07:00