qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers a


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers are flushed
Date: Wed, 12 Dec 2012 16:01:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

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?

Also, I'm not sure your "fix" (crash QEMU) is correct.  I hope we can
make it work.

> 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.

> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]