qemu/migration
Greg Kurz e81a24a748 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 24f3902b08)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2016-08-05 13:29:25 -05:00
..
block.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
exec.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
fd.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
Makefile.objs postcopy: OS support test 2015-11-10 15:00:26 +01:00
migration.c savevm: fail if migration blockers are present 2016-08-05 13:29:25 -05:00
postcopy-ram.c migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD 2016-02-26 15:05:25 +05:30
qemu-file-buf.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
qemu-file-internal.h Split struct QEMUFile out 2014-12-16 17:47:36 +05:30
qemu-file-stdio.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
qemu-file-unix.c osdep: remove use of socket_error() from all code 2016-03-10 17:19:34 +00:00
qemu-file.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
ram.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
rdma.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
savevm.c savevm: fail if migration blockers are present 2016-08-05 13:29:25 -05:00
tcp.c osdep: remove use of socket_error() from all code 2016-03-10 17:19:34 +00:00
unix.c migration: rename 'file' in MigrationState to 'to_dst_file' 2016-02-05 19:09:50 +05:30
vmstate.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
xbzrle.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00