diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2014-01-20 11:30:41 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2014-01-30 12:54:20 +0000 |
commit | e17b2f114cba5420fb28fa4bfead57d406a16533 (patch) | |
tree | 0a30053f6a3cc7bcf835b4acb61aa7a0a2d3c19b /arch/arm | |
parent | 8b271d57b57585a3e3e8cd7abc5f4d7710a0e62d (diff) | |
download | blackbird-op-linux-e17b2f114cba5420fb28fa4bfead57d406a16533.tar.gz blackbird-op-linux-e17b2f114cba5420fb28fa4bfead57d406a16533.zip |
xen: swiotlb: handle sizeof(dma_addr_t) != sizeof(phys_addr_t)
The use of phys_to_machine and machine_to_phys in the phys<=>bus conversions
causes us to lose the top bits of the DMA address if the size of a DMA address is not the same as the size of the phyiscal address.
This can happen in practice on ARM where foreign pages can be above 4GB even
though the local kernel does not have LPAE page tables enabled (which is
totally reasonable if the guest does not itself have >4GB of RAM). In this
case the kernel still maps the foreign pages at a phys addr below 4G (as it
must) but the resulting DMA address (returned by the grant map operation) is
much higher.
This is analogous to a hardware device which has its view of RAM mapped up
high for some reason.
This patch makes I/O to foreign pages (specifically blkif) work on 32-bit ARM
systems with more than 4GB of RAM.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c1f1a7eee953..24307dc85d08 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1885,6 +1885,7 @@ config XEN depends on !GENERIC_ATOMIC64 select ARM_PSCI select SWIOTLB_XEN + select ARCH_DMA_ADDR_T_64BIT help Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. |