summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarc Zyngier <Marc.Zyngier@arm.com>2013-11-05 19:29:45 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2013-11-06 11:10:01 +0100
commit18ea3dbc9e5c8a53a361b17c4a5676ea6f4bcb72 (patch)
treee810b44dc26c718fd52d4e8ad4f5a6d4aafe9b36 /arch
parentarm64: compat: Clear the IT state independent of the 32-bit ARM or Thumb-2 mode (diff)
downloadlinux-18ea3dbc9e5c8a53a361b17c4a5676ea6f4bcb72.tar.xz
linux-18ea3dbc9e5c8a53a361b17c4a5676ea6f4bcb72.zip
arm64: KVM: initialize HYP mode following the kernel endianness
Force SCTLR_EL2.EE to 1 if the kernel is compiled as BE. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to '')
-rw-r--r--arch/arm64/kvm/hyp-init.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S
index ba84e6705e20..2b0244d65c16 100644
--- a/arch/arm64/kvm/hyp-init.S
+++ b/arch/arm64/kvm/hyp-init.S
@@ -74,7 +74,10 @@ __do_hyp_init:
msr mair_el2, x4
isb
- mov x4, #SCTLR_EL2_FLAGS
+ mrs x4, sctlr_el2
+ and x4, x4, #SCTLR_EL2_EE // preserve endianness of EL2
+ ldr x5, =SCTLR_EL2_FLAGS
+ orr x4, x4, x5
msr sctlr_el2, x4
isb