]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Register CPU notifiers when the kernel runs at HYP
authorJames Morse <james.morse@arm.com>
Wed, 30 Mar 2016 17:33:04 +0000 (18:33 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 31 Mar 2016 08:27:28 +0000 (10:27 +0200)
commit3ad726e9d67a104f2cd4173ae295dda8fd8e6ca7
treeee1161f6938722bf368979a8dfb73e1a5347b270
parentfc90afd398883b3a7263b48367044adef5eb1995
arm64: KVM: Register CPU notifiers when the kernel runs at HYP

When the kernel is running at EL2, it doesn't need init_hyp_mode() to
configure page tables for HYP. This function also registers the CPU
hotplug and lower power notifiers that cause HYP to be re-initialised
after the CPU has been reset.

To avoid losing the register state that controls stage2 translation, move
the registering of these notifiers into init_subsystems(), and add a
is_kernel_in_hyp_mode() path to each callback.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Fixes: a628ab2ce98 ("arm64: KVM: Skip HYP setup when already running in HYP")
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/kvm/arm.c