From: Laszlo Ersek <lersek@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: kraxel@redhat.com, alex.williamson@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] virtio: check for vring setup in virtio_queue_empty
Date: Thu, 23 Feb 2017 11:30:08 +0100 [thread overview]
Message-ID: <b00e1a06-2de1-39fa-14d7-b9f600e749de@redhat.com> (raw)
In-Reply-To: <20170223085130.19954-1-pbonzini@redhat.com>
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 <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: Laszlo Ersek <lersek@redhat.com>
Thanks!
Laszlo
next prev parent reply other threads:[~2017-02-23 10:30 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 [this message]
2017-02-27 15:39 ` Cornelia Huck
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=b00e1a06-2de1-39fa-14d7-b9f600e749de@redhat.com \
--to=lersek@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=kraxel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).