]> Git Repo - qemu.git/commitdiff
virtio-9p-device: add minimal unrealize handler
authorGreg Kurz <[email protected]>
Tue, 8 Dec 2015 15:54:57 +0000 (16:54 +0100)
committerPeter Maydell <[email protected]>
Thu, 10 Dec 2015 10:46:22 +0000 (10:46 +0000)
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 <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Message-id: 20151208155457[email protected]
[PMM: rewrapped long lines in commit message]
Signed-off-by: Peter Maydell <[email protected]>

No differences found
This page took 0.020454 seconds and 4 git commands to generate.