After being on the receiving end of an nVHE hyp panic and trying to figure out what is was trying to tell me, it seemed like a good excuse to add some debug info. nVHE hyp has its own address space. Hyp VAs aren't much use for debugging but they can be converted into kimg addresses which are useful for looking up in vmlinux. There are also a couple of invariant tests that call hyp_panic() but these would give the ELR_EL2 of the previous VM which isn't very meaningful. Converting these to use BUG() lets the correct hyp address be captured and the source file and line can even be logged! This applied on top of the previous panic fix at https://lore.kernel.org/r/20210219122406.1337626-1-ascull@xxxxxxxxxx/ Andrew Scull (2): KVM: arm64: Use BUG and BUG_ON in nVHE hyp KVM: arm64: Log source when panicking from nVHE hyp arch/arm64/include/asm/kvm_hyp.h | 1 - arch/arm64/include/asm/kvm_mmu.h | 2 ++ arch/arm64/kernel/image-vars.h | 3 +- arch/arm64/kvm/handle_exit.c | 38 +++++++++++++++++++++++++ arch/arm64/kvm/hyp/include/hyp/switch.h | 2 -- arch/arm64/kvm/hyp/nvhe/host.S | 18 ++++++------ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 2 +- arch/arm64/kvm/hyp/nvhe/hyp-smp.c | 6 ++-- arch/arm64/kvm/hyp/nvhe/psci-relay.c | 2 -- 9 files changed, 52 insertions(+), 22 deletions(-) -- 2.30.0.617.g56c4b15f3c-goog _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm