aboutsummaryrefslogtreecommitdiff
path: root/include/migration
diff options
context:
space:
mode:
authorGreg Kurz <gkurz@linux.vnet.ibm.com>2016-05-04 21:44:19 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2016-08-05 13:29:25 -0500
commite81a24a7487e502762bcd1f17dce24e8d7c35bc0 (patch)
tree88deb767af0b2ce03ff6aa54becada78799d9ce7 /include/migration
parentfb26337641ef7e68c8e633139c18b7832978cd47 (diff)
savevm: fail if migration blockers are present
QEMU has currently two ways to prevent migration to occur: - migration blocker when it depends on runtime state - VMStateDescription.unmigratable when migration is not supported at all This patch gathers all the logic into a single function to be called from both the savevm and the migrate paths. This fixes a bug with 9p, at least, where savevm would succeed and the following would happen in the guest after loadvm: $ ls /host ls: cannot access /host: Protocol error With this patch: (qemu) savevm foo Migration is disabled when VirtFS export path '/' is mounted in the guest using mount_tag 'host' Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <146239057139.11271.9011797645454781543.stgit@bahia.huguette.org> [Update subject according to Paolo's suggestion - Amit] Signed-off-by: Amit Shah <amit.shah@redhat.com> (cherry picked from commit 24f3902b088cd4f2dbebfd90527b5d81d6a050e9) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'include/migration')
-rw-r--r--include/migration/migration.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/migration/migration.h b/include/migration/migration.h
index ac2c12c2a5..9e36a97fc5 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -210,6 +210,7 @@ int migrate_fd_close(MigrationState *s);
void add_migration_state_change_notifier(Notifier *notify);
void remove_migration_state_change_notifier(Notifier *notify);
MigrationState *migrate_init(const MigrationParams *params);
+bool migration_is_blocked(Error **errp);
bool migration_in_setup(MigrationState *);
bool migration_has_finished(MigrationState *);
bool migration_has_failed(MigrationState *);