Skip to content
Commit 5f5560b1 authored by James Morse's avatar James Morse Committed by Christoffer Dall
Browse files

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: default avatarMarc Zyngier <marc.zyngier@arm.com>
Acked-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
Fixes: 1e947bad ("arm64: KVM: Skip HYP setup when already running in HYP")
Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent cb678d60
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment