summary refs log tree commit diff stats
path: root/hw/vfio/migration.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@redhat.com>2024-05-16 14:46:52 +0200
committerCédric Le Goater <clg@redhat.com>2024-05-16 16:59:19 +0200
commit019d9e6cc408f402dd27d6884ac7b742e0e4f99e (patch)
tree1006fea58cb7cb34daf970a45c4363c88615a20e /hw/vfio/migration.c
parent0f21358f33f0b9aa1b8dd5e33de92118186999db (diff)
downloadfocaccia-qemu-019d9e6cc408f402dd27d6884ac7b742e0e4f99e.tar.gz
focaccia-qemu-019d9e6cc408f402dd27d6884ac7b742e0e4f99e.zip
migration: Extend migration_file_set_error() with Error* argument
Use it to update the current error of the migration stream if
available and if not, simply print out the error. Next changes will
update with an error to report.

Reviewed-by: Avihai Horon <avihaih@nvidia.com>
Acked-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/migration.c')
-rw-r--r--hw/vfio/migration.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 06ae40969b..bf2fd0759b 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -726,7 +726,7 @@ static void vfio_vmstate_change_prepare(void *opaque, bool running,
          * Migration should be aborted in this case, but vm_state_notify()
          * currently does not support reporting failures.
          */
-        migration_file_set_error(ret);
+        migration_file_set_error(ret, NULL);
     }
 
     trace_vfio_vmstate_change_prepare(vbasedev->name, running,
@@ -756,7 +756,7 @@ static void vfio_vmstate_change(void *opaque, bool running, RunState state)
          * Migration should be aborted in this case, but vm_state_notify()
          * currently does not support reporting failures.
          */
-        migration_file_set_error(ret);
+        migration_file_set_error(ret, NULL);
     }
 
     trace_vfio_vmstate_change(vbasedev->name, running, RunState_str(state),