summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/head.S
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-12-08 20:51:49 +0100
committerMarc Zyngier <maz@kernel.org>2020-12-08 20:51:49 +0100
commit0cc519f85a527e1c5ad5a7f182105fe614e9ff80 (patch)
tree30ef8feb1a22f4af0b03d85f58ba339048524bfc /arch/arm64/kernel/head.S
parentKVM: arm64: Fix EL2 mode availability checks (diff)
downloadlinux-0cc519f85a527e1c5ad5a7f182105fe614e9ff80.tar.xz
linux-0cc519f85a527e1c5ad5a7f182105fe614e9ff80.zip
KVM: arm64: Fix nVHE boot on VHE systems
Conflict resolution gone astray results in the kernel not booting on VHE-capable HW when VHE support is disabled. Thankfully spotted by David. Reported-by: David Brazdil <dbrazdil@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to '')
-rw-r--r--arch/arm64/kernel/head.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 7eba3a1e84b0..957683029438 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -515,8 +515,11 @@ SYM_INNER_LABEL(init_el2, SYM_L_LOCAL)
*/
mrs x2, id_aa64mmfr1_el1
ubfx x2, x2, #ID_AA64MMFR1_VHE_SHIFT, #4
- cbz x2, init_el2_nvhe
+#else
+ mov x2, xzr
#endif
+ cbz x2, init_el2_nvhe
+
/*
* When VHE _is_ in use, EL1 will not be used in the host and
* requires no configuration, and all non-hyp-specific EL2 setup