search for: vhost_vdpa_clean_irq

Displaying 16 results from an estimated 16 matches for "vhost_vdpa_clean_irq".

2020 Sep 24
1
[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()
...ost_dev_cleanup(&v->vdev); > + vhost_vdpa_cleanup(v); > err: > atomic_dec(&v->opened); > return r; > @@ -840,8 +846,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) > vhost_vdpa_free_domain(v); > vhost_vdpa_config_put(v); > vhost_vdpa_clean_irq(v); > - vhost_dev_cleanup(&v->vdev); > - kfree(v->vdev.vqs); > + vhost_vdpa_cleanup(v); > mutex_unlock(&d->mutex); > > atomic_dec(&v->opened); > -- > 2.20.1
2023 Mar 10
0
[PATCH] vhost-vdpa: cleanup memory maps when closing vdpa fds
...; struct vhost_vdpa *v = filep->private_data; > > > > struct vhost_dev *d = &v->vdev; > > > > > > > > mutex_lock(&d->mutex); > > > > filep->private_data = NULL; > > > > vhost_vdpa_clean_irq(v); > > > > vhost_vdpa_reset(v); > > > > vhost_dev_stop(&v->vdev); > > > > vhost_vdpa_free_domain(v); > > > > vhost_vdpa_config_put(v); > > > > vhost_vdpa_cleanup(v); > > >...
2023 Mar 21
1
[PATCH v3 2/8] vhost-vdpa: use bind_mm/unbind_mm device callbacks
...wner(d); + if (r) + break; + r = vhost_vdpa_bind_mm(v); + if (r) + vhost_dev_reset_owner(d, NULL); + break; default: r = vhost_dev_ioctl(&v->vdev, cmd, argp); if (r == -ENOIOCTLCMD) @@ -1287,6 +1317,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) vhost_vdpa_clean_irq(v); vhost_vdpa_reset(v); vhost_dev_stop(&v->vdev); + vhost_vdpa_unbind_mm(v); vhost_vdpa_config_put(v); vhost_vdpa_cleanup(v); mutex_unlock(&d->mutex); -- 2.39.2
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...t; } > ops->set_vq_cb(vdpa, idx, &cb); > + vhost_vdpa_update_vq_irq(vq); > break; > > case VHOST_SET_VRING_NUM: > @@ -765,6 +829,18 @@ static int vhost_vdpa_open(struct inode *inode, struct file *filep) > return r; > } > > +static void vhost_vdpa_clean_irq(struct vhost_vdpa *v) > +{ > + struct vhost_virtqueue *vq; > + int i; > + > + for (i = 0; i < v->nvqs; i++) { > + vq = &v->vqs[i]; > + if (vq->call_ctx.producer.irq) > + irq_bypass_unregister_producer(&vq->call_ctx.producer); > + } > +} Why...
2020 Jul 28
0
[PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...t; } > ops->set_vq_cb(vdpa, idx, &cb); > + vhost_vdpa_update_vq_irq(vq); > break; > > case VHOST_SET_VRING_NUM: > @@ -765,6 +829,18 @@ static int vhost_vdpa_open(struct inode *inode, struct file *filep) > return r; > } > > +static void vhost_vdpa_clean_irq(struct vhost_vdpa *v) > +{ > + struct vhost_virtqueue *vq; > + int i; > + > + for (i = 0; i < v->nvqs; i++) { > + vq = &v->vqs[i]; > + if (vq->call_ctx.producer.irq) > + irq_bypass_unregister_producer(&vq->call_ctx.producer); > + } > +} >...
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...??? vhost_vdpa_update_vq_irq(vq); > ????????? break; > ? ????? case VHOST_SET_VRING_NUM: > @@ -765,6 +829,18 @@ static int vhost_vdpa_open(struct inode *inode, > struct file *filep) > ????? return r; > ? } > ? +static void vhost_vdpa_clean_irq(struct vhost_vdpa *v) > +{ > +??? struct vhost_virtqueue *vq; > +??? int i; > + > +??? for (i = 0; i < v->nvqs; i++) { > +??????? vq = &v->vqs[i]; > +??????? if (vq->call_ctx.producer.irq) > +???...
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...?? vhost_vdpa_update_vq_irq(vq); >>> ????????? break; >>> ? ????? case VHOST_SET_VRING_NUM: >>> @@ -765,6 +829,18 @@ static int vhost_vdpa_open(struct inode *inode, >>> struct file *filep) >>> ????? return r; >>> ? } >>> ? +static void vhost_vdpa_clean_irq(struct vhost_vdpa *v) >>> +{ >>> +??? struct vhost_virtqueue *vq; >>> +??? int i; >>> + >>> +??? for (i = 0; i < v->nvqs; i++) { >>> +??????? vq = &v->vqs[i]; >>> +??????? if (vq->call_ctx.producer.irq) >>> + ir...
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...??????? break; >>>>> ? ????? case VHOST_SET_VRING_NUM: >>>>> @@ -765,6 +829,18 @@ static int vhost_vdpa_open(struct inode >>>>> *inode, struct file *filep) >>>>> ????? return r; >>>>> ? } >>>>> ? +static void vhost_vdpa_clean_irq(struct vhost_vdpa *v) >>>>> +{ >>>>> +??? struct vhost_virtqueue *vq; >>>>> +??? int i; >>>>> + >>>>> +??? for (i = 0; i < v->nvqs; i++) { >>>>> +??????? vq = &v->vqs[i]; >>>>> +???...
2020 Sep 24
0
[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()
...lep) return 0; err_init_iotlb: - vhost_dev_cleanup(&v->vdev); + vhost_vdpa_cleanup(v); err: atomic_dec(&v->opened); return r; @@ -840,8 +846,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) vhost_vdpa_free_domain(v); vhost_vdpa_config_put(v); vhost_vdpa_clean_irq(v); - vhost_dev_cleanup(&v->vdev); - kfree(v->vdev.vqs); + vhost_vdpa_cleanup(v); mutex_unlock(&d->mutex); atomic_dec(&v->opened); -- 2.20.1
2020 Sep 25
0
[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()
...> + vhost_vdpa_cleanup(v); >> err: >> atomic_dec(&v->opened); >> return r; >> @@ -840,8 +846,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) >> vhost_vdpa_free_domain(v); >> vhost_vdpa_config_put(v); >> vhost_vdpa_clean_irq(v); >> - vhost_dev_cleanup(&v->vdev); >> - kfree(v->vdev.vqs); >> + vhost_vdpa_cleanup(v); >> mutex_unlock(&d->mutex); >> >> atomic_dec(&v->opened); >> -- >> 2.20.1 >>
2023 Mar 23
1
[PATCH v3 2/8] vhost-vdpa: use bind_mm/unbind_mm device callbacks
...ev_reset_owner(d, NULL); > + break; > default: > r = vhost_dev_ioctl(&v->vdev, cmd, argp); > if (r == -ENOIOCTLCMD) > @@ -1287,6 +1317,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) > vhost_vdpa_clean_irq(v); > vhost_vdpa_reset(v); > vhost_dev_stop(&v->vdev); > + vhost_vdpa_unbind_mm(v); > vhost_vdpa_config_put(v); > vhost_vdpa_cleanup(v); > mutex_unlock(&d->mutex); > -- > 2.39.2 >
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2023 Mar 21
5
[PATCH v3 0/8] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the
2023 Mar 02
8
[PATCH v2 0/8] vdpa_sim: add support for user VA
v2: - rebased on Linus' tree, commit ae3419fbac84 ("vc_screen: don't clobber return value in vcs_read") - removed `struct task_struct *owner` param (unused for now, maybe ?useful to support cgroups) [Jason] - add unbind_mm callback [Jason] - call the new unbind_mm callback during the release [Jason] - avoid to call bind_mm callback after the reset, since the device ?is not
2023 Apr 04
9
[PATCH v5 0/9] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the