summaryrefslogtreecommitdiffstats
path: root/hw/net/virtio-net.c
diff options
context:
space:
mode:
authorYuri Benditovich2019-12-26 05:36:49 +0100
committerMichael S. Tsirkin2020-01-06 18:04:51 +0100
commitd945d9f1731244ef341f74ede93120fc9de35913 (patch)
tree477def5be2839d6bb7cadf2a7be98eb960ea0657 /hw/net/virtio-net.c
parentvirtio: reset region cache when on queue deletion (diff)
downloadqemu-d945d9f1731244ef341f74ede93120fc9de35913.tar.gz
qemu-d945d9f1731244ef341f74ede93120fc9de35913.tar.xz
qemu-d945d9f1731244ef341f74ede93120fc9de35913.zip
virtio-net: delete also control queue when TX/RX deleted
https://bugzilla.redhat.com/show_bug.cgi?id=1708480 If the control queue is not deleted together with TX/RX, it later will be ignored in freeing cache resources and hot unplug will not be completed. Cc: qemu-stable@nongnu.org Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Message-Id: <20191226043649.14481-3-yuri.benditovich@daynix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
-rw-r--r--hw/net/virtio-net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index db3d7c38e6..f325440d01 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -3101,7 +3101,8 @@ static void virtio_net_device_unrealize(DeviceState *dev, Error **errp)
for (i = 0; i < max_queues; i++) {
virtio_net_del_queue(n, i);
}
-
+ /* delete also control vq */
+ virtio_del_queue(vdev, max_queues * 2);
qemu_announce_timer_del(&n->announce_timer, false);
g_free(n->vqs);
qemu_del_nic(n->nic);