All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, alex.williamson@redhat.com,
	borntraeger@de.ibm.com, felipe@nutanix.com
Subject: Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications
Date: Tue, 15 Nov 2016 17:26:17 +0200	[thread overview]
Message-ID: <20161115172336-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20161115134629.23161-4-pbonzini@redhat.com>

On Tue, Nov 15, 2016 at 02:46:29PM +0100, Paolo Bonzini wrote:
> Dataplane has been omitting forever the step of setting ISR when an
> interrupt is raised.  This causes surprisingly little breakage,
> because most polling-mode drivers look at the used ring's index field
> rather than the ISR register.
> 
> Some versions of the Windows drivers are an exception---and they use
> polling mode with ISR for crashdump and hibernation.  And because
> recent releases of Windows do not really shut down, but rather log
> out and hibernate to make the next startup faster, this manifested
> as a hang during shutdown with e.g. Windows 8.1 and virtio-win 1.8.0
> RPMs.  Newer versions probably poll the used index; older versions
> do not use MSI and therefore go through the emulated irqfd path
> (virtio_queue_guest_notifier_read), which handled ISR correctly.

Confused. virtio spec says ISR shouldn't be set on
ring activity in MSI mode. Is this a driver bug?


> The failure has always been there for virtio dataplane, but it
> became visible after commits 9ffe337 ("virtio-blk: always use
> dataplane path if ioeventfd is active", 2016-10-30) and
> ad07cd6 ("virtio-scsi: always use dataplane path if ioeventfd
> is active", 2016-10-30), which removed the non-dataplane ioeventfd
> path for virtio-blk and virtio-scsi.  The good news therefore
> is that it was not a bug in the patches---they did exactly what they
> were meant for, i.e. shake out remaining dataplane bugs.
> 
> The fix is not hard.  The virtio_should_notify+event_notifier_set
> pair that is common to virtio-blk and virtio-scsi dataplane
> is replaced with a new public function virtio_notify_irqfd
> that also sets ISR.  The irqfd emulation code now need not
> set ISR anymore, so virtio_irq is removed.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2016-11-15 15:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 13:46 [Qemu-devel] [PATCH for-2.8 0/3] virtio fixes Paolo Bonzini
2016-11-15 13:46 ` [Qemu-devel] [PATCH 1/3] virtio: introduce grab/release_ioeventfd to fix vhost Paolo Bonzini
2016-11-15 15:32   ` Cornelia Huck
2016-11-15 16:21     ` Paolo Bonzini
2016-11-15 13:46 ` [Qemu-devel] [PATCH 2/3] virtio: access ISR atomically Paolo Bonzini
2016-11-15 15:03   ` Christian Borntraeger
2016-11-15 15:04     ` Paolo Bonzini
2016-11-15 13:46 ` [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications Paolo Bonzini
2016-11-15 15:26   ` Michael S. Tsirkin [this message]
2016-11-15 15:28     ` Paolo Bonzini
2016-11-15 15:44       ` Michael S. Tsirkin
2016-11-15 16:22         ` Paolo Bonzini
2016-11-15 17:38           ` Michael S. Tsirkin
2016-11-15 17:48             ` Alex Williamson
2016-11-15 17:58               ` Michael S. Tsirkin
2016-11-15 18:21                 ` Alex Williamson
2016-11-15 19:17                   ` Michael S. Tsirkin
2016-11-15 19:51                     ` Alex Williamson
2016-11-15 15:02 ` [Qemu-devel] [PATCH for-2.8 0/3] virtio fixes Stefan Hajnoczi
2016-11-16 19:50 ` Christian Borntraeger
2016-11-16 20:03   ` Farhan Ali
2016-11-16 20:16     ` Michael S. Tsirkin
2016-11-16 20:32       ` Farhan Ali
2016-11-16 21:45         ` Farhan Ali
  -- strict thread matches above, loose matches on Subject: below --
2016-11-16 18:05 [Qemu-devel] [PATCH v2 " Paolo Bonzini
2016-11-16 18:05 ` [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications Paolo Bonzini
2016-11-16 20:15   ` Michael S. Tsirkin
2016-11-16 20:38     ` Paolo Bonzini
2016-11-16 20:39       ` Michael S. Tsirkin
2016-11-16 21:05         ` Paolo Bonzini
2016-11-16 21:20           ` Michael S. Tsirkin
2016-11-17  9:04             ` Paolo Bonzini
2016-11-17 16:58               ` Michael S. Tsirkin
2016-11-17 10:44     ` Stefan Hajnoczi

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=20161115172336-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=felipe@nutanix.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.