search for: setup_vq_irq

Displaying 5 results from an estimated 5 matches for "setup_vq_irq".

Did you mean: unsetup_vq_irq
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...irq(struct vdpa_device *vdev, int qid, int irq) > +{ > + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); > + > +#ifdef CONFIG_HAVE_KVM_IRQ_BYPASS Let's don't do the check here. It's the responsibility of driver to decide what it should do. > + if (drv->setup_vq_irq) > + drv->setup_vq_irq(vdev, qid, irq); > +#endif > +} > + > +static void vdpa_unsetup_irq(struct vdpa_device *vdev, int qid) > +{ > + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); > + > +#ifdef CONFIG_HAVE_KVM_IRQ_BYPASS > + if (drv->unsetup_vq_ir...
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...@ void vdpa_unregister_driver(struct vdpa_driver *drv) > } > EXPORT_SYMBOL_GPL(vdpa_unregister_driver); > > +static void vdpa_setup_irq(struct vdpa_device *vdev, int qid, int irq) > +{ > + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); > + > + if (drv->setup_vq_irq) > + drv->setup_vq_irq(vdev, qid, irq); > +} > + > +static void vdpa_unsetup_irq(struct vdpa_device *vdev, int qid) > +{ > + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); > + > + if (drv->unsetup_vq_irq) > + drv->unsetup_vq_irq(vdev, qid); Do yo...
2020 Jul 13
0
[PATCH 5/7] virtio_vdpa: init IRQ offloading function pointers to NULL.
...io_vdpa.c > index c30eb55..1e8acb9 100644 > --- a/drivers/virtio/virtio_vdpa.c > +++ b/drivers/virtio/virtio_vdpa.c > @@ -386,6 +386,8 @@ static void virtio_vdpa_remove(struct vdpa_device *vdpa) > }, > .probe = virtio_vdpa_probe, > .remove = virtio_vdpa_remove, > + .setup_vq_irq = NULL, > + .unsetup_vq_irq = NULL, > }; Is this really needed consider the it's static? Thanks > > module_vdpa_driver(virtio_vdpa_driver);
2020 Jul 15
0
[PATCH 5/7] virtio_vdpa: init IRQ offloading function pointers to NULL.
..._vdpa.c >>> +++ b/drivers/virtio/virtio_vdpa.c >>> @@ -386,6 +386,8 @@ static void virtio_vdpa_remove(struct >>> vdpa_device *vdpa) >>> ????? }, >>> ????? .probe??? = virtio_vdpa_probe, >>> ????? .remove = virtio_vdpa_remove, >>> +??? .setup_vq_irq = NULL, >>> +??? .unsetup_vq_irq = NULL, >>> ? }; >> >> >> Is this really needed consider the it's static? >> >> Thanks > This is for readability, to show they are NULL, so virtio_vdpa would not go through irq forwarding / offloading. > >...
2020 Jul 17
0
[PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c > index 2fcc422..b9078d4 100644 > --- a/drivers/vhost/vdpa.c > +++ b/drivers/vhost/vdpa.c > @@ -115,6 +115,43 @@ static irqreturn_t vhost_vdpa_config_cb(void *private) > return IRQ_HANDLED; > } > > +static void vhost_vdpa_setup_vq_irq(struct vdpa_device *dev, int qid, int irq) > +{ > + struct vhost_vdpa *v = vdpa_get_drvdata(dev); > + struct vhost_virtqueue *vq = &v->vqs[qid]; > + int ret; > + > + spin_lock(&vq->call_ctx.ctx_lock); > + if (!vq->call_ctx.ctx) { > + spin_unlock(&vq-&gt...