qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>,
	Felipe Franciosi <felipe@nutanix.com>
Subject: Re: [PATCH] virtio: skip guest index check on device load
Date: Wed, 28 Oct 2020 12:44:15 +0000	[thread overview]
Message-ID: <20201028124415.GB231368@stefanha-x1.localdomain> (raw)
In-Reply-To: <20201028072812-mutt-send-email-mst@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

On Wed, Oct 28, 2020 at 07:30:55AM -0400, Michael S. Tsirkin wrote:
> On Wed, Oct 28, 2020 at 11:00:38AM +0000, Stefan Hajnoczi wrote:
> > On Tue, Oct 27, 2020 at 09:04:46AM -0400, Michael S. Tsirkin wrote:
> > > It's not a waste of time, it's just a lot of work
> > > within guests.
> > 
> > Luckily it does no harm to set the NEEDS_RESET bit even if the guest
> > doesn't handle it.
> > 
> > If the guest driver is unaware it may continue to submit requests to the
> > device for a while. The device emulation code stops accepting new
> > requests though. This means the device will become unresponsive until
> > reset, which is not ideal but okay in the case where the device was put
> > into an invalid state.
> 
> There is no actual rule that device must stop processing requests.
> Driver can only assume that is the case after it started the
> actual reset.

Right, I mean QEMU's implementation stops processing new requests once
the device has been marked "broken":

  void *virtqueue_pop(VirtQueue *vq, size_t sz)
  {
      if (virtio_device_disabled(vq->vdev)) { <---
          return NULL;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-10-28 12:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 15:13 [PATCH] virtio: skip guest index check on device load Felipe Franciosi
2020-10-27 11:30 ` Stefan Hajnoczi
2020-10-27 12:25   ` Michael S. Tsirkin
2020-10-27 12:53     ` Felipe Franciosi
2020-10-27 12:56       ` Michael S. Tsirkin
2020-10-27 13:02         ` Felipe Franciosi
2020-10-27 13:04           ` Michael S. Tsirkin
2020-10-28 11:00             ` Stefan Hajnoczi
2020-10-28 11:30               ` Michael S. Tsirkin
2020-10-28 12:44                 ` Stefan Hajnoczi [this message]
2020-11-02 13:31               ` Dr. David Alan Gilbert

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=20201028124415.GB231368@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=felipe@nutanix.com \
    --cc=jasowang@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).