aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_input.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-02-05 18:15:22 +0100
committerMichael S. Tsirkin <mst@redhat.com>2017-02-27 20:54:04 +0200
commitfb5e31d970ce8b4941f03ed765d7dbefc39f22d9 (patch)
treef7b64532549f35aad0933fae46346e59151d3a71 /drivers/virtio/virtio_input.c
parentvirtio_pci: simplify MSI-X setup (diff)
downloadlinux-dev-fb5e31d970ce8b4941f03ed765d7dbefc39f22d9.tar.xz
linux-dev-fb5e31d970ce8b4941f03ed765d7dbefc39f22d9.zip
virtio: allow drivers to request IRQ affinity when creating VQs
Add a struct irq_affinity pointer to the find_vqs methods, which if set is used to tell the PCI layer to create the MSI-X vectors for our I/O virtqueues with the proper affinity from the start. Compared to after the fact affinity hints this gives us an instantly working setup and allows to allocate the irq descritors node-local and avoid interconnect traffic. Last but not least this will allow blk-mq queues are created based on the interrupt affinity for storage drivers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio/virtio_input.c')
-rw-r--r--drivers/virtio/virtio_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c
index 350a2a5a49db..79f1293cda93 100644
--- a/drivers/virtio/virtio_input.c
+++ b/drivers/virtio/virtio_input.c
@@ -173,7 +173,8 @@ static int virtinput_init_vqs(struct virtio_input *vi)
static const char * const names[] = { "events", "status" };
int err;
- err = vi->vdev->config->find_vqs(vi->vdev, 2, vqs, cbs, names);
+ err = vi->vdev->config->find_vqs(vi->vdev, 2, vqs, cbs, names,
+ NULL);
if (err)
return err;
vi->evt = vqs[0];