virtio: combine the read of a descriptor
commitaa570d6fb6bd0402f27f151a76fb1762e26231ac
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 31 Jan 2016 10:29:03 +0000 (31 11:29 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 6 Feb 2016 18:44:08 +0000 (6 20:44 +0200)
tree72a395aaa63618c27fca222a02069a19e773bf09
parent5dba97ebdc92f1ac3c9ac27d8eac52ed2348fae1
virtio: combine the read of a descriptor

Compared to vring, virtio has a performance penalty of 10%.  Fix it
by combining all the reads for a descriptor in a single address_space_read
call.  This also simplifies the code nicely.

Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio.c