qemu-devel
[Top][All Lists]
Advanced

[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: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH] virtio: check for vring setup in virtio_queue_empty
Date: Mon, 27 Feb 2017 16:39:19 +0100

On Thu, 23 Feb 2017 09:51:30 +0100
Paolo Bonzini <address@hidden> 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: Cornelia Huck <address@hidden>

...although it is not sufficient...




reply via email to

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