aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/kvm_arm.h
diff options
context:
space:
mode:
authorSuzuki K Poulose <suzuki.poulose@arm.com>2018-09-26 17:32:44 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2018-10-01 13:50:30 +0100
commite55cac5bf2a9cc86b57a9533d6b9e5005bc19b5c (patch)
treeb8bb0ba718f87a4485b270afdd4ea14f4a8fa1cf /arch/arm/include/asm/kvm_arm.h
parentkvm: arm64: Configure VTCR_EL2 per VM (diff)
downloadlinux-dev-e55cac5bf2a9cc86b57a9533d6b9e5005bc19b5c.tar.xz
linux-dev-e55cac5bf2a9cc86b57a9533d6b9e5005bc19b5c.zip
kvm: arm/arm64: Prepare for VM specific stage2 translations
Right now the stage2 page table for a VM is hard coded, assuming an IPA of 40bits. As we are about to add support for per VM IPA, prepare the stage2 page table helpers to accept the kvm instance to make the right decision for the VM. No functional changes. Adds stage2_pgd_size(kvm) to replace S2_PGD_SIZE. Also, moves some of the definitions in arm32 to align with the arm64. Also drop the _AC() specifier constants wherever possible. Cc: Christoffer Dall <cdall@kernel.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include/asm/kvm_arm.h')
-rw-r--r--arch/arm/include/asm/kvm_arm.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/include/asm/kvm_arm.h b/arch/arm/include/asm/kvm_arm.h
index 3ab8b3781bfe..c3f1f9b304b7 100644
--- a/arch/arm/include/asm/kvm_arm.h
+++ b/arch/arm/include/asm/kvm_arm.h
@@ -133,8 +133,7 @@
* space.
*/
#define KVM_PHYS_SHIFT (40)
-#define KVM_PHYS_SIZE (_AC(1, ULL) << KVM_PHYS_SHIFT)
-#define KVM_PHYS_MASK (KVM_PHYS_SIZE - _AC(1, ULL))
+
#define PTRS_PER_S2_PGD (_AC(1, ULL) << (KVM_PHYS_SHIFT - 30))
/* Virtualization Translation Control Register (VTCR) bits */