[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] virtio: check for vring setup in virtio_queue_e
From: |
Laszlo Ersek |
Subject: |
Re: [Qemu-devel] [PATCH] virtio: check for vring setup in virtio_queue_empty |
Date: |
Thu, 23 Feb 2017 11:30:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 |
On 02/23/17 09:51, Paolo Bonzini wrote:
> If the vring has not been set up, there is nothing in the virtqueue.
> virtio_queue_host_notifier_aio_poll calls virtio_queue_empty even in
> this case; we have to filter it out just like virtio_queue_notify_aio_vq.
>
> Reported-by: Gerd Hoffmann <address@hidden>
> Tested-by: Alex Williamson <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> hw/virtio/virtio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index 23483c7..e487e36 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -2291,7 +2291,7 @@ static bool virtio_queue_host_notifier_aio_poll(void
> *opaque)
> VirtQueue *vq = container_of(n, VirtQueue, host_notifier);
> bool progress;
>
> - if (virtio_queue_empty(vq)) {
> + if (!vq->vring.desc || virtio_queue_empty(vq)) {
> return false;
> }
>
>
Tested-by: Laszlo Ersek <address@hidden>
Thanks!
Laszlo