search for: vdpasim_dma_op

Displaying 20 results from an estimated 22 matches for "vdpasim_dma_op".

Did you mean: vdpasim_dma_ops
2020 Feb 04
2
[PATCH 5/5] vdpasim: vDPA device simulator
On 2020/2/4 ??4:21, Zhu Lingshan wrote: >> +static const struct dma_map_ops vdpasim_dma_ops = { >> +??? .map_page = vdpasim_map_page, >> +??? .unmap_page = vdpasim_unmap_page, >> +??? .alloc = vdpasim_alloc_coherent, >> +??? .free = vdpasim_free_coherent, >> +}; >> + > > Hey Jason, > > IMHO, it would be nice if dma_ops of the parent device...
2020 Feb 04
2
[PATCH 5/5] vdpasim: vDPA device simulator
On 2020/2/4 ??4:21, Zhu Lingshan wrote: >> +static const struct dma_map_ops vdpasim_dma_ops = { >> +??? .map_page = vdpasim_map_page, >> +??? .unmap_page = vdpasim_unmap_page, >> +??? .alloc = vdpasim_alloc_coherent, >> +??? .free = vdpasim_free_coherent, >> +}; >> + > > Hey Jason, > > IMHO, it would be nice if dma_ops of the parent device...
2020 Apr 05
4
[PATCH] vdpa-sim: depend on HAS_DMA
...H=um ... drivers/vdpa/vdpa_sim/vdpa_sim.c: In function 'vdpasim_create': >> drivers/vdpa/vdpa_sim/vdpa_sim.c:324:2: error: implicit declaration of function 'set_dma_ops'; did you mean 'set_groups'? +[-Werror=implicit-function-declaration] set_dma_ops(dev, &vdpasim_dma_ops); ^~~~~~~~~~~ set_groups Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/vdpa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig index 08b615f2da39..d0cb0e583a5d 100644 --- a/drivers/vdpa/Kconf...
2020 Apr 05
4
[PATCH] vdpa-sim: depend on HAS_DMA
...H=um ... drivers/vdpa/vdpa_sim/vdpa_sim.c: In function 'vdpasim_create': >> drivers/vdpa/vdpa_sim/vdpa_sim.c:324:2: error: implicit declaration of function 'set_dma_ops'; did you mean 'set_groups'? +[-Werror=implicit-function-declaration] set_dma_ops(dev, &vdpasim_dma_ops); ^~~~~~~~~~~ set_groups Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/vdpa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig index 08b615f2da39..d0cb0e583a5d 100644 --- a/drivers/vdpa/Kconf...
2020 Apr 06
2
[PATCH] vdpa-sim: depend on HAS_DMA
On Mon, Apr 06, 2020 at 06:09:27AM -0700, Christoph Hellwig wrote: > Pleae just drop the code - we should not add new drivers with custom > DMA ops. I'm not sure there's another way to do this: this not a driver, it's a software emulator that pretends to be an actual device. We can't have the platform supply DMA ops here since the platform is a regular x86 or whatever. --
2020 Apr 06
2
[PATCH] vdpa-sim: depend on HAS_DMA
On Mon, Apr 06, 2020 at 06:09:27AM -0700, Christoph Hellwig wrote: > Pleae just drop the code - we should not add new drivers with custom > DMA ops. I'm not sure there's another way to do this: this not a driver, it's a software emulator that pretends to be an actual device. We can't have the platform supply DMA ops here since the platform is a regular x86 or whatever. --
2020 Feb 11
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...nup like releasing the IDA. > + vringh_set_iotlb(&vdpasim->vqs[0].vring, vdpasim->iommu); > + vringh_set_iotlb(&vdpasim->vqs[1].vring, vdpasim->iommu); > + > + dev = &vdpa->dev; > + dev->coherent_dma_mask = DMA_BIT_MASK(64); > + set_dma_ops(dev, &vdpasim_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; See? This error unwind is now all wrong: &gt...
2023 Jan 29
1
[PATCH v3 2/2] vdpasim: support doorbell mapping
...#define VDPASIM_QUEUE_MAX 256 > #define VDPASIM_VENDOR_ID 0 > +#define VDPASIM_VRING_POLL_PERIOD 100 /* ms */ > +#define VDPASIM_NOTIFY_DEFVAL 0xffff > > static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa) > { > @@ -246,6 +248,28 @@ static const struct dma_map_ops vdpasim_dma_ops = { > static const struct vdpa_config_ops vdpasim_config_ops; > static const struct vdpa_config_ops vdpasim_batch_config_ops; > > +static void vdpasim_notify_work(struct work_struct *work) > +{ > + struct vdpasim *vdpasim; > + u16 *val; > + > + vdpasi...
2020 Feb 04
0
[PATCH 5/5] vdpasim: vDPA device simulator
On Tue, Feb 04, 2020 at 04:28:27PM +0800, Jason Wang wrote: > > On 2020/2/4 ??4:21, Zhu Lingshan wrote: > > > +static const struct dma_map_ops vdpasim_dma_ops = { > > > +??? .map_page = vdpasim_map_page, > > > +??? .unmap_page = vdpasim_unmap_page, > > > +??? .alloc = vdpasim_alloc_coherent, > > > +??? .free = vdpasim_free_coherent, > > > +}; > > > + > > > > Hey Jason, > > > &g...
2020 Apr 06
0
[PATCH v2 1/2] vdpa-sim: depend on HAS_DMA
...H=um ... drivers/vdpa/vdpa_sim/vdpa_sim.c: In function 'vdpasim_create': >> drivers/vdpa/vdpa_sim/vdpa_sim.c:324:2: error: implicit declaration of function 'set_dma_ops'; did you mean 'set_groups'? +[-Werror=implicit-function-declaration] set_dma_ops(dev, &vdpasim_dma_ops); ^~~~~~~~~~~ set_groups Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/vdpa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig index 08b615f2da39..d0cb0e583a5d 100644 --- a/drivers/vdpa/Kconf...
2020 Apr 06
0
[PATCH] vdpa-sim: depend on HAS_DMA
...not a driver, it's a > software emulator that pretends to be an actual device. We can't > have the platform supply DMA ops here since the platform is a regular > x86 or whatever. Yes, actually vdpa-sim does not depends on HAS_DMA. Maybe we can do shortcut like dev->dma_ops = vdpasim_dma_ops; Thanks >
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...dpa_device *vdpa = dev_to_vdpa(dev); + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + struct vhost_iotlb *iommu = vdpasim->iommu; + + vhost_iotlb_del_range(iommu, (u64)dma_addr, + (u64)dma_addr + size - 1); + kfree(phys_to_virt((uintptr_t)dma_addr)); +} + +static const struct dma_map_ops vdpasim_dma_ops = { + .map_page = vdpasim_map_page, + .unmap_page = vdpasim_unmap_page, + .alloc = vdpasim_alloc_coherent, + .free = vdpasim_free_coherent, +}; + +static void vdpasim_release_dev(struct device *_d) +{ + struct vdpa_device *vdpa = dev_to_vdpa(_d); + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + +...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...dma_addr, + unsigned long attrs) +{ + struct vdpasim *vdpasim = dev_to_sim(dev); + struct vhost_iotlb *iommu = vdpasim->iommu; + + vhost_iotlb_del_range(iommu, (u64)dma_addr, + (u64)dma_addr + size - 1); + kfree(phys_to_virt((uintptr_t)dma_addr)); +} + +static const struct dma_map_ops vdpasim_dma_ops = { + .map_page = vdpasim_map_page, + .unmap_page = vdpasim_unmap_page, + .alloc = vdpasim_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 = de...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...truct vdpasim *vdpasim = vdpa_to_sim(vdpa); > + struct vhost_iotlb *iommu = vdpasim->iommu; > + > + vhost_iotlb_del_range(iommu, (u64)dma_addr, > + (u64)dma_addr + size - 1); > + kfree(phys_to_virt((uintptr_t)dma_addr)); > +} > + > +static const struct dma_map_ops vdpasim_dma_ops = { > + .map_page = vdpasim_map_page, > + .unmap_page = vdpasim_unmap_page, > + .alloc = vdpasim_alloc_coherent, > + .free = vdpasim_free_coherent, > +}; > + > +static void vdpasim_release_dev(struct device *_d) > +{ > + struct vdpa_device *vdpa = dev_to_vdpa(_d); > +...
2020 Jul 11
0
[vhost:config-endian 33/36] drivers/vdpa/vdpa_sim/vdpa_sim.c:335:21: sparse: sparse: incorrect type in assignment (different base types)
...c Jason Wang 2020-03-26 322 dev = &vdpasim->vdpa.dev; 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 323 dev->coherent_dma_mask = DMA_BIT_MASK(64); 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 324 set_dma_ops(dev, &vdpasim_dma_ops); 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 325 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 326 vdpasim->iommu = vhost_iotlb_alloc(2048, 0); 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 32...
2020 Jul 01
5
[PATCH 0/5]
Hi all: This series tries to support batched IOTLB updating vhost-vdpa. Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it can only forward one mapping to IOMMU or device through IOMMU API or dma_map(). Though set_map() is designed to have the capability to pass an rbtree based mapping to vDPA device, it's still be called at least once for each VHOST_IOTLB_UPDATE or
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
2020 Jun 18
6
[PATCH RFC 0/5] support batched IOTLB updating in vhost-vdpa
Hi all: This series tries to support batched IOTLB updating vhost-vdpa. Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it can only forward one mapping to IOMMU or device through IOMMU API or dma_map(). Though set_map() is deisgend to have the capability to pass an rbtree based mapping to vDPA device, it's still be called at least once for each VHOST_IOTLB_UPDATE or
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 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