qemu-patch-raspberry4/migration
Greg Kurz 24f3902b08 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>
2016-05-23 21:44:08 +05:30
..
block.c block: Avoid bs->blk in bdrv_next() 2016-05-19 16:45:31 +02: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 migration: Move qjson.[ch] to migration/ 2016-05-23 14:16:09 +05:30
migration.c savevm: fail if migration blockers are present 2016-05-23 21:44:08 +05:30
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
qjson.c migration/qjson: Drop gratuitous use of QOM 2016-05-23 14:16:12 +05:30
ram.c migration: Promote improved autoconverge commands out of experimental state 2016-05-23 16:05:09 +05:30
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-05-23 21:44:08 +05:30
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: Move qjson.[ch] to migration/ 2016-05-23 14:16:09 +05:30
xbzrle.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00