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: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers are flushed
Date: Wed, 12 Dec 2012 16:47:58 +0200

On Wed, Dec 12, 2012 at 03:36:10PM +0100, Paolo Bonzini wrote:
> Il 12/12/2012 15:30, Michael S. Tsirkin ha scritto:
> > > Same for virtio-scsi.  Each request in that case is sent as part of the
> > > SCSIDevice that it refers to, via callbacks in SCSIBusInfo.
> 
> It is in virtio_scsi_load_request.
> 
> > Looks like this will leak ring entries.
> > 
> > All I see is: virtio_scsi_load calling virtio_load.
> > When the loading side will get last avail index it
> > will assume all requests up to that value have
> > completed, so it will never put the missing heads
> > in the used ring.
> 
> 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...
> 
> Paolo

So you are saying this is a bug then? Great. This is exactly what
the assert above is out there to catch.
And you really can't fix it without breaking
migration compatibility.

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.

-- 
MST



reply via email to

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