All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Doug Goldstein <cardoe@cardoe.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] virtio: revert virtio_queue_set_notification() nesting
Date: Tue, 17 Jan 2017 00:31:03 +0100	[thread overview]
Message-ID: <47c3dbde-9ac2-31e1-4c06-a99d382a2160@redhat.com> (raw)
In-Reply-To: <20170112114612.14520-1-stefanha@redhat.com>

On 01/12/17 12:46, Stefan Hajnoczi wrote:
> The virtio_queue_set_notification() nesting introduced for AioContext polling
> raised an assertion with virtio-net (even in non-polling mode).  Converting
> virtio-net and virtio-crypto to use virtio_queue_set_notification() in a
> nesting fashion would be invasive and isn't worth it.
> 
> Patch 1 contains the revert to resolve the bug that Doug noticed.
> 
> Patch 2 is a less efficient but safe alternative.
> 
> Stefan Hajnoczi (2):
>   Revert "virtio: turn vq->notification into a nested counter"
>   virtio: disable notifications again after poll succeeded
> 
>  hw/virtio/virtio.c | 21 +++++++++------------
>  1 file changed, 9 insertions(+), 12 deletions(-)
> 

I confirm that with current master
(2ccede18bd24fce5db83fef3674563a1f256717b), my TCG aarch64 guest,
running ArmVirtQemu UEFI firmware, crashes with the following assertion
failure:

qemu-system-aarch64: .../hw/virtio/virtio.c:215:
virtio_queue_set_notification: Assertion `vq->notification_disabled > 0'
failed.

This guest does not use iPXE's UEFI SNP driver for virtio-net, instead
it uses OVMF's own, built-in VirtioNetDxe driver.

With both patches applied, everything works fine. The assertion failure
is gone, and I could ping a public host from the UEFI shell command line.

Tested-by: Laszlo Ersek <lersek@redhat.com>

I'm unsure if my use case covers polling mode, so it might be prudent to
add the tag to patch #1 only. I set the breakpoint that you gave Doug
(using "virsh start --paused" + attaching GDB to the running QEMU
process, before the firmware got any chance to execute), and the
breakpoint (virtio_queue_host_notifier_aio_poll_begin) didn't fire
during the test.

Thanks!
Laszlo

      parent reply	other threads:[~2017-01-16 23:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 11:46 [Qemu-devel] [PATCH 0/2] virtio: revert virtio_queue_set_notification() nesting Stefan Hajnoczi
2017-01-12 11:46 ` [Qemu-devel] [PATCH 1/2] Revert "virtio: turn vq->notification into a nested counter" Stefan Hajnoczi
2017-01-12 11:46 ` [Qemu-devel] [PATCH 2/2] virtio: disable notifications again after poll succeeded Stefan Hajnoczi
2017-01-13 15:53   ` Michael S. Tsirkin
2017-01-12 16:57 ` [Qemu-devel] [PATCH 0/2] virtio: revert virtio_queue_set_notification() nesting Doug Goldstein
2017-01-12 20:05   ` Michael S. Tsirkin
2017-01-13 14:48     ` Doug Goldstein
2017-01-13 12:02   ` Stefan Hajnoczi
2017-01-13 15:15     ` Doug Goldstein
2017-01-16 10:46       ` Stefan Hajnoczi
2017-01-16 21:03         ` Doug Goldstein
2017-01-17  3:09           ` Michael S. Tsirkin
2017-01-17  9:49           ` Stefan Hajnoczi
2017-01-14  3:48 ` Richard Henderson
2017-01-16 23:31 ` Laszlo Ersek [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=47c3dbde-9ac2-31e1-4c06-a99d382a2160@redhat.com \
    --to=lersek@redhat.com \
    --cc=cardoe@cardoe.com \
    --cc=dgilbert@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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.