Skip to content
Commit cb96408d authored by Vladimir Murzin's avatar Vladimir Murzin Committed by Christoffer Dall
Browse files

arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2

SCTLR_EL2.SPAN bit controls what happens with the PSTATE.PAN bit on an
exception. However, this bit has no effect on the PSTATE.PAN when
HCR_EL2.E2H or HCR_EL2.TGE is unset. Thus when VHE is used and
exception taken from a guest PSTATE.PAN bit left unchanged and we
continue with a value guest has set.

To address that always reset PSTATE.PAN on entry from EL1.

Fixes: 1f364c8c

 ("arm64: VHE: Add support for running Linux in EL2 mode")

Signed-off-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: default avatarJames Morse <james.morse@arm.com>
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Cc: <stable@vger.kernel.org> # v4.6+
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent cf0ba18a
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