From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Rusty Russell <rusty@rustcorp.com.au>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers are flushed
Date: Wed, 12 Dec 2012 17:25:08 +0200 [thread overview]
Message-ID: <20121212152508.GB16750@redhat.com> (raw)
In-Reply-To: <50C89C47.7040108@redhat.com>
On Wed, Dec 12, 2012 at 04:01:27PM +0100, Paolo Bonzini wrote:
> Il 12/12/2012 15:47, Michael S. Tsirkin ha scritto:
> > > Ok, so we need some API for virtio-{blk,scsi} to communicate back the
> > > indexes of in-flight requests to virtio. The indexes are known from the
> > > VirtQueueElement, so that's fine.
> > >
> > > Even better would be a virtio_save_request/virtio_load_request API...
> >
> > So you are saying this is a bug then? Great.
>
> I'm not sure what you mean by "it will never put the missing heads
> in the used ring". The serialized requests are put in the used rings
> when they are completed and virtio-{blk,scsi} calls virtqueue_push. Is
> the problem if you have a vring that looks like this:
>
> A A U A U U A A
>
> ? Which heads are leaked? {0,1}, {2} or {6,7}? Or a combination thereof?
I don't know what A A U A U U A A means.
Pls see the example of the problem in the original commit log.
> Also, I'm not sure your "fix" (crash QEMU) is correct. I hope we can
> make it work.
Of course assert is not a fix.
The patch is just to catch bugs like this one.
To make it work, complete all requests when vm is stopped.
This needs to be done in the specific device, the assert will catch
buggy devices.
> > This is exactly what the assert above is out there to catch.
> > And you really can't fix it without breaking migration compatibility.
>
> Why not? The index in the vring is in the migration data.
index is not enough if requests are outstanding.
Pls check the example in the log of the patch.
> > As step 1, I think we should just complete all outstanding
> > requests when VM stops.
> >
> > Yes it means you can't do the retry hack after migration
> > but this is hardly common scenario.
>
> I disagree...
>
> Paolo
Disagree with what? You are saying it's common?
--
MST
next prev parent reply other threads:[~2012-12-12 15:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 10:51 [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers are flushed Michael S. Tsirkin
2012-12-12 13:50 ` Stefan Hajnoczi
2012-12-12 14:01 ` Paolo Bonzini
2012-12-12 14:30 ` Michael S. Tsirkin
2012-12-12 14:36 ` Paolo Bonzini
2012-12-12 14:47 ` Michael S. Tsirkin
2012-12-12 15:01 ` Paolo Bonzini
2012-12-12 15:25 ` Michael S. Tsirkin [this message]
2012-12-12 15:52 ` Paolo Bonzini
2012-12-12 16:37 ` Michael S. Tsirkin
2012-12-12 16:51 ` Paolo Bonzini
2012-12-12 17:14 ` Michael S. Tsirkin
2012-12-12 17:39 ` Paolo Bonzini
2012-12-12 19:23 ` Michael S. Tsirkin
2012-12-12 21:00 ` Paolo Bonzini
2012-12-12 21:19 ` Michael S. Tsirkin
2012-12-12 21:33 ` Anthony Liguori
2012-12-12 21:51 ` Michael S. Tsirkin
2012-12-14 1:06 ` Rusty Russell
2012-12-14 7:51 ` Paolo Bonzini
2012-12-16 20:36 ` Anthony Liguori
2012-12-13 7:39 ` Paolo Bonzini
2012-12-13 10:48 ` Kevin Wolf
2012-12-16 16:14 ` Michael S. Tsirkin
2012-12-12 14:26 ` Michael S. Tsirkin
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=20121212152508.GB16750@redhat.com \
--to=mst@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--cc=stefanha@gmail.com \
--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 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).