Anthony Liguori wrote:
BTW, what are your plans for virtio?
To hope someone else does it.
I'd reckon that just trying to map the full SG list and failing
gracefully if unable would be sufficient. You could also convert the
element to contain a QEMUSGList and then make use of the IO helpers
in virtio-blk and virtio-net. It just gets a little funky for
simpler things like virtio-console and virtio-balloon.
One way is to convert the generic transport layer to use two
QEMUSGLists (one for incoming, one for outgoing) and leave it at
that. virtio-blk could use the block dma helpers, virtio-net could do
something else, and we'd add a qemu_sglist_to_buffer(sg, offset, len,
buf) and qemu_sglist_from_buffer(sg, offset, len, buf) to allow
low-bandwidth easy access to virtio data.