qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] virtio: reset region cache when on queue deletion


From: Jason Wang
Subject: Re: [PATCH 1/2] virtio: reset region cache when on queue deletion
Date: Thu, 26 Dec 2019 16:58:19 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0


On 2019/12/26 下午12:36, Yuri Benditovich wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1708480
Fix leak of region reference that prevents complete
device deletion on hot unplug.


More information is needed here, the bug said only q35 can meet this issue. What makes q35 different here?



Signed-off-by: Yuri Benditovich <address@hidden>
---
  hw/virtio/virtio.c | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 04716b5f6c..baadec8abc 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -2340,6 +2340,11 @@ void virtio_del_queue(VirtIODevice *vdev, int n)
      vdev->vq[n].vring.num_default = 0;
      vdev->vq[n].handle_output = NULL;
      vdev->vq[n].handle_aio_output = NULL;
+    /*
+     * with vring.num = 0 the queue will be ignored
+     * in later loops of region cache reset
+     */


I can't get the meaning of this comment.

Thanks


+    virtio_virtqueue_reset_region_cache(&vdev->vq[n]);
      g_free(vdev->vq[n].used_elems);
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]