search for: vhost_iotlb_free

Displaying 13 results from an estimated 13 matches for "vhost_iotlb_free".

2020 Feb 20
0
[PATCH V3 1/5] vhost: factor out IOTLB
...atic void vhost_clear_msg(struct vhost_dev *dev) { struct vhost_msg_node *node, *n; @@ -677,9 +655,9 @@ void vhost_dev_cleanup(struct vhost_dev *dev) eventfd_ctx_put(dev->log_ctx); dev->log_ctx = NULL; /* No one will access memory at this point */ - vhost_umem_clean(dev->umem); + vhost_iotlb_free(dev->umem); dev->umem = NULL; - vhost_umem_clean(dev->iotlb); + vhost_iotlb_free(dev->iotlb); dev->iotlb = NULL; vhost_clear_msg(dev); wake_up_interruptible_poll(&dev->wait, EPOLLIN | EPOLLRDNORM); @@ -715,27 +693,26 @@ static bool vhost_overflow(u64 uaddr, u64 size)...
2020 Feb 11
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...ret) > + goto err_init; > + > + ret = vdpa_register_device(vdpa); > + if (ret) > + goto err_register; See? This error unwind is now all wrong: > + > + return vdpasim; > + > +err_register: > + put_device(&vdpa->dev); Double put_device > +err_init: > + vhost_iotlb_free(vdpasim->iommu); > +err_iotlb: > + kfree(vdpasim->buffer); > +err_buffer_alloc: > + kfree(vdpasim); kfree after vdpa_init_device() is incorrect, as the put_device now does kfree via release > +static int __init vdpasim_dev_init(void) > +{ > + struct device *dev; > +...
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2020 Jul 16
0
[PATCH vhost next 05/10] vhost: Fix documentation
...host/iotlb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/vhost/iotlb.c b/drivers/vhost/iotlb.c > index 1f0ca6e44410..0d4213a54a88 100644 > --- a/drivers/vhost/iotlb.c > +++ b/drivers/vhost/iotlb.c > @@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(vhost_iotlb_free); > * vhost_iotlb_itree_first - return the first overlapped range > * @iotlb: the IOTLB > * @start: start of IOVA range > - * @end: end of IOVA range > + * @last: last byte in IOVA range > */ > struct vhost_iotlb_map * > vhost_iotlb_itree_first(struct vhost_i...
2020 Jul 21
0
[PATCH V2 vhost next 05/10] vhost: Fix documentation
...host/iotlb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/vhost/iotlb.c b/drivers/vhost/iotlb.c > index 1f0ca6e44410..0d4213a54a88 100644 > --- a/drivers/vhost/iotlb.c > +++ b/drivers/vhost/iotlb.c > @@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(vhost_iotlb_free); > * vhost_iotlb_itree_first - return the first overlapped range > * @iotlb: the IOTLB > * @start: start of IOVA range > - * @end: end of IOVA range > + * @last: last byte in IOVA range > */ > struct vhost_iotlb_map * > vhost_iotlb_itree_first(struct vhost_i...
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
Hi all: This is an updated version of kernel support for vDPA device. Various changes were made based on the feedback since last verion. One major change is to drop the sysfs API and leave the management interface for future development, and introudce the incremental DMA bus operations. Please see changelog for more information. The work on vhost, IFCVF (intel VF driver for vDPA) and qemu is
2023 Jan 29
1
[PATCH v3 2/2] vdpasim: support doorbell mapping
...int i; > > + cancel_delayed_work_sync(&vdpasim->notify_work); > cancel_work_sync(&vdpasim->work); > > for (i = 0; i < vdpasim->dev_attr.nvqs; i++) { > @@ -693,6 +752,8 @@ static void vdpasim_free(struct vdpa_device *vdpa) > vhost_iotlb_free(vdpasim->iommu); > kfree(vdpasim->vqs); > kfree(vdpasim->config); > + if (vdpasim->notify) > + free_page(vdpasim->notify); > } > > static const struct vdpa_config_ops vdpasim_config_ops = { > @@ -704,6 +765,8 @@ static con...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...m_alloc_coherent, + .free = vdpasim_free_coherent, +}; + +static const struct vdpa_config_ops vdpasim_net_config_ops; + +static void vdpasim_device_release(struct device *dev) +{ + struct vdpasim *vdpasim = dev_to_sim(dev); + + cancel_work_sync(&vdpasim->work); + kfree(vdpasim->buffer); + vhost_iotlb_free(vdpasim->iommu); + kfree(vdpasim); +} + +static struct vdpasim *vdpasim_create(void) +{ + struct virtio_net_config *config; + struct vhost_iotlb *iommu; + struct vdpasim *vdpasim; + struct device *dev; + void *buffer; + int ret = -ENOMEM; + + iommu = vhost_iotlb_alloc(2048, 0); + if (!iommu) +...
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...m_dma_ops); + + ret = vdpa_init_device(vdpa, &vdpasim_dev->dev, dev, + &vdpasim_net_config_ops); + if (ret) + goto err_init; + + ret = vdpa_register_device(vdpa); + if (ret) + goto err_register; + + return vdpasim; + +err_register: + put_device(&vdpa->dev); +err_init: + vhost_iotlb_free(vdpasim->iommu); +err_iotlb: + kfree(vdpasim->buffer); +err_buffer_alloc: + kfree(vdpasim); +err_vdpa_alloc: + return ERR_PTR(ret); +} + +static int vdpasim_set_vq_address(struct vdpa_device *vdpa, u16 idx, + u64 desc_area, u64 driver_area, + u64 device_area) +{ + struct vdpasim *vd...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...dev, > + &vdpasim_net_config_ops); > + if (ret) > + goto err_init; > + > + ret = vdpa_register_device(vdpa); > + if (ret) > + goto err_register; > + > + return vdpasim; > + > +err_register: > + put_device(&vdpa->dev); > +err_init: > + vhost_iotlb_free(vdpasim->iommu); > +err_iotlb: > + kfree(vdpasim->buffer); > +err_buffer_alloc: > + kfree(vdpasim); > +err_vdpa_alloc: > + return ERR_PTR(ret); > +} > + > +static int vdpasim_set_vq_address(struct vdpa_device *vdpa, u16 idx, > + u64 desc_area, u64 driver_are...
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