]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: use ID map with increased VA range if required
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 19 Mar 2015 16:42:28 +0000 (16:42 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 23 Mar 2015 11:35:29 +0000 (11:35 +0000)
commit65604369fbc9643832159c4f0f652614c45dad0f
treebc04e772bb53b5166ffd5bfce36c99ca32a4b0e5
parent7d8c8e5c1fb935b26f8f2267a5a4274515402386
arm64: KVM: use ID map with increased VA range if required

This patch modifies the HYP init code so it can deal with system
RAM residing at an offset which exceeds the reach of VA_BITS.

Like for EL1, this involves configuring an additional level of
translation for the ID map. However, in case of EL2, this implies
that all translations use the extra level, as we cannot seamlessly
switch between translation tables with different numbers of
translation levels.

So add an extra translation table at the root level. Since the
ID map and the runtime HYP map are guaranteed not to overlap, they
can share this root level, and we can essentially merge these two
tables into one.

Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/include/asm/kvm_mmu.h
arch/arm/kvm/mmu.c
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kvm/hyp-init.S