summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2015-05-29 14:15:26 +0800
committerMichael S. Tsirkin <mst@redhat.com>2015-05-31 16:45:38 +0200
commit8ad176aaed24535f535e0fdb03c538c23017535d (patch)
tree365658dbb30455ac495c256e3bb5c19607e7a93b /include
parente83980455c8c7eb066405de512be7c4bace3ac4d (diff)
downloadqemu-8ad176aaed24535f535e0fdb03c538c23017535d.tar.gz
qemu-8ad176aaed24535f535e0fdb03c538c23017535d.tar.bz2
qemu-8ad176aaed24535f535e0fdb03c538c23017535d.zip
virtio: introduce virtio_get_num_queues()
This patch introduces virtio_get_num_queues() which iterates the vqs array and return the number of virtqueues used by device. Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 5244a3e016..dd92fe4979 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -176,6 +176,7 @@ void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr);
hwaddr virtio_queue_get_addr(VirtIODevice *vdev, int n);
void virtio_queue_set_num(VirtIODevice *vdev, int n, int num);
int virtio_queue_get_num(VirtIODevice *vdev, int n);
+int virtio_get_num_queues(VirtIODevice *vdev);
void virtio_queue_set_align(VirtIODevice *vdev, int n, int align);
void virtio_queue_notify(VirtIODevice *vdev, int n);
uint16_t virtio_queue_vector(VirtIODevice *vdev, int n);