aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2017-10-20 10:05:53 +0100
committerJuan Quintela <quintela@redhat.com>2017-10-23 18:03:30 +0200
commit89cfc02cb6e3fdaf8ae246493ea51e75be2818c1 (patch)
tree14a08877ab2c98278eafa0e5d1c8dc52e2a6e076 /migration
parente91d8951d59d483f085f7650381b8e55a1a55e4c (diff)
downloadqemu-89cfc02cb6e3fdaf8ae246493ea51e75be2818c1.zip
qemu-89cfc02cb6e3fdaf8ae246493ea51e75be2818c1.tar.gz
qemu-89cfc02cb6e3fdaf8ae246493ea51e75be2818c1.tar.bz2
migration: migrate-continue
A new qmp command allows the caller to continue from a given paused state. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c
index ef84d2c..90bfdc3 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1374,6 +1374,17 @@ void qmp_migrate_cancel(Error **errp)
migrate_fd_cancel(migrate_get_current());
}
+void qmp_migrate_continue(MigrationStatus state, Error **errp)
+{
+ MigrationState *s = migrate_get_current();
+ if (s->state != state) {
+ error_setg(errp, "Migration not in expected state: %s",
+ MigrationStatus_str(s->state));
+ return;
+ }
+ qemu_sem_post(&s->pause_sem);
+}
+
void qmp_migrate_set_cache_size(int64_t value, Error **errp)
{
MigrationState *s = migrate_get_current();