vfio/migration: Add an Error** argument to vfio_migration_set_state()
authorCédric Le Goater <clg@redhat.com>
Thu, 16 May 2024 12:46:53 +0000 (14:46 +0200)
committerCédric Le Goater <clg@redhat.com>
Thu, 16 May 2024 14:59:19 +0000 (16:59 +0200)
commitfbd2469a66e3fd3f3457170928daf8098f207427
treea10b2467ec368f836b8cddd75ce1bb0dfec0debd
parent019d9e6cc408f402dd27d6884ac7b742e0e4f99e
vfio/migration: Add an Error** argument to vfio_migration_set_state()

Add an Error** argument to vfio_migration_set_state() and adjust
callers, including vfio_save_setup(). The error will be propagated up
to qemu_savevm_state_setup() where the save_setup() handler is
executed.

Modify vfio_vmstate_change_prepare() and vfio_vmstate_change() to
store a reported error under the migration stream if a migration is in
progress.

Reviewed-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/migration.c