On Thu, Dec 26, 2019 at 10:58 AM Jason Wang <jasow...@redhat.com> wrote: > > > 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? >
I do not have any ready answer, I did not dig into it too much. Probably Michael Tsirkin or Paolo Bonzini can answer without digging. > > > > > Signed-off-by: Yuri Benditovich <yuri.benditov...@daynix.com> > > --- > > 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); > > } > > >