diff options
author | Greg Kurz <gkurz@linux.vnet.ibm.com> | 2015-12-08 16:54:57 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-12-10 10:46:22 +0000 |
commit | 6cecf093735f2e5af7d0e29d957350320044e354 (patch) | |
tree | 3b408d682c195a52b72062091cb2cf1259c09cc4 /module-common.c | |
parent | c3626ca7df027dabf0568284360a23faf18f0884 (diff) | |
download | hqemu-6cecf093735f2e5af7d0e29d957350320044e354.zip hqemu-6cecf093735f2e5af7d0e29d957350320044e354.tar.gz |
virtio-9p-device: add minimal unrealize handler
Since commit 4652f1640e029e1f2433fa77ba6af285 "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>
Diffstat (limited to 'module-common.c')
0 files changed, 0 insertions, 0 deletions