aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-bridge
diff options
context:
space:
mode:
authorVincenzo Maffione <v.maffione@gmail.com>2016-01-31 11:29:05 +0100
committerMichael S. Tsirkin <mst@redhat.com>2016-02-06 20:44:08 +0200
commitbe1fea9bc286f64c6c995bb0d7145a0b738aeddb (patch)
tree2d826fa348b8eb71203dfb15ae4fb00aedb55edb /hw/pci-bridge
parentb796fcd1bf2978aed15748db04e054f34789e9eb (diff)
downloadqemu-be1fea9bc286f64c6c995bb0d7145a0b738aeddb.zip
qemu-be1fea9bc286f64c6c995bb0d7145a0b738aeddb.tar.gz
qemu-be1fea9bc286f64c6c995bb0d7145a0b738aeddb.tar.bz2
virtio: read avail_idx from VQ only when necessary
The virtqueue_pop() implementation needs to check if the avail ring contains some pending buffers. To perform this check, it is not always necessary to fetch the avail_idx in the VQ memory, which is expensive. This patch introduces a shadow variable tracking avail_idx and modifies virtio_queue_empty() to access avail_idx in physical memory only when necessary. Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Message-Id: <b617d6459902773d9f4ab843bfaca764f5af8eda.1450218353.git.v.maffione@gmail.com> 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>
Diffstat (limited to 'hw/pci-bridge')
0 files changed, 0 insertions, 0 deletions