Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-30 Thread Jason Wang
On 2020/7/29 下午10:15, Eli Cohen wrote: OK, we have a mode of operation that does not require driver intervention to manipulate the event queues so I think we're ok with this design. Good to know this. Thanks

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Eli Cohen
OK, we have a mode of operation that does not require driver intervention to manipulate the event queues so I think we're ok with this design. On Wed, Jul 29, 2020 at 06:19:52PM +0800, Jason Wang wrote: > > On 2020/7/29 下午5:55, Eli Cohen wrote: > >On Wed, Jul 29, 2020 at 05:21:53PM +0800, Jason W

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Eli Cohen
On Wed, Jul 29, 2020 at 06:19:52PM +0800, Jason Wang wrote: I am checking internally if we can work in a mode not requiring to acknowledge the interrupt. I will update. Thanks for the explanations. > > On 2020/7/29 下午5:55, Eli Cohen wrote: > >On Wed, Jul 29, 2020 at 05:21:53PM +0800, Jason Wang

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Jason Wang
On 2020/7/29 下午5:55, Eli Cohen wrote: On Wed, Jul 29, 2020 at 05:21:53PM +0800, Jason Wang wrote: On 2020/7/28 下午5:04, Eli Cohen wrote: On Tue, Jul 28, 2020 at 12:24:03PM +0800, Zhu Lingshan wrote: +static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, int qid) +{ + struct vhost_vi

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Eli Cohen
On Wed, Jul 29, 2020 at 05:21:53PM +0800, Jason Wang wrote: > > On 2020/7/28 下午5:04, Eli Cohen wrote: > >On Tue, Jul 28, 2020 at 12:24:03PM +0800, Zhu Lingshan wrote: > >>+static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, int qid) > >>+{ > >>+ struct vhost_virtqueue *vq = &v->vqs[qid]; >

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Jason Wang
On 2020/7/28 下午5:04, Eli Cohen wrote: On Tue, Jul 28, 2020 at 12:24:03PM +0800, Zhu Lingshan wrote: +static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, int qid) +{ + struct vhost_virtqueue *vq = &v->vqs[qid]; + const struct vdpa_config_ops *ops = v->vdpa->config; +

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-28 Thread Jason Wang
On 2020/7/28 下午5:18, Zhu, Lingshan wrote:    * status to 0. @@ -167,6 +220,15 @@ static long vhost_vdpa_set_status(struct vhost_vdpa *v, u8 __user *statusp)   if (status != 0 && (ops->get_status(vdpa) & ~status) != 0)   return -EINVAL;   +    /* vq irq is not expected to be c

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-28 Thread Eli Cohen
On Tue, Jul 28, 2020 at 12:24:03PM +0800, Zhu Lingshan wrote: > > +static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, int qid) > +{ > + struct vhost_virtqueue *vq = &v->vqs[qid]; > + const struct vdpa_config_ops *ops = v->vdpa->config; > + struct vdpa_device *vdpa = v->vdpa; >

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-28 Thread Jason Wang
On 2020/7/28 下午12:24, Zhu Lingshan wrote: This patch introduce a set of functions for setup/unsetup and update irq offloading respectively by register/unregister and re-register the irq_bypass_producer. With these functions, this commit can setup/unsetup irq offloading through setting DRIVER_O

[PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-27 Thread Zhu Lingshan
This patch introduce a set of functions for setup/unsetup and update irq offloading respectively by register/unregister and re-register the irq_bypass_producer. With these functions, this commit can setup/unsetup irq offloading through setting DRIVER_OK/!DRIVER_OK, and update irq offloading throug