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>
This commit is contained in:
@@ -102,6 +102,7 @@ struct virtio_pci_device {
|
||||
unsigned idx,
|
||||
void (*callback)(struct virtqueue *vq),
|
||||
const char *name,
|
||||
bool ctx,
|
||||
u16 msix_vec);
|
||||
void (*del_vq)(struct virtio_pci_vq_info *info);
|
||||
|
||||
@@ -131,7 +132,8 @@ void vp_del_vqs(struct virtio_device *vdev);
|
||||
/* the config->find_vqs() implementation */
|
||||
int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs,
|
||||
struct virtqueue *vqs[], vq_callback_t *callbacks[],
|
||||
const char * const names[], struct irq_affinity *desc);
|
||||
const char * const names[], const bool *ctx,
|
||||
struct irq_affinity *desc);
|
||||
const char *vp_bus_name(struct virtio_device *vdev);
|
||||
|
||||
/* Setup the affinity for a virtqueue:
|
||||
|
||||
Reference in New Issue
Block a user