301-arm64-don-t-issue-HVC-on-boot.patch 956 B

123456789101112131415161718192021222324252627282930
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  2. Date: Thu, 12 Aug 2021 11:52:42 +0200
  3. Subject: [PATCH] arm64: don't issue HVC on boot
  4. MIME-Version: 1.0
  5. Content-Type: text/plain; charset=UTF-8
  6. Content-Transfer-Encoding: 8bit
  7. Broadcom's CFE loader seems to miss setting SCR_EL3.HCE which results in
  8. generating an UNDEF and kernel panic on the first HVC.
  9. HVC gets issued by kernels 5.12+ while booting, by kexec and KVM. Until
  10. someone finds a workaround we have to avoid all above.
  11. Workarounds: 0c93df9622d4 ("arm64: Initialise as nVHE before switching to VHE")
  12. Signed-off-by: Rafał Miłecki <[email protected]>
  13. ---
  14. arch/arm64/kernel/hyp-stub.S | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. --- a/arch/arm64/kernel/hyp-stub.S
  17. +++ b/arch/arm64/kernel/hyp-stub.S
  18. @@ -238,7 +238,7 @@ SYM_FUNC_START(switch_to_vhe)
  19. // Turn the world upside down
  20. mov x0, #HVC_VHE_RESTART
  21. - hvc #0
  22. +// hvc #0
  23. 1:
  24. ret
  25. SYM_FUNC_END(switch_to_vhe)