search for: vhost_vdpa_free_domain

Displaying 18 results from an estimated 18 matches for "vhost_vdpa_free_domain".

2023 Mar 10
0
[PATCH] vhost-vdpa: cleanup memory maps when closing vdpa fds
...maybe we release these resources in vdpa framework in kernel is a > > > > > suitable choice? > > > > > > > > I think I need understand what does "resources" mean here: > > > > > > > > For iommu mapping, it should be freed by vhost_vdpa_free_domain() in > > > > vhost_vdpa_release()? > > > > > > > > > > Please consider the following lifecycle of the vdpa device: > > > > > > 1. vhost_vdpa_open > > > vhost_vdpa_alloc_domain > > > > > > 2. vhost_vdpa_...
2020 Sep 24
1
[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()
.../vhost/vdpa.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 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) >...
2020 Sep 24
0
[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()
...wang at redhat.com> --- drivers/vhost/vdpa.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 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 i...
2020 Sep 25
0
[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()
...-- >> 1 file changed, 8 insertions(+), 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); >> +} >> + > Wouldn't it be cleaner to call...
2020 Apr 26
1
[PATCH 1/2] vdpa: Support config interrupt in vhost_vdpa
...gt; + break; > default: > r = vhost_dev_ioctl(&v->vdev, cmd, argp); > if (r == -ENOIOCTLCMD) > @@ -734,6 +786,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) > vhost_dev_stop(&v->vdev); > vhost_vdpa_iotlb_free(v); > vhost_vdpa_free_domain(v); > + vhost_vdpa_config_put(v); > vhost_dev_cleanup(&v->vdev); > kfree(v->vdev.vqs); > mutex_unlock(&d->mutex); > diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h > index 9fe72e4..c474a35 100644 > --- a/include/uapi/linux/vhost.h...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...gt; + break; > default: > r = vhost_dev_ioctl(&v->vdev, cmd, argp); > if (r == -ENOIOCTLCMD) > @@ -734,6 +780,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) > vhost_dev_stop(&v->vdev); > vhost_vdpa_iotlb_free(v); > vhost_vdpa_free_domain(v); > + vhost_vdpa_config_put(v); > vhost_dev_cleanup(&v->vdev); > kfree(v->vdev.vqs); > mutex_unlock(&d->mutex); > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index d450e16..e8f5b20 100644 > --- a/drivers/vhost/vhost.c > +++ b/driv...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...gt; + break; > default: > r = vhost_dev_ioctl(&v->vdev, cmd, argp); > if (r == -ENOIOCTLCMD) > @@ -734,6 +780,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) > vhost_dev_stop(&v->vdev); > vhost_vdpa_iotlb_free(v); > vhost_vdpa_free_domain(v); > + vhost_vdpa_config_put(v); > vhost_dev_cleanup(&v->vdev); > kfree(v->vdev.vqs); > mutex_unlock(&d->mutex); > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index d450e16..e8f5b20 100644 > --- a/drivers/vhost/vhost.c > +++ b/driv...
2020 Apr 26
0
[PATCH V3 1/2] vdpa: Support config interrupt in vhost_vdpa
...gt; + break; > default: > r = vhost_dev_ioctl(&v->vdev, cmd, argp); > if (r == -ENOIOCTLCMD) > @@ -734,6 +780,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) > vhost_dev_stop(&v->vdev); > vhost_vdpa_iotlb_free(v); > vhost_vdpa_free_domain(v); > + vhost_vdpa_config_put(v); > vhost_dev_cleanup(&v->vdev); > kfree(v->vdev.vqs); > mutex_unlock(&d->mutex); > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index d450e16..e8f5b20 100644 > --- a/drivers/vhost/vhost.c > +++ b/driv...
2020 May 28
0
[PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick
...t; } > > + if (cmd == VHOST_SET_VRING_KICK) { > + r = vhost_vdpa_set_vring_kick(vq, argp); > + return r; > + } > + > if (cmd == VHOST_GET_VRING_BASE) > vq->last_avail_idx = ops->get_vq_state(v->vdpa, idx); > > @@ -667,6 +732,39 @@ static void vhost_vdpa_free_domain(struct vhost_vdpa *v) > v->domain = NULL; > } > > +static int vhost_vdpa_poll_worker(wait_queue_entry_t *wait, unsigned int mode, > + int sync, void *key) > +{ > + struct vhost_poll *poll = container_of(wait, struct vhost_poll, wait); > + struct vhost_virtque...
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
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...)? Thanks > + > static int vhost_vdpa_release(struct inode *inode, struct file *filep) > { > struct vhost_vdpa *v = filep->private_data; > @@ -777,6 +853,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) > vhost_vdpa_iotlb_free(v); > vhost_vdpa_free_domain(v); > vhost_vdpa_config_put(v); > + vhost_vdpa_clean_irq(v); > vhost_dev_cleanup(&v->vdev); > kfree(v->vdev.vqs); > mutex_unlock(&d->mutex);
2020 Jul 28
0
[PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...+ } > +} > + > static int vhost_vdpa_release(struct inode *inode, struct file *filep) > { > struct vhost_vdpa *v = filep->private_data; > @@ -777,6 +853,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) > vhost_vdpa_iotlb_free(v); > vhost_vdpa_free_domain(v); > vhost_vdpa_config_put(v); > + vhost_vdpa_clean_irq(v); > vhost_dev_cleanup(&v->vdev); > kfree(v->vdev.vqs); > mutex_unlock(&d->mutex);
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...e, struct file > *filep) > ? { > ????? struct vhost_vdpa *v = filep->private_data; > @@ -777,6 +853,7 @@ static int vhost_vdpa_release(struct inode *inode, > struct file *filep) > ????? vhost_vdpa_iotlb_free(v); > ????? vhost_vdpa_free_domain(v); > ????? vhost_vdpa_config_put(v); > +??? vhost_vdpa_clean_irq(v); > ????? vhost_dev_cleanup(&v->vdev); > ????? kfree(v->vdev.vqs); > ????? mutex_unlock(&d->mutex); > > >
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...struct file >>> *filep) >>> ? { >>> ????? struct vhost_vdpa *v = filep->private_data; >>> @@ -777,6 +853,7 @@ static int vhost_vdpa_release(struct inode >>> *inode, struct file *filep) >>> ????? vhost_vdpa_iotlb_free(v); >>> ????? vhost_vdpa_free_domain(v); >>> ????? vhost_vdpa_config_put(v); >>> +??? vhost_vdpa_clean_irq(v); >>> ????? vhost_dev_cleanup(&v->vdev); >>> ????? kfree(v->vdev.vqs); >>> ????? mutex_unlock(&d->mutex); >>
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...gt;> ? { >>>>> ????? struct vhost_vdpa *v = filep->private_data; >>>>> @@ -777,6 +853,7 @@ static int vhost_vdpa_release(struct inode >>>>> *inode, struct file *filep) >>>>> ????? vhost_vdpa_iotlb_free(v); >>>>> ????? vhost_vdpa_free_domain(v); >>>>> ????? vhost_vdpa_config_put(v); >>>>> +??? vhost_vdpa_clean_irq(v); >>>>> ????? vhost_dev_cleanup(&v->vdev); >>>>> ????? kfree(v->vdev.vqs); >>>>> ????? mutex_unlock(&d->mutex); >>>> &g...
2020 Aug 21
9
[PATCH V2 0/3] vDPA: API for reporting IOVA range
Hi All: This series introduces API for reporing IOVA range. This is a must for userspace to work correclty: - for the process that uses vhost-vDPA directly to properly allocate IOVA - for VM(qemu), when vIOMMU is not enabled, fail early if GPA is out of range - for VM(qemu), when vIOMMU is enabled, determine a valid guest address width Please review. Changes from V1: - do not mandate
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