aboutsummaryrefslogtreecommitdiff
path: root/migration/savevm.c
diff options
context:
space:
mode:
authorGreg Kurz <gkurz@linux.vnet.ibm.com>2016-05-04 21:44:19 +0200
committerAmit Shah <amit.shah@redhat.com>2016-05-23 21:44:08 +0530
commit24f3902b088cd4f2dbebfd90527b5d81d6a050e9 (patch)
tree86a48cceddb52cbf944f4d05ab3ff30d759cd7d1 /migration/savevm.c
parentd85a31d1f4d45462b7ca333190b5d14fad982f3e (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>
Diffstat (limited to 'migration/savevm.c')
-rw-r--r--migration/savevm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index 8546fdfae1..f8450fd0e9 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1170,7 +1170,7 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp)
MigrationState *ms = migrate_init(&params);
ms->to_dst_file = f;
- if (qemu_savevm_state_blocked(errp)) {
+ if (migration_is_blocked(errp)) {
return -EINVAL;
}