On Mon, Apr 27, 2015 at 04:18:43PM +0200, Paolo Bonzini wrote: > > > On 27/04/2015 16:04, Michael S. Tsirkin wrote: > >> > Because virtio-blk uses a response footer and virtio-scsi uses a > >> > response header, fixing virtio-blk is much harder. You need to add a > >> > new argument to virtqueue_push. I'd really prefer someone else to do > >> > it... > >> > > >> > Paolo > > OK but what's the desired API? > > Do you know the host length or might any part of iov > > be dirty? > > For a 1-sector request and a 2048+1 bytes iov, I know that I've written > bytes 0-511 and byte 2048. > > So I have to dirty all 2049 bytes, but the written length should be 512. > Right now we pass 2049 to virtqueue_push and write 2049 to the written > length, I'd need another argument to pass the 512. > > Paolo
OK, I sent a patch with a new API, pls take a look. Can you implement your patch on top?
