aboutsummaryrefslogtreecommitdiff
path: root/migration/savevm.c
diff options
context:
space:
mode:
authorLukas Straub <lukasstraub2@web.de>2020-12-28 16:08:52 +0100
committerMarkus Armbruster <armbru@redhat.com>2021-01-13 10:21:17 +0100
commitb5eea99ec2f5cf6fa0ac12a757c8873b1d2a73a4 (patch)
tree1da5e550295be9561b50181d937f17266b2f3c13 /migration/savevm.c
parent8ee4480692fe750f8ee7bcaa432250225da88a85 (diff)
downloadqemu-b5eea99ec2f5cf6fa0ac12a757c8873b1d2a73a4.zip
qemu-b5eea99ec2f5cf6fa0ac12a757c8873b1d2a73a4.tar.gz
qemu-b5eea99ec2f5cf6fa0ac12a757c8873b1d2a73a4.tar.bz2
migration: Add yank feature
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub <lukasstraub2@web.de> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <484c6a14cc2506bebedd5a237259b91363ff8f88.1609167865.git.lukasstraub2@web.de> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'migration/savevm.c')
-rw-r--r--migration/savevm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index 27e8428..4f3b69e 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -62,6 +62,7 @@
#include "migration/colo.h"
#include "qemu/bitmap.h"
#include "net/announce.h"
+#include "qemu/yank.h"
const unsigned int postcopy_ram_discard_version;
@@ -3006,6 +3007,10 @@ int load_snapshot(const char *name, Error **errp)
qemu_system_reset(SHUTDOWN_CAUSE_NONE);
mis->from_src_file = f;
+ if (!yank_register_instance(MIGRATION_YANK_INSTANCE, errp)) {
+ ret = -EINVAL;
+ goto err_drain;
+ }
aio_context_acquire(aio_context);
ret = qemu_loadvm_state(f);
migration_incoming_state_destroy();