search for: vhost_vdpa_update_vq_irq

Displaying 10 results from an estimated 10 matches for "vhost_vdpa_update_vq_irq".

2020 Aug 05
0
[PATCH 2/2] vhost_vdpa: unified set_vq_irq() and update_vq_irq()
On Wed, Aug 05, 2020 at 07:38:32PM +0800, Zhu Lingshan wrote: > This commit merge vhost_vdpa_update_vq_irq() logics into > vhost_vdpa_setup_vq_irq(), so that code are unified. > > In vhost_vdpa_setup_vq_irq(), added checks for the existence > for get_vq_irq(). > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> which commit should I squash this into? commit f8e695e9db...
2020 Jul 17
0
[PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...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(&vq->call_ctx.ctx_lock); > +} > + > +static void vhost_vdpa_update_vq_irq(struct vhost_virtqueue *vq) > +{ > + spin_lock(&vq->call_ctx.ctx_lock); > + irq_bypass_unregister_producer(&vq->call_ctx.producer); > + vq->call_ctx.producer.token = vq->call_ctx.ctx; > + irq_bypass_register_producer(&vq->call_ctx.producer); > + spin_unl...
2020 Jul 13
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...spin_lock(&vq->call_ctx.ctx_lock); > + irq_bypass_unregister_producer(&vq->call_ctx.producer); > + spin_unlock(&vq->call_ctx.ctx_lock); > + > + vq_err(vq, "unsetup irq bypass for vq %d\n", qid); Why call vq_err() here? > +} > + > +static void vhost_vdpa_update_vq_irq(struct vhost_virtqueue *vq) > +{ > + struct eventfd_ctx *ctx; > + void *token; > + > + spin_lock(&vq->call_ctx.ctx_lock); > + ctx = vq->call_ctx.ctx; > + token = vq->call_ctx.producer.token; > + if (ctx == token) > + return; Need do unlock here. > + &...
2020 Jul 15
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...ll_ctx.producer); >>> +??? spin_unlock(&vq->call_ctx.ctx_lock); >>> + >>> +??? vq_err(vq, "unsetup irq bypass for vq %d\n", qid); >> >> >> Why call vq_err() here? >> >> >>> +} >>> + >>> +static void vhost_vdpa_update_vq_irq(struct vhost_virtqueue *vq) >>> +{ >>> +??? struct eventfd_ctx *ctx; >>> +??? void *token; >>> + >>> +??? spin_lock(&vq->call_ctx.ctx_lock); >>> +??? ctx = vq->call_ctx.ctx; >>> +??? token = vq->call_ctx.producer.token; &gt...
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...>vqs[qid]; > + > + spin_lock(&vq->call_ctx.ctx_lock); > + irq_bypass_unregister_producer(&vq->call_ctx.producer); Any reason for not checking vq->call_ctx.producer.irq as below here? > + spin_unlock(&vq->call_ctx.ctx_lock); > +} > + > +static void vhost_vdpa_update_vq_irq(struct vhost_virtqueue *vq) > +{ > + spin_lock(&vq->call_ctx.ctx_lock); > + /* > + * if it has a non-zero irq, means there is a > + * previsouly registered irq_bypass_producer, > + * we should update it when ctx (its token) > + * changes. > + */ > + if (!vq-&g...
2020 Jul 28
0
[PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...vhost_vdpa *v, int qid) > +{ > + struct vhost_virtqueue *vq = &v->vqs[qid]; > + > + spin_lock(&vq->call_ctx.ctx_lock); > + irq_bypass_unregister_producer(&vq->call_ctx.producer); > + spin_unlock(&vq->call_ctx.ctx_lock); > +} > + > +static void vhost_vdpa_update_vq_irq(struct vhost_virtqueue *vq) > +{ > + spin_lock(&vq->call_ctx.ctx_lock); > + /* > + * if it has a non-zero irq, means there is a > + * previsouly registered irq_bypass_producer, > + * we should update it when ctx (its token) > + * changes. > + */ > + if (!vq-&g...
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...unregister vq from irq bypass manager, if vq->call_ctx.producer.irq is 0, means it is a unused or disabled vq, no harm if we > perform an unregister on it. > > > > +??? spin_unlock(&vq->call_ctx.ctx_lock); > +} > + > +static void vhost_vdpa_update_vq_irq(struct vhost_virtqueue *vq) > +{ > +??? spin_lock(&vq->call_ctx.ctx_lock); > +??? /* > +???? * if it has a non-zero irq, means there is a > +???? * previsouly registered irq_bypass_producer, > +???? * we should update it when...
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...irq_bypass_register_producer(&vq->call_ctx.producer); +??? spin_unlock(&vq->call_ctx.ctx_lock); > no harm if we > perform an unregister on it. >> >> >>> + spin_unlock(&vq->call_ctx.ctx_lock); >>> +} >>> + >>> +static void vhost_vdpa_update_vq_irq(struct vhost_virtqueue *vq) >>> +{ >>> +??? spin_lock(&vq->call_ctx.ctx_lock); >>> +??? /* >>> +???? * if it has a non-zero irq, means there is a >>> +???? * previsouly registered irq_bypass_producer, >>> +???? * we should update it when...
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...amp;vq->call_ctx.ctx_lock); >> >> >>> no harm if we >>> perform an unregister on it. >>>> >>>> >>>>> + spin_unlock(&vq->call_ctx.ctx_lock); >>>>> +} >>>>> + >>>>> +static void vhost_vdpa_update_vq_irq(struct vhost_virtqueue *vq) >>>>> +{ >>>>> +??? spin_lock(&vq->call_ctx.ctx_lock); >>>>> +??? /* >>>>> +???? * if it has a non-zero irq, means there is a >>>>> +???? * previsouly registered irq_bypass_producer, >&g...
2020 Jul 15
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...>>>>> + >>>>> +??? vq_err(vq, "unsetup irq bypass for vq %d\n", qid); >>>> >>>> >>>> Why call vq_err() here? >>>> >>>> >>>>> +} >>>>> + >>>>> +static void vhost_vdpa_update_vq_irq(struct vhost_virtqueue *vq) >>>>> +{ >>>>> +??? struct eventfd_ctx *ctx; >>>>> +??? void *token; >>>>> + >>>>> +??? spin_lock(&vq->call_ctx.ctx_lock); >>>>> +??? ctx = vq->call_ctx.ctx; >>>&...