[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/14] virtio-balloon: discard virtqueue element on r
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 07/14] virtio-balloon: discard virtqueue element on reset |
Date: |
Fri, 9 Sep 2016 23:34:23 +0300 |
From: Ladi Prosek <address@hidden>
The one pending element is being freed but not discarded on device
reset, which causes svq->inuse to creep up, eventually hitting the
"Virtqueue size exceeded" error.
Properly discarding the element on device reset makes sure that its
buffers are unmapped and the inuse counter stays balanced.
Cc: Michael S. Tsirkin <address@hidden>
Cc: Roman Kagan <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Signed-off-by: Ladi Prosek <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/virtio/virtio-balloon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 5af429a..ad4189a 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -463,6 +463,7 @@ static void virtio_balloon_device_reset(VirtIODevice *vdev)
VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
if (s->stats_vq_elem != NULL) {
+ virtqueue_discard(s->svq, s->stats_vq_elem, 0);
g_free(s->stats_vq_elem);
s->stats_vq_elem = NULL;
}
--
MST
- [Qemu-devel] [PULL 00/14] virtio,vhost,pc: fixes and updates, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 01/14] virtio: Tell the user what went wrong when event_notifier_init failed, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 02/14] virtio-pci: use size from correct structure, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 03/14] pc: Add 2.8 machine, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 04/14] target-i386: present virtual L3 cache info for vcpus, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 06/14] virtio: zero vq->inuse in virtio_reset(), Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 05/14] virtio-pci: reduce modern_mem_bar size, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 08/14] virtio: add virtqueue_rewind(), Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 09/14] virtio-balloon: fix stats vq migration, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 07/14] virtio-balloon: discard virtqueue element on reset,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 10/14] virtio-pci: error out when both legacy and modern modes are disabled, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 14/14] tests/acpi: speedup acpi tests, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 13/14] vhost-vsock: add virtio sockets device, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 12/14] virtio-pci: minor refactoring, Michael S. Tsirkin, 2016/09/09
- [Qemu-devel] [PULL 11/14] vhost: don't set vring call if no vector, Michael S. Tsirkin, 2016/09/09
- Re: [Qemu-devel] [PULL 00/14] virtio,vhost,pc: fixes and updates, Michael S. Tsirkin, 2016/09/09