linux-stable/drivers/vfio/pci/mlx5
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
..
cmd.c vfio/mlx5: Fallback to STOP_COPY upon specific PRE_COPY error 2022-12-06 12:36:44 -07:00
cmd.h vfio/mlx5: Fallback to STOP_COPY upon specific PRE_COPY error 2022-12-06 12:36:44 -07:00
Kconfig
main.c vfio/mlx5: Fallback to STOP_COPY upon specific PRE_COPY error 2022-12-06 12:36:44 -07:00
Makefile