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 22:00:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Il 12/12/2012 20:23, Michael S. Tsirkin ha scritto:
>>> Saving inuse counter is useless. We need to know which requests
>>> are outstanding if we want to retry them on remote.
>>
>> And that's what virtio-blk and virtio-scsi have been doing for years.
> 
> I don't see it - all I see in save is virtio_save.

static void virtio_blk_save(QEMUFile *f, void *opaque)
{
    VirtIOBlock *s = opaque;
    VirtIOBlockReq *req = s->rq;

    virtio_save(&s->vdev, f);
    
    while (req) {
        qemu_put_sbyte(f, 1);
        qemu_put_buffer(f, (unsigned char*)&req->elem, sizeof(req->elem));
        req = req->next;
    }
    qemu_put_sbyte(f, 0);
}


virtio-scsi does it in virtio_scsi_save_request.

> You need to retry A1 on remote. How do you do that? There's
> no way to find out it has not been completed
> from the ring itself.

virtio_blk_dma_restart_bh and scsi_dma_restart_bh do it.

Paolo




reply via email to

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