vfio/common: Abort migration if dirty log start/stop/sync fails
commit236e0a45f507f1e4130fce9c8edb615bf5e0b00e
authorAvihai Horon <avihaih@nvidia.com>
Tue, 7 Mar 2023 12:54:38 +0000 (7 12:54 +0000)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 7 Mar 2023 14:20:32 +0000 (7 07:20 -0700)
tree6c2a02f0e6aacecdac9624d9dea91af169696ca5
parentdb9b829b15999b47f3e4f6fbede743b6f8686110
vfio/common: Abort migration if dirty log start/stop/sync fails

If VFIO dirty pages log start/stop/sync fails during migration,
migration should be aborted as pages dirtied by VFIO devices might not
be reported properly.

This is not the case today, where in such scenario only an error is
printed.

Fix it by aborting migration in the above scenario.

Fixes: 758b96b61d5c ("vfio/migrate: Move switch of dirty tracking into vfio_memory_listener")
Fixes: b6dd6504e303 ("vfio: Add vfio_listener_log_sync to mark dirty pages")
Fixes: 9e7b0442f23a ("vfio: Add ioctl to get dirty pages bitmap during dma unmap")
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20230307125450.62409-4-joao.m.martins@oracle.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/common.c