summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/hyp-init.S
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-12 08:43:53 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-12 08:43:53 +0200
commit81606aea2303aa11867e97030299b1057091c2fd (patch)
treef9231fa1ebc03221afc54507602ee0ff057da2cb /arch/arm64/kvm/hyp-init.S
parentef189c8dde9a82962ddb2511ee00ab8d4719dfca (diff)
parent32c1431eea4881a6b17bd7c639315010aeefa452 (diff)
Merge 4.12-rc5 into usb-next
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm64/kvm/hyp-init.S')
-rw-r--r--arch/arm64/kvm/hyp-init.S11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S
index 839425c24b1c..3f9615582377 100644
--- a/arch/arm64/kvm/hyp-init.S
+++ b/arch/arm64/kvm/hyp-init.S
@@ -106,10 +106,13 @@ __do_hyp_init:
tlbi alle2
dsb sy
- mrs x4, sctlr_el2
- and x4, x4, #SCTLR_ELx_EE // preserve endianness of EL2
- ldr x5, =SCTLR_ELx_FLAGS
- orr x4, x4, x5
+ /*
+ * Preserve all the RES1 bits while setting the default flags,
+ * as well as the EE bit on BE. Drop the A flag since the compiler
+ * is allowed to generate unaligned accesses.
+ */
+ ldr x4, =(SCTLR_EL2_RES1 | (SCTLR_ELx_FLAGS & ~SCTLR_ELx_A))
+CPU_BE( orr x4, x4, #SCTLR_ELx_EE)
msr sctlr_el2, x4
isb