linux_dsm_epyc7002/arch/arm64
Stefano Stabellini 4a19138c65 arm/xen,arm64/xen: introduce p2m
Introduce physical to machine and machine to physical tracking
mechanisms based on rbtrees for arm/xen and arm64/xen.

We need it because any guests on ARM are an autotranslate guests,
therefore a physical address is potentially different from a machine
address. When programming a device to do DMA, we need to be
extra-careful to use machine addresses rather than physical addresses to
program the device. Therefore we need to know the physical to machine
mappings.

For the moment we assume that dom0 starts with a 1:1 physical to machine
mapping, in other words physical addresses correspond to machine
addresses. However when mapping a foreign grant reference, obviously the
1:1 model doesn't work anymore. So at the very least we need to be able
to track grant mappings.

We need locking to protect accesses to the two trees.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Changes in v8:
- move pfn_to_mfn and mfn_to_pfn to page.h as static inline functions;
- no need to walk the tree if phys_to_mach.rb_node is NULL;
- correctly handle multipage p2m entries;
- substitute the spin_lock with a rwlock.
2013-10-17 16:22:27 +00:00
..
boot arm64: Add initial DTS for APM X-Gene Storm SOC and APM Mustang board 2013-06-20 17:03:59 +01:00
configs arm64: include VIRTIO_{MMIO,BLK} in defconfig 2013-09-30 15:51:29 +01:00
include arm64: define DMA_ERROR_CODE 2013-10-15 15:49:03 +00:00
kernel arm64: fix possible invalid FPSIMD initialization state 2013-09-27 18:21:37 +01:00
kvm arm64: KVM: add missing dsb before invalidating Stage-2 TLBs 2013-08-09 13:19:28 +01:00
lib arm64: Treat the bitops index argument as an 'int' 2013-05-08 10:33:17 +01:00
mm arm64: use correct register width when retrieving ASID 2013-09-25 16:42:23 +01:00
xen arm/xen,arm64/xen: introduce p2m 2013-10-17 16:22:27 +00:00
Kconfig Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
Kconfig.debug arm64: Remove duplicate DEBUG_STACK_USAGE config 2013-10-02 18:03:26 +01:00
Makefile arm64/Makefile: provide vdso_install target 2013-06-19 17:54:06 +01:00