search for: unsetup_vq_irq

Displaying 7 results from an estimated 7 matches for "unsetup_vq_irq".

2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...;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_irq) > + drv->unsetup_vq_irq(vdev, qid); > +#endif > +} > + > +int vdpa_alloc_vq_irq(struct device *dev, struct vdpa_device *vdev, > + unsigned int irq, irq_handler_t handler, > + unsigned long irqflags, const char *devname, void *dev_id, > + int qid) &g...
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
..._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 you need to check the existence of drv before calling unset_vq_irq()? And how can this synchronize with driver releasing and binding? > +} > + > +int vdpa_alloc_vq_irq(struct device *dev, struct vdpa_device *vdev, > + unsigned i...
2020 Jul 20
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...2020/7/20 ??5:07, Zhu, Lingshan wrote: >>> >>> +} >>> + >>> +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 you need to check the existence of drv before calling unset_vq_irq()? > Yes, we should check this when we take the releasing path into account. >> >> And how can this synchronize with driver relea...
2020 Jul 21
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...>>>> +} >>>>> + >>>>> +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 you need to check the existence of drv before calling >>>> unset_vq_irq()? >>> Yes, we should check this when we take the releasing path into account. >&g...
2020 Jul 13
0
[PATCH 5/7] virtio_vdpa: init IRQ offloading function pointers to NULL.
....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.
...o/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. > > Does this make sense? Probably not, ple...
2020 Jul 17
0
[PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
..._update_vq_irq(). > + > + vq->call_ctx.producer.token = vq->call_ctx.ctx; > + vq->call_ctx.producer.irq = irq; > + ret = irq_bypass_register_producer(&vq->call_ctx.producer); > + spin_unlock(&vq->call_ctx.ctx_lock); > +} > + > +static void vhost_vdpa_unsetup_vq_irq(struct vdpa_device *dev, int qid) > +{ > + struct vhost_vdpa *v = vdpa_get_drvdata(dev); > + struct vhost_virtqueue *vq = &v->vqs[qid]; > + > + spin_lock(&vq->call_ctx.ctx_lock); > + irq_bypass_unregister_producer(&vq->call_ctx.producer); > + spin_unlock(&a...