arm64: KVM: Skip HYP setup when already running in HYP
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 29 Jan 2015 11:59:54 +0000 (11:59 +0000)
committerAlex Shi <alex.shi@linaro.org>
Thu, 17 Nov 2016 01:49:38 +0000 (09:49 +0800)
commit3fe3980002d4a21a23bfb13edc0e53e610535fb4
treea9e3e1f9d606ebe521fdb998a31476f6430bbdf8
parent6f7056c069f26c3dca1d94778708b91d5dbdb8a0
arm64: KVM: Skip HYP setup when already running in HYP

With the kernel running at EL2, there is no point trying to
configure page tables for HYP, as the kernel is already mapped.

Take this opportunity to refactor the whole init a bit, allowing
the various parts of the hypervisor bringup to be split across
multiple functions.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
(cherry picked from commit 1e947bad0b63b351cbdd9ad55ea5bf7e31c76036)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm/kvm/arm.c
arch/arm/kvm/mmu.c