]> xenbits.xensource.com Git - qemu-xen.git/commit
virtio: introduce vector to virtqueues mapping
authorJason Wang <jasowang@redhat.com>
Thu, 23 Apr 2015 06:21:46 +0000 (14:21 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 27 Apr 2015 19:02:41 +0000 (21:02 +0200)
commite0d686bf4b9d018ba5449f057b486bb5e1fa1a0d
tree6875ad1bdef6e72f830758929c66d2a1dc811254
parent955cc8c9541779e09895a9c5ccbf8ace15d884f5
virtio: introduce vector to virtqueues mapping

Currently we will try to traverse all virtqueues to find a subset that
using a specific vector. This is sub optimal when we will support
hundreds or even thousands of virtqueues. So this patch introduces a
method which could be used by transport to get all virtqueues that
using a same vector. This is done through QLISTs and the number of
QLISTs was queried through a transport specific method. When guest
setting vectors, the virtqueue will be linked and helpers for traverse
the list was also introduced.

The first user will be virtio pci which will use this to speed up
MSI-X masking and unmasking handling.

Cc: Michael S. Tsirkin <mst@redhat.com>
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>
hw/virtio/virtio-pci.c
hw/virtio/virtio.c
include/hw/virtio/virtio-bus.h
include/hw/virtio/virtio.h