diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-09-20 18:08:41 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-10-06 18:24:37 +0200 |
commit | 71ba71d9feeda1d0543bc2d96bbe6ed1164e7995 (patch) | |
tree | e8c8b6dc1498a4e1922064b69473c5e2354175fe /hw/virtio.c | |
parent | 54618a329e69e9b763149ed14688c7cb2e92fa59 (diff) | |
download | qemu-71ba71d9feeda1d0543bc2d96bbe6ed1164e7995.tar.gz qemu-71ba71d9feeda1d0543bc2d96bbe6ed1164e7995.tar.bz2 qemu-71ba71d9feeda1d0543bc2d96bbe6ed1164e7995.zip |
net: delay freeing peer host device
With -netdev, virtio devices present offload
features to guest, depending on the backend used.
Thus, removing host netdev peer while guest is
active leads to guest-visible inconsistency and/or crashes.
As a solution, while guest (NIC) peer device exists,
we prevent the host peer from being deleted.
This patch does this by adding peer_deleted flag in nic state:
if host device is going away while guest device
is around, set this flag and keep a shell of
the host device around for as long as guest device exists.
The link is put down so all packets will get discarded.
At the moment, management can detect that device deletion
is delayed by doing info net. As a next step, we shall add
commands that control hotplug/unplug without
removing the device, and an event to report that
guest has responded to the hotplug event.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/virtio.c')
0 files changed, 0 insertions, 0 deletions