Skip to content

Debug info for nVHE hyp panics

Andrew Scull kvmarm 3 versions – Applied

Status from this message: Applied to kvm-arm64/nvhe-panic-info, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 10 repliesApplied
  2. v24 patches 2 repliesSuperseded
  3. v12 patches 3 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5bug: Remove redundant condition check in report_buglib/bug.c+15 -181 reply
2/5bug: Factor out a getter for a bug's file lineinclude/linux/bug.h lib/bug.c+20 -101 reply
3/5bug: Assign values once in bug_get_file_line()lib/bug.c+3 -31 reply
4/5KVM: arm64: Use BUG and BUG_ON in nVHE hyparch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/hyp/nvhe/hyp-smp.c+3 -61 reply
5/5KVM: arm64: Log source when panicking from nVHE hyparch/arm64/include/asm/kvm_mmu.h arch/arm64/kernel/image-vars.h arch/arm64/kvm/handle_exit.c +4 more+56 -205 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchSteven Rostedt (VMware)Will Deacon
1/5R-b A-b
2/5R-b A-b
3/5A-b
4/5A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] Debug info for nVHE hyp panics

Panics from arm64's nVHE hyp mode are hard to interpret. This series adds some more debug info to help with diagnosis.

Using BUG() in nVHE hyp gives a meaningful address to locate invariants that fail to hold. The host can also look up the bug to provide the file and line, if the debug configs are enabled. Otherwise a kimg address is much more useful than a hyp VA since it can be looked up in vmlinux.

Applies on 5.12-rc3.

From v2 (https://lore.kernel.org/r/[email protected]/):
- Rebased
- An extra little refactor in bug.c for Steve
- Handling for the randomized offset

From v1 (https://lore.kernel.org/r/[email protected]/):
- keeping struct bug details in bug.c
- using SPSR to distinguish hyp from host
- inlined __hyp_panic_string

Andrew Scull (5):
bug: Remove redundant condition check in report_bug
bug: Factor out a getter for a bug's file line
bug: Assign values once in bug_get_file_line()
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            | 45 +++++++++++++++++++++
 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 -
 arch/arm64/kvm/hyp/vhe/switch.c         |  4 +-
 include/linux/bug.h                     |  3 ++
 lib/bug.c                               | 54 +++++++++++++------------
 12 files changed, 91 insertions(+), 51 deletions(-)
Signature · 6 lines
2.31.0.rc2.261.g7f71774620-goog

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm