qemu-e2k/hw/9pfs
Greg Kurz 6cecf09373 virtio-9p-device: add minimal unrealize handler
Since commit 4652f1640e "virtio-9p: add savevm
handlers", if the user hot-unplugs a quiescent 9p device and live
migrates, the source QEMU crashes before migration completetion...
This happens because virtio-9p devices have a realize handler which
calls virtio_init() and register_savevm().  Both calls store pointers
to the device internals, that get dereferenced during migration even
if the device got unplugged.

This patch simply adds an unrealize handler to perform minimal
cleanup and avoid the crash.  Hot unplug of non-quiescent 9p devices
is still not supported in QEMU, and not supported by linux guests
either.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20151208155457.27775.69441.stgit@bahia.huguette.org
[PMM: rewrapped long lines in commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-12-10 10:46:22 +00:00
..
codir.c coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00
cofile.c coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00
cofs.c coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00
coxattr.c coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00
Makefile.objs Remove libhw 2012-10-05 16:07:49 -05:00
virtio-9p-coth.c virtio-9p: use QEMU thread pool 2015-11-30 12:36:12 +01:00
virtio-9p-coth.h virtio-9p: use QEMU thread pool 2015-11-30 12:36:12 +01:00
virtio-9p-device.c virtio-9p-device: add minimal unrealize handler 2015-12-10 10:46:22 +00:00
virtio-9p-handle.c 9pfs: Fix warnings from Sparse 2015-03-19 11:11:55 +03:00
virtio-9p-local.c 9pfs: Fix warnings from Sparse 2015-03-19 11:11:55 +03:00
virtio-9p-posix-acl.c hw/9pfs/virtio-9p-posix-acl: Fix out-of-bounds access 2015-03-13 14:01:24 +05:30
virtio-9p-proxy.c 9pfs: Fix warnings from Sparse 2015-03-19 11:11:55 +03:00
virtio-9p-proxy.h hw/9pfs: Proxy getversion 2012-01-04 20:20:55 +05:30
virtio-9p-synth.c rcu: introduce RCU-enabled QLIST 2015-02-16 17:30:19 +01:00
virtio-9p-synth.h janitor: add guards to headers 2012-12-19 08:31:31 +01:00
virtio-9p-xattr-user.c hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation 2014-03-04 00:57:57 +05:30
virtio-9p-xattr.c hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation 2014-03-04 00:57:57 +05:30
virtio-9p-xattr.h hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation 2014-03-04 00:57:57 +05:30
virtio-9p.c virtio-9p: fix any_layout 2015-07-27 11:24:48 +03:00
virtio-9p.h coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00