Virtio: introduce virtqueue_fill() and virtqueue_flush()
commit5fc76e2e2d6eb99f74f753e2f1cea18244d65b8c
authorMark McLoughlin <markmc@redhat.com>
Wed, 26 Nov 2008 14:50:35 +0000 (26 14:50 +0000)
committerAvi Kivity <avi@redhat.com>
Thu, 27 Nov 2008 12:44:25 +0000 (27 14:44 +0200)
tree4f6c1c229d8153269f770ec0888f9146fd6581e9
parent67fe29bb86132d89c3436daa8791989ceffd0961
Virtio: introduce virtqueue_fill() and virtqueue_flush()

Split virtqueue_push() into two logical steps - adding an element
to the used ring and notifying the other side of added elements.

This is needed because with the mergeable receive buffers scheme we
will add buffers to the used ring as we copy the packet data into them
but we only want to notify the guest of the new buffers once all the
packet buffers are available.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hw/virtio.c
hw/virtio.h