@@ -411,6 +411,12 @@ void handle_exit_early(struct kvm_vcpu *vcpu, int exception_index)
411
411
kvm_handle_guest_serror (vcpu , kvm_vcpu_get_esr (vcpu ));
412
412
}
413
413
414
+ static void print_nvhe_hyp_panic (const char * name , u64 panic_addr )
415
+ {
416
+ kvm_err ("nVHE hyp %s at: [<%016llx>] %pB!\n" , name , panic_addr ,
417
+ (void * )(panic_addr + kaslr_offset ()));
418
+ }
419
+
414
420
void __noreturn __cold nvhe_hyp_panic_handler (u64 esr , u64 spsr ,
415
421
u64 elr_virt , u64 elr_phys ,
416
422
u64 par , uintptr_t vcpu ,
@@ -439,11 +445,9 @@ void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr,
439
445
if (file )
440
446
kvm_err ("nVHE hyp BUG at: %s:%u!\n" , file , line );
441
447
else
442
- kvm_err ("nVHE hyp BUG at: [<%016llx>] %pB!\n" , panic_addr ,
443
- (void * )(panic_addr + kaslr_offset ()));
448
+ print_nvhe_hyp_panic ("BUG" , panic_addr );
444
449
} else {
445
- kvm_err ("nVHE hyp panic at: [<%016llx>] %pB!\n" , panic_addr ,
446
- (void * )(panic_addr + kaslr_offset ()));
450
+ print_nvhe_hyp_panic ("panic" , panic_addr );
447
451
}
448
452
449
453
/* Dump the nVHE hypervisor backtrace */
0 commit comments