Displaying 8 results from an estimated 8 matches for "vhost_map_rw".
Did you mean:
vhost_map_ro
2020 Feb 04
0
[PATCH 5/5] vdpasim: vDPA device simulator
...virt_to_phys(addr);
> 55047769b3e974 Jason Wang 2020-01-16 277
> 55047769b3e974 Jason Wang 2020-01-16 278 ret = vhost_iotlb_add_range(iommu, (u64)pa,
> 55047769b3e974 Jason Wang 2020-01-16 279 (u64)pa + size - 1,
> 55047769b3e974 Jason Wang 2020-01-16 280 pa, VHOST_MAP_RW);
> 55047769b3e974 Jason Wang 2020-01-16 281 if (ret) {
> 55047769b3e974 Jason Wang 2020-01-16 282 kfree(addr);
> ^^^^^^^^^^^
> 55047769b3e974 Jason Wang 2020-01-16 283 *dma_addr = DMA_MAPPING_ERROR;
> 550...
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...}
+
+out:
+ spin_unlock(&vdpasim->lock);
+}
+
+static int dir_to_perm(enum dma_data_direction dir)
+{
+ int perm = -EFAULT;
+
+ switch (dir) {
+ case DMA_FROM_DEVICE:
+ perm = VHOST_MAP_WO;
+ break;
+ case DMA_TO_DEVICE:
+ perm = VHOST_MAP_RO;
+ break;
+ case DMA_BIDIRECTIONAL:
+ perm = VHOST_MAP_RW;
+ break;
+ default:
+ break;
+ }
+
+ return perm;
+}
+
+static dma_addr_t vdpasim_map_page(struct device *dev, struct page *page,
+ unsigned long offset, size_t size,
+ enum dma_data_direction dir,
+ unsigned long attrs)
+{
+ struct vdpa_device *vdpa = dev_to_vdpa(dev);
+ struc...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...}
+
+out:
+ spin_unlock(&vdpasim->lock);
+}
+
+static int dir_to_perm(enum dma_data_direction dir)
+{
+ int perm = -EFAULT;
+
+ switch (dir) {
+ case DMA_FROM_DEVICE:
+ perm = VHOST_MAP_WO;
+ break;
+ case DMA_TO_DEVICE:
+ perm = VHOST_MAP_RO;
+ break;
+ case DMA_BIDIRECTIONAL:
+ perm = VHOST_MAP_RW;
+ break;
+ default:
+ break;
+ }
+
+ return perm;
+}
+
+static dma_addr_t vdpasim_map_page(struct device *dev, struct page *page,
+ unsigned long offset, size_t size,
+ enum dma_data_direction dir,
+ unsigned long attrs)
+{
+ struct vdpasim *vdpasim = dev_to_sim(dev);
+ struct...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...int dir_to_perm(enum dma_data_direction dir)
> +{
> + int perm = -EFAULT;
> +
> + switch (dir) {
> + case DMA_FROM_DEVICE:
> + perm = VHOST_MAP_WO;
> + break;
> + case DMA_TO_DEVICE:
> + perm = VHOST_MAP_RO;
> + break;
> + case DMA_BIDIRECTIONAL:
> + perm = VHOST_MAP_RW;
> + break;
> + default:
> + break;
> + }
> +
> + return perm;
> +}
> +
> +static dma_addr_t vdpasim_map_page(struct device *dev, struct page *page,
> + unsigned long offset, size_t size,
> + enum dma_data_direction dir,
> + unsigned long attr...
2020 Feb 20
0
[PATCH V3 1/5] vhost: factor out IOTLB
...est_phys_addr +
- region->memory_size - 1,
- region->userspace_addr,
- VHOST_ACCESS_RW))
+ if (vhost_iotlb_add_range(newumem,
+ region->guest_phys_addr,
+ region->guest_phys_addr +
+ region->memory_size - 1,
+ region->userspace_addr,
+ VHOST_MAP_RW))
goto err;
}
@@ -1481,11 +1400,11 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m)
}
kvfree(newmem);
- vhost_umem_clean(oldumem);
+ vhost_iotlb_free(oldumem);
return 0;
err:
- vhost_umem_clean(newumem);
+ vhost_iotlb_free(newumem);
kvfree(new...
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 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