search for: vhost_vdpa_cleanup

Displaying 12 results from an estimated 12 matches for "vhost_vdpa_cleanup".

2020 Sep 24
1
[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()
...a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c > index 796fe979f997..9c641274b9f3 100644 > --- a/drivers/vhost/vdpa.c > +++ b/drivers/vhost/vdpa.c > @@ -764,6 +764,12 @@ static void vhost_vdpa_free_domain(struct vhost_vdpa *v) > v->domain = NULL; > } > > +static void vhost_vdpa_cleanup(struct vhost_vdpa *v) > +{ > + vhost_dev_cleanup(&v->vdev); > + kfree(v->vdev.vqs); > +} > + > static int vhost_vdpa_open(struct inode *inode, struct file *filep) > { > struct vhost_vdpa *v; > @@ -809,7 +815,7 @@ static int vhost_vdpa_open(struct inode *inod...
2023 Mar 10
0
[PATCH] vhost-vdpa: cleanup memory maps when closing vdpa fds
...ill QEMU > > > > > > 4. vhost_vdpa_release > > > vhost_vdpa_free_domain > > > > > > In this case, we have no opportunity to invoke unpin_user_pages or > > > iommu_unmap to free the memory. > > > > We do: > > > > vhost_vdpa_cleanup() > > vhost_vdpa_remove_as() > > vhost_vdpa_iotlb_unmap() > > vhost_vdpa_pa_unmap() > > unpin_user_pages() > > vhost_vdpa_general_unmap() > > iommu_unmap() > > ? > > &g...
2020 Sep 24
0
[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()
...nsertions(+), 3 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 796fe979f997..9c641274b9f3 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -764,6 +764,12 @@ static void vhost_vdpa_free_domain(struct vhost_vdpa *v) v->domain = NULL; } +static void vhost_vdpa_cleanup(struct vhost_vdpa *v) +{ + vhost_dev_cleanup(&v->vdev); + kfree(v->vdev.vqs); +} + static int vhost_vdpa_open(struct inode *inode, struct file *filep) { struct vhost_vdpa *v; @@ -809,7 +815,7 @@ static int vhost_vdpa_open(struct inode *inode, struct file *filep) return 0; err_ini...
2020 Sep 25
0
[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()
...host/vdpa.c >> index 796fe979f997..9c641274b9f3 100644 >> --- a/drivers/vhost/vdpa.c >> +++ b/drivers/vhost/vdpa.c >> @@ -764,6 +764,12 @@ static void vhost_vdpa_free_domain(struct vhost_vdpa *v) >> v->domain = NULL; >> } >> >> +static void vhost_vdpa_cleanup(struct vhost_vdpa *v) >> +{ >> + vhost_dev_cleanup(&v->vdev); >> + kfree(v->vdev.vqs); >> +} >> + > Wouldn't it be cleaner to call kfree(vqs) explicilty inside > vhost_vdpa_open() in case of failure and keep the symetry of > vhost_dev_init()/vhos...
2023 Mar 21
1
[PATCH v3 2/8] vhost-vdpa: use bind_mm/unbind_mm device callbacks
...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 06
0
[PATCH v4 01/15] vdpa net: move iova tree creation from init to start
...gt;> diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c > > >>> index de5ed8ff22..b89c99066a 100644 > > >>> --- a/net/vhost-vdpa.c > > >>> +++ b/net/vhost-vdpa.c > > >>> @@ -178,13 +178,9 @@ err_init: > > >>> static void vhost_vdpa_cleanup(NetClientState *nc) > > >>> { > > >>> VhostVDPAState *s = DO_UPCAST(VhostVDPAState, nc, nc); > > >>> - struct vhost_dev *dev = &s->vhost_net->dev; > > >>> > > >>> qemu_vfree(s->cvq_cmd_out_bu...
2023 Mar 23
1
[PATCH v3 2/8] vhost-vdpa: use bind_mm/unbind_mm device callbacks
...@ -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 >
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