Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18ea3dbc authored by Marc Zyngier's avatar Marc Zyngier Committed by Catalin Marinas
Browse files

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: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent aa62c209
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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