summaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-06-30 19:40:39 +0200
committerChristoffer Dall <christoffer.dall@linaro.org>2016-07-03 23:41:27 +0200
commitd53d9bc65289dc50b42587313466594e4d611f0f (patch)
treebed7f9af39104671ab4d651de2db3eafba5e7f9e /arch/arm64
parentarm64: Add ARM64_HYP_OFFSET_LOW capability (diff)
downloadlinux-d53d9bc65289dc50b42587313466594e4d611f0f.tar.xz
linux-d53d9bc65289dc50b42587313466594e4d611f0f.zip
arm64: KVM: Define HYP offset masks
Define the two possible HYP VA regions in terms of VA_BITS, and keep HYP_PAGE_OFFSET_MASK as a temporary compatibility definition. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/include/asm/kvm_mmu.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h
index 2f1e1aec5ecb..5e543231f615 100644
--- a/arch/arm64/include/asm/kvm_mmu.h
+++ b/arch/arm64/include/asm/kvm_mmu.h
@@ -68,8 +68,12 @@
* functionality is already mapped as part of the main kernel
* mappings, and none of this applies in that case.
*/
-#define HYP_PAGE_OFFSET_SHIFT VA_BITS
-#define HYP_PAGE_OFFSET_MASK ((UL(1) << HYP_PAGE_OFFSET_SHIFT) - 1)
+
+#define HYP_PAGE_OFFSET_HIGH_MASK ((UL(1) << VA_BITS) - 1)
+#define HYP_PAGE_OFFSET_LOW_MASK ((UL(1) << (VA_BITS - 1)) - 1)
+
+/* Temporary compat define */
+#define HYP_PAGE_OFFSET_MASK HYP_PAGE_OFFSET_HIGH_MASK
/*
* Our virtual mapping for the idmap-ed MMU-enable code. Must be