search for: unmap_sg

Displaying 20 results from an estimated 33 matches for "unmap_sg".

2015 Dec 14
3
[Xen-devel] [PATCH RFC 0/3] Xen on Virtio
...t Linux virtio drivers use virt_to_phys to get the > > guest pseudo-physical addresses to pass to the backend, which doesn't > > work as expected on Xen. > > > > Switching the virtio drivers to the dma APIs (dma_alloc_coherent, > > dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as > > Xen support in Linux provides an implementation of the dma API which > > takes care of the additional address conversions. However using the dma > > API would increase the complexity of the non-Xen case too. We would also > > need to keep tra...
2015 Dec 14
3
[Xen-devel] [PATCH RFC 0/3] Xen on Virtio
...t Linux virtio drivers use virt_to_phys to get the > > guest pseudo-physical addresses to pass to the backend, which doesn't > > work as expected on Xen. > > > > Switching the virtio drivers to the dma APIs (dma_alloc_coherent, > > dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as > > Xen support in Linux provides an implementation of the dma API which > > takes care of the additional address conversions. However using the dma > > API would increase the complexity of the non-Xen case too. We would also > > need to keep tra...
2015 Dec 07
6
[PATCH RFC 0/3] Xen on Virtio
...devices (nested virt scenario). The problem is that Linux virtio drivers use virt_to_phys to get the guest pseudo-physical addresses to pass to the backend, which doesn't work as expected on Xen. Switching the virtio drivers to the dma APIs (dma_alloc_coherent, dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as Xen support in Linux provides an implementation of the dma API which takes care of the additional address conversions. However using the dma API would increase the complexity of the non-Xen case too. We would also need to keep track of the physical or virtual address in...
2015 Dec 07
6
[PATCH RFC 0/3] Xen on Virtio
...devices (nested virt scenario). The problem is that Linux virtio drivers use virt_to_phys to get the guest pseudo-physical addresses to pass to the backend, which doesn't work as expected on Xen. Switching the virtio drivers to the dma APIs (dma_alloc_coherent, dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as Xen support in Linux provides an implementation of the dma API which takes care of the additional address conversions. However using the dma API would increase the complexity of the non-Xen case too. We would also need to keep track of the physical or virtual address in...
2015 Dec 15
2
[Xen-devel] [PATCH RFC 0/3] Xen on Virtio
...et the > >> > guest pseudo-physical addresses to pass to the backend, which doesn't > >> > work as expected on Xen. > >> > > >> > Switching the virtio drivers to the dma APIs (dma_alloc_coherent, > >> > dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as > >> > Xen support in Linux provides an implementation of the dma API which > >> > takes care of the additional address conversions. However using the dma > >> > API would increase the complexity of the non-Xen case too. We would also...
2015 Dec 15
2
[Xen-devel] [PATCH RFC 0/3] Xen on Virtio
...et the > >> > guest pseudo-physical addresses to pass to the backend, which doesn't > >> > work as expected on Xen. > >> > > >> > Switching the virtio drivers to the dma APIs (dma_alloc_coherent, > >> > dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as > >> > Xen support in Linux provides an implementation of the dma API which > >> > takes care of the additional address conversions. However using the dma > >> > API would increase the complexity of the non-Xen case too. We would also...
2015 Dec 15
1
[Xen-devel] [PATCH RFC 0/3] Xen on Virtio
...et the > >> > guest pseudo-physical addresses to pass to the backend, which doesn't > >> > work as expected on Xen. > >> > > >> > Switching the virtio drivers to the dma APIs (dma_alloc_coherent, > >> > dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as > >> > Xen support in Linux provides an implementation of the dma API which > >> > takes care of the additional address conversions. However using the dma > >> > API would increase the complexity of the non-Xen case too. We would also...
2015 Dec 15
1
[Xen-devel] [PATCH RFC 0/3] Xen on Virtio
...et the > >> > guest pseudo-physical addresses to pass to the backend, which doesn't > >> > work as expected on Xen. > >> > > >> > Switching the virtio drivers to the dma APIs (dma_alloc_coherent, > >> > dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as > >> > Xen support in Linux provides an implementation of the dma API which > >> > takes care of the additional address conversions. However using the dma > >> > API would increase the complexity of the non-Xen case too. We would also...
2014 Aug 25
6
virtio DMA API?
Currently, a lot of the virtio code assumes that bus (i.e. hypervisor) addresses are the same as physical address. This is false on Xen, so virtio is completely broken. I wouldn't be surprised if it also becomes a problem the first time that someone sticks a physical "virtio" device on a 32-bit bus on an ARM SOC with more than 4G RAM. Would you accept patches to convert
2014 Aug 25
6
virtio DMA API?
Currently, a lot of the virtio code assumes that bus (i.e. hypervisor) addresses are the same as physical address. This is false on Xen, so virtio is completely broken. I wouldn't be surprised if it also becomes a problem the first time that someone sticks a physical "virtio" device on a 32-bit bus on an ARM SOC with more than 4G RAM. Would you accept patches to convert
2015 Dec 14
0
[Xen-devel] [PATCH RFC 0/3] Xen on Virtio
.... > The problem is that Linux virtio drivers use virt_to_phys to get the > guest pseudo-physical addresses to pass to the backend, which doesn't > work as expected on Xen. > > Switching the virtio drivers to the dma APIs (dma_alloc_coherent, > dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as > Xen support in Linux provides an implementation of the dma API which > takes care of the additional address conversions. However using the dma > API would increase the complexity of the non-Xen case too. We would also > need to keep track of the physical o...
2014 Aug 25
0
virtio DMA API?
...will be that > virtio_ring's approach to freeing indirect blocks is currently > incompatible with the DMA API -- it assumes that knowing the bus > address is enough to call kfree, and I don't think that the DMA API > provides a reverse mapping like that. If you use the dma_map/unmap_sg all of that ends up being stuck in the sg structure (sg->dma_address ends with the DMA addr, sg_phys(sg) gives you the physical address). > > --Andy > > -- > Andy Lutomirski > AMA Capital Management, LLC
2015 Dec 14
0
[Xen-devel] [PATCH RFC 0/3] Xen on Virtio
...ers use virt_to_phys to get the >> > guest pseudo-physical addresses to pass to the backend, which doesn't >> > work as expected on Xen. >> > >> > Switching the virtio drivers to the dma APIs (dma_alloc_coherent, >> > dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as >> > Xen support in Linux provides an implementation of the dma API which >> > takes care of the additional address conversions. However using the dma >> > API would increase the complexity of the non-Xen case too. We would also >> >...
2015 Dec 15
0
[Xen-devel] [PATCH RFC 0/3] Xen on Virtio
...> > guest pseudo-physical addresses to pass to the backend, which doesn't >> >> > work as expected on Xen. >> >> > >> >> > Switching the virtio drivers to the dma APIs (dma_alloc_coherent, >> >> > dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as >> >> > Xen support in Linux provides an implementation of the dma API which >> >> > takes care of the additional address conversions. However using the dma >> >> > API would increase the complexity of the non-Xen case too. W...
2015 Dec 07
0
[PATCH RFC 3/3] xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu
...gned-off-by: Stefano Stabellini <stefano.stabellini at eu.citrix.com> --- I realize that this patch is not very nice, but at least it is easy to understand. I welcome any suggestions on how to improve it. I considered introducing regular dma API calls, like dma_map/unmap_single and dma_map/unmap_sg. However they would make the non-Xen code path more complex than it is today. We would also need to keep track of the physical or virtual address in addition to the dma address for each vring_desc to be able to free the memory in detach_buf. --- drivers/virtio/virtio_ring.c | 9 +++++---- inc...
2020 Sep 15
0
[PATCH 15/18] dma-mapping: add a new dma_alloc_pages API
...dma_direct_supported, }; diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index ba16b7f8f80612..8cf0b9c8bdf795 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -1024,6 +1024,8 @@ static const struct dma_map_ops ccio_ops = { .map_sg = ccio_map_sg, .unmap_sg = ccio_unmap_sg, .get_sgtable = dma_common_get_sgtable, + .alloc_pages = dma_common_alloc_pages, + .free_pages = dma_common_free_pages, }; #ifdef CONFIG_PROC_FS diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index 959bda193b9603..6fcde7980358ae 100644 --- a/drivers/...
2019 Sep 08
7
[PATCH v6 0/5] iommu/amd: Convert the AMD iommu driver to the dma-iommu api
Convert the AMD iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the AMD iommu driver. Change-log: V6: -add more details to the description of patch 001-iommu-amd-Remove-unnecessary-locking-from-AMD-iommu-.patch -rename handle_deferred_device to iommu_dma_deferred_attach -fix double tabs in 0003-iommu-dma-iommu-Handle-deferred-devices.patch V5: -Rebase on
2019 Jun 13
8
[PATCH v4 0/5] iommu/amd: Convert the AMD iommu driver to the dma-iommu api
Convert the AMD iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the AMD iommu driver. Change-log: V4: -Rebase on top of linux-next -Split the removing of the unnecessary locking in the amd iommu driver into a seperate patch -refactor the "iommu/dma-iommu: Handle deferred devices" patch and address comments v3: -rename dma_limit to dma_mask -exit
2019 Jun 13
8
[PATCH v4 0/5] iommu/amd: Convert the AMD iommu driver to the dma-iommu api
Convert the AMD iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the AMD iommu driver. Change-log: V4: -Rebase on top of linux-next -Split the removing of the unnecessary locking in the amd iommu driver into a seperate patch -refactor the "iommu/dma-iommu: Handle deferred devices" patch and address comments v3: -rename dma_limit to dma_mask -exit
2020 Aug 19
0
[PATCH 19/28] dma-mapping: replace DMA_ATTR_NON_CONSISTENT with dma_{alloc, free}_pages
..._netdev(dev); return 0; diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index a5507f75b524c4..ae557e740781e3 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -1025,6 +1025,8 @@ static const struct dma_map_ops ccio_ops = { .map_sg = ccio_map_sg, .unmap_sg = ccio_unmap_sg, .get_sgtable = dma_common_get_sgtable, + .alloc_pages = dma_common_alloc_pages, + .free_pages = dma_common_free_pages, }; #ifdef CONFIG_PROC_FS diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index d4314fba026914..d3514c5761a944 100644 --- a/drivers/...