Skip to content

Commit b38b298

Browse files
David BrazdilMarc Zyngier
authored andcommitted
KVM: arm64: Fix symbol dependency in __hyp_call_panic_nvhe
__hyp_call_panic_nvhe contains inline assembly which did not declare its dependency on the __hyp_panic_string symbol. The static-declared string has previously been kept alive because of a use in __hyp_call_panic_vhe. Fix this in preparation for separating the source files between VHE and nVHE when the two users land in two different compilation units. The static variable otherwise gets dropped when compiling the nVHE source file, causing an undefined symbol linker error later. Signed-off-by: David Brazdil <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9ebcfad commit b38b298

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/hyp/switch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ static void __hyp_text __hyp_call_panic_nvhe(u64 spsr, u64 elr, u64 par,
897897
* making sure it is a kernel address and not a PC-relative
898898
* reference.
899899
*/
900-
asm volatile("ldr %0, =__hyp_panic_string" : "=r" (str_va));
900+
asm volatile("ldr %0, =%1" : "=r" (str_va) : "S" (__hyp_panic_string));
901901

902902
__hyp_do_panic(str_va,
903903
spsr, elr,

0 commit comments

Comments
 (0)