search for: xen_phys_to_bus

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

2015 Dec 07
0
[PATCH RFC 1/3] xen: export xen_phys_to_bus, xen_bus_to_phys and xen_virt_to_bus
...atic unsigned long xen_io_tlb_nslabs; static u64 start_dma_addr; -/* - * Both of these functions should avoid PFN_PHYS because phys_addr_t - * can be 32bit when dma_addr_t is 64bit leading to a loss in - * information if the shift is done before casting to 64bit. - */ -static inline dma_addr_t xen_phys_to_bus(phys_addr_t paddr) -{ - unsigned long bfn = pfn_to_bfn(PFN_DOWN(paddr)); - dma_addr_t dma = (dma_addr_t)bfn << PAGE_SHIFT; - - dma |= paddr & ~PAGE_MASK; - - return dma; -} - -static inline phys_addr_t xen_bus_to_phys(dma_addr_t baddr) -{ - unsigned long pfn = bfn_to_pfn(PFN_DOWN(baddr));...
2015 Dec 07
6
[PATCH RFC 0/3] Xen on Virtio
...tach_buf (see patch #3). Instead this series adds few obvious checks to perform address translations in a couple of key places, without changing non-Xen code paths. You are welcome to suggest improvements or alternative implementations. Thanks, Stefano Stefano Stabellini (3): xen: export xen_phys_to_bus, xen_bus_to_phys and xen_virt_to_bus xen/virtio: allocate a contiguous region to be use as virtio queue xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu drivers/virtio/virtio_pci_legacy.c | 19 +++++++++++++++---- drivers/virtio/virtio_ring.c | 9 +++++--...
2015 Dec 07
6
[PATCH RFC 0/3] Xen on Virtio
...tach_buf (see patch #3). Instead this series adds few obvious checks to perform address translations in a couple of key places, without changing non-Xen code paths. You are welcome to suggest improvements or alternative implementations. Thanks, Stefano Stefano Stabellini (3): xen: export xen_phys_to_bus, xen_bus_to_phys and xen_virt_to_bus xen/virtio: allocate a contiguous region to be use as virtio queue xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu drivers/virtio/virtio_pci_legacy.c | 19 +++++++++++++++---- drivers/virtio/virtio_ring.c | 9 +++++--...
2013 Aug 22
2
[PATCH] tracing/events: Add bounce tracing to swiotbl-xen
Ftrace is currently not able to detect when SWIOTLB has to do double buffering under Xen. You can only see it indirectly in function_graph, when xen_swiotlb_map_page() doesn't stop after range_straddles_page_boundary(), but calls spinlock functions, memcpy() and xen_phys_to_bus() as well. This patch introduces the swiotlb-xen:bounced event, which also prints out the following informations to help you find out why bouncing happened: dev_name: 0000:08:00.0 dma_mask=ffffffffffffffff dev_addr=9149f000 size=32768 swiotlb_force=0 If (dev_addr + size + 1) > dma_mask, the bu...
2013 Aug 22
2
[PATCH] tracing/events: Add bounce tracing to swiotbl-xen
Ftrace is currently not able to detect when SWIOTLB has to do double buffering under Xen. You can only see it indirectly in function_graph, when xen_swiotlb_map_page() doesn't stop after range_straddles_page_boundary(), but calls spinlock functions, memcpy() and xen_phys_to_bus() as well. This patch introduces the swiotlb-xen:bounced event, which also prints out the following informations to help you find out why bouncing happened: dev_name: 0000:08:00.0 dma_mask=ffffffffffffffff dev_addr=9149f000 size=32768 swiotlb_force=0 If (dev_addr + size + 1) > dma_mask, the bu...
2013 Aug 22
2
[PATCH] tracing/events: Add bounce tracing to swiotbl-xen
Ftrace is currently not able to detect when SWIOTLB has to do double buffering under Xen. You can only see it indirectly in function_graph, when xen_swiotlb_map_page() doesn't stop after range_straddles_page_boundary(), but calls spinlock functions, memcpy() and xen_phys_to_bus() as well. This patch introduces the swiotlb-xen:bounced event, which also prints out the following informations to help you find out why bouncing happened: dev_name: 0000:08:00.0 dma_mask=ffffffffffffffff dev_addr=9149f000 size=32768 swiotlb_force=0 If (dev_addr + size + 1) > dma_mask, the bu...
2013 Sep 04
1
[PATCHv2] tracing/events: Add bounce tracing to swiotbl
Ftrace is currently not able to detect when SWIOTLB has to do double buffering. Under Xen you can only see it indirectly in function_graph, when xen_swiotlb_map_page() doesn't stop after range_straddles_page_boundary(), but calls spinlock functions, memcpy() and xen_phys_to_bus() as well. This patch introduces the swiotlb:swiotlb_bounced event, which also prints out the following informations to help you find out why bouncing happened: dev_name: 0000:08:00.0 dma_mask=ffffffffffffffff dev_addr=9149f000 size=32768 swiotlb_force=0 If you use Xen, and (dev_addr + size + 1)...
2013 Sep 04
1
[PATCHv2] tracing/events: Add bounce tracing to swiotbl
Ftrace is currently not able to detect when SWIOTLB has to do double buffering. Under Xen you can only see it indirectly in function_graph, when xen_swiotlb_map_page() doesn't stop after range_straddles_page_boundary(), but calls spinlock functions, memcpy() and xen_phys_to_bus() as well. This patch introduces the swiotlb:swiotlb_bounced event, which also prints out the following informations to help you find out why bouncing happened: dev_name: 0000:08:00.0 dma_mask=ffffffffffffffff dev_addr=9149f000 size=32768 swiotlb_force=0 If you use Xen, and (dev_addr + size + 1)...
2013 Sep 04
1
[PATCHv2] tracing/events: Add bounce tracing to swiotbl
Ftrace is currently not able to detect when SWIOTLB has to do double buffering. Under Xen you can only see it indirectly in function_graph, when xen_swiotlb_map_page() doesn't stop after range_straddles_page_boundary(), but calls spinlock functions, memcpy() and xen_phys_to_bus() as well. This patch introduces the swiotlb:swiotlb_bounced event, which also prints out the following informations to help you find out why bouncing happened: dev_name: 0000:08:00.0 dma_mask=ffffffffffffffff dev_addr=9149f000 size=32768 swiotlb_force=0 If you use Xen, and (dev_addr + size + 1)...
2013 Oct 17
42
[PATCH v8 0/19] enable swiotlb-xen on arm and arm64
...limit; - arm/dmabounce: keep using arm_dma_ops; - add missing __init in xen_early_init declaration; - many code style and name changes in swiotlb-xen.c; - improve error checks in xen_dma_add_entry; - warn on XENMEM_put_dma_buf failures. Changes in v2: - fixed a couple of errors in xen_bus_to_phys, xen_phys_to_bus and xen_swiotlb_fixup. Julien Grall (1): ASoC: Samsung: Rename dma_ops by samsung_dma_ops Stefano Stabellini (18): arm: make SWIOTLB available arm64: define DMA_ERROR_CODE arm/xen,arm64/xen: introduce p2m xen/x86: allow __set_phys_to_machine for autotranslate gues...
2016 Jun 02
0
[RFC v3 20/45] xen: dma-mapping: Use unsigned long for dma_attrs
...free_coherent); dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { phys_addr_t map, phys = page_to_phys(page) + offset; dma_addr_t dev_addr = xen_phys_to_bus(phys); @@ -434,7 +434,7 @@ EXPORT_SYMBOL_GPL(xen_swiotlb_map_page); */ static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { phys_addr_t paddr = xen_bus_to_phys(...
2015 Dec 07
0
[PATCH RFC 3/3] xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu
...io_is_little_endian(vdev), val); +} + static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) { return __cpu_to_virtio64(virtio_is_little_endian(vdev), val); } +static inline __virtio64 cpu_to_virtio_addr(struct virtio_device *vdev, u64 val) +{ + val = xen_pv_domain() ? xen_phys_to_bus(val) : val; + return __cpu_to_virtio64(virtio_is_little_endian(vdev), val); +} + /* Config space accessors. */ #define virtio_cread(vdev, structname, member, ptr) \ do { \ -- 1.7.10.4
2013 Nov 11
0
[GIT PULL] (xen) stable/for-linus-3.13-rc0-tag
...otlb-xen: use xen_dma_map/unmap_page, xen_dma_sync_single_for_cpu/device swiotlb: print a warning when the swiotlb is full arm,arm64: do not always merge biovec if we are running on Xen grant-table: call set_phys_to_machine after mapping grant refs swiotlb-xen: static inline xen_phys_to_bus, xen_bus_to_phys, xen_virt_to_bus and range_straddles_page_boundary swiotlb-xen: fix error code returned by xen_swiotlb_map_sg_attrs arm: make SWIOTLB available pci-swiotlb-xen: call pci_request_acs only ifdef CONFIG_PCI swiotlb-xen: missing include dma-direction.h arm...
2010 Nov 15
2
[PATCH 00/44] remove unnecessary semicolons
ya trivial series... Joe Perches (44): arch/arm: Remove unnecessary semicolons arch/microblaze: Remove unnecessary semicolons arch/um: Remove unnecessary semicolons drivers/cpufreq: Remove unnecessary semicolons drivers/gpio: Remove unnecessary semicolons drivers/i2c: Remove unnecessary semicolons drivers/isdn: Remove unnecessary semicolons drivers/leds: Remove unnecessary
2010 Nov 15
2
[PATCH 00/44] remove unnecessary semicolons
ya trivial series... Joe Perches (44): arch/arm: Remove unnecessary semicolons arch/microblaze: Remove unnecessary semicolons arch/um: Remove unnecessary semicolons drivers/cpufreq: Remove unnecessary semicolons drivers/gpio: Remove unnecessary semicolons drivers/i2c: Remove unnecessary semicolons drivers/isdn: Remove unnecessary semicolons drivers/leds: Remove unnecessary
2010 Nov 15
2
[PATCH 00/44] remove unnecessary semicolons
ya trivial series... Joe Perches (44): arch/arm: Remove unnecessary semicolons arch/microblaze: Remove unnecessary semicolons arch/um: Remove unnecessary semicolons drivers/cpufreq: Remove unnecessary semicolons drivers/gpio: Remove unnecessary semicolons drivers/i2c: Remove unnecessary semicolons drivers/isdn: Remove unnecessary semicolons drivers/leds: Remove unnecessary
2010 Nov 15
2
[PATCH 00/44] remove unnecessary semicolons
ya trivial series... Joe Perches (44): arch/arm: Remove unnecessary semicolons arch/microblaze: Remove unnecessary semicolons arch/um: Remove unnecessary semicolons drivers/cpufreq: Remove unnecessary semicolons drivers/gpio: Remove unnecessary semicolons drivers/i2c: Remove unnecessary semicolons drivers/isdn: Remove unnecessary semicolons drivers/leds: Remove unnecessary
2016 Jun 02
52
[RFC v3 00/45] dma-mapping: Use unsigned long for dma_attrs
Hi, This is third approach (complete this time) for replacing struct dma_attrs with unsigned long. The main patch (2/45) doing the change is split into many subpatches for easier review (3-43). They should be squashed together when applying. *Important:* Patchset is *only* build tested on allyesconfigs: ARM, ARM64, i386, x86_64 and powerpc. Please provide reviewes and tests for other