diff options
author | Steve Sistare <steven.sistare@oracle.com> | 2024-03-11 10:48:55 -0700 |
---|---|---|
committer | Peter Xu <peterx@redhat.com> | 2024-03-11 16:28:59 -0400 |
commit | 20c64c8a51a477115589b3a9f7304e423dcbe7f2 (patch) | |
tree | 6d721b0f1f455dd4fa1bb62897513c739e23323c /hw/vfio/common.c | |
parent | 9bb630c6ee6e930e1c521829681365e5672bbd99 (diff) | |
download | qemu-20c64c8a51a477115589b3a9f7304e423dcbe7f2.zip qemu-20c64c8a51a477115589b3a9f7304e423dcbe7f2.tar.gz qemu-20c64c8a51a477115589b3a9f7304e423dcbe7f2.tar.bz2 |
migration: migration_file_set_error
Define and export migration_file_set_error to eliminate a dependency
on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-9-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'hw/vfio/common.c')
-rw-r--r-- | hw/vfio/common.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c index de01068..b44204e 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -39,7 +39,6 @@ #include "sysemu/runstate.h" #include "trace.h" #include "qapi/error.h" -#include "migration/migration.h" #include "migration/misc.h" #include "migration/blocker.h" #include "migration/qemu-file.h" @@ -150,14 +149,8 @@ bool vfio_viommu_preset(VFIODevice *vbasedev) static void vfio_set_migration_error(int err) { - MigrationState *ms = migrate_get_current(); - if (migration_is_setup_or_active()) { - WITH_QEMU_LOCK_GUARD(&ms->qemu_file_lock) { - if (ms->to_dst_file) { - qemu_file_set_error(ms->to_dst_file, err); - } - } + migration_file_set_error(err); } } |