Last active
December 1, 2015 02:35
-
-
Save bkrepo/6f4eea33be133ad306e3 to your computer and use it in GitHub Desktop.
Patch for KVM/ARM cpu mode check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S | |
index 0f6c100..720f3b2 100644 | |
--- a/arch/arm/kernel/sleep.S | |
+++ b/arch/arm/kernel/sleep.S | |
@@ -131,7 +131,10 @@ ENTRY(cpu_resume_arm) | |
ENTRY(cpu_resume) | |
ARM_BE8(setend be) @ ensure we are in BE mode | |
#ifdef CONFIG_ARM_VIRT_EXT | |
- bl __hyp_stub_install_secondary | |
+ mrc p15, 0, r1, c0, c0, 5 | |
+ and r1, r1, #0x3 | |
+ cmp r1, #0 | |
+ blne __hyp_stub_install_secondary | |
#endif | |
safe_svcmode_maskall r1 | |
mov r1, #0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment