diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2017-03-06 18:32:29 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-05-02 23:41:43 +0300 |
commit | f94682dde5ed23eed13533a37dfce942e60ade4e (patch) | |
tree | aaa611dd8164523a1d4029b2eece720595c87669 /drivers/virtio/virtio_pci_legacy.c | |
parent | 9b2bbdb227588455afcc3b03475fa9b0a35d83af (diff) |
virtio: add context flag to find vqs
Allows maintaining extra context per vq. For ease of use, passing in
NULL is legal and disables the feature for all vqs.
Includes fixes by Christian for s390, acked by Cornelia.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio/virtio_pci_legacy.c')
-rw-r--r-- | drivers/virtio/virtio_pci_legacy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index 4bfa48fb1324..2780886e8ba3 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -116,6 +116,7 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, unsigned index, void (*callback)(struct virtqueue *vq), const char *name, + bool ctx, u16 msix_vec) { struct virtqueue *vq; @@ -135,7 +136,8 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, /* create the vring */ vq = vring_create_virtqueue(index, num, VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev, - true, false, vp_notify, callback, name); + true, false, ctx, + vp_notify, callback, name); if (!vq) return ERR_PTR(-ENOMEM); |