All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, alex.williamson@redhat.com,
	lersek@redhat.com, kraxel@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] virtio: check for vring setup in virtio_queue_empty
Date: Mon, 27 Feb 2017 16:39:19 +0100	[thread overview]
Message-ID: <20170227163919.7276be2b.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <20170223085130.19954-1-pbonzini@redhat.com>

On Thu, 23 Feb 2017 09:51:30 +0100
Paolo Bonzini <pbonzini@redhat.com> 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 <kraxel@redhat.com>
> Tested-by: Alex Williamson <alex.williamson@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  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 <cornelia.huck@de.ibm.com>

...although it is not sufficient...

      parent reply	other threads:[~2017-02-27 15:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23  8:51 [Qemu-devel] [PATCH] virtio: check for vring setup in virtio_queue_empty Paolo Bonzini
2017-02-23 10:30 ` Laszlo Ersek
2017-02-27 15:39 ` Cornelia Huck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170227163919.7276be2b.cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=alex.williamson@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.