aboutsummaryrefslogtreecommitdiff
path: root/hw
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
parent0f21358f33f0b9aa1b8dd5e33de92118186999db (diff)
downloadqemu-019d9e6cc408f402dd27d6884ac7b742e0e4f99e.zip
qemu-019d9e6cc408f402dd27d6884ac7b742e0e4f99e.tar.gz
qemu-019d9e6cc408f402dd27d6884ac7b742e0e4f99e.tar.bz2
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')
-rw-r--r--hw/vfio/common.c4
-rw-r--r--hw/vfio/migration.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index b5102f5..2c97de6 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -147,10 +147,10 @@ bool vfio_viommu_preset(VFIODevice *vbasedev)
return vbasedev->bcontainer->space->as != &address_space_memory;
}
-static void vfio_set_migration_error(int err)
+static void vfio_set_migration_error(int ret)
{
if (migration_is_setup_or_active()) {
- migration_file_set_error(err);
+ migration_file_set_error(ret, NULL);
}
}
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 06ae409..bf2fd07 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),