linux/arch/arm/xen
Julien Grall 9435cce879 xen/swiotlb: Add support for 64KB page granularity
Swiotlb is used on ARM64 to support DMA on platform where devices are
not protected by an SMMU. Furthermore it's only enabled for DOM0.

While Xen is always using 4KB page granularity in the stage-2 page table,
Linux ARM64 may either use 4KB or 64KB. This means that a Linux page
can be spanned accross multiple Xen page.

The Swiotlb code has to validate that the buffer used for DMA is
physically contiguous in the memory. As a Linux page can't be shared
between local memory and foreign page by design (the balloon code always
removing entirely a Linux page), the changes in the code are very
minimal because we only need to check the first Xen PFN.

Note that it may be possible to optimize the function
check_page_physically_contiguous to avoid looping over every Xen PFN
for local memory. Although I will let this optimization for a follow-up.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2015-10-23 14:20:43 +01:00
..
enlighten.c arm/xen: Add support for 64KB page granularity 2015-10-23 14:20:42 +01:00
grant-table.c arm/xen: remove duplicate arch_gnttab_init() function 2014-08-11 11:59:14 +01:00
hypercall.S arm/xen: Enable user access to the kernel before issuing a privcmd call 2015-09-11 18:50:03 +01:00
Makefile xen/arm/arm64: merge xen/mm32.c into xen/mm.c 2014-12-04 12:41:53 +00:00
mm.c xen/swiotlb: Add support for 64KB page granularity 2015-10-23 14:20:43 +01:00
p2m.c xen/grant-table: Make it running on 64KB granularity 2015-10-23 14:20:39 +01:00