All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Debug info for nVHE hyp panics
@ 2021-02-23 15:57 ` Andrew Scull
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Scull @ 2021-02-23 15:57 UTC (permalink / raw)
  To: kvmarm; +Cc: kernel-team, maz, linux-kernel, catalin.marinas, will

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.

The lib/bug.c changes apply on 5.11.

This arm64 KVM changes apply on top of the previous panic fix at
https://lore.kernel.org/r/20210219122406.1337626-1-ascull@google.com/

From v1 (https://lore.kernel.org/r/20210223094927.766572-1-ascull@google.com/):
 - keeping struct bug details in bug.c
 - using SPSR to distinguish hyp from host
 - inlined __hyp_panic_string

Andrew Scull (4):
  bug: Remove redundant condition check in report_bug
  bug: Factor out a getter for a bug's 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            | 31 ++++++++++++++
 arch/arm64/kvm/hyp/include/hyp/switch.h |  2 -
 arch/arm64/kvm/hyp/nvhe/host.S          | 17 ++++----
 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, 77 insertions(+), 50 deletions(-)

-- 
2.30.0.617.g56c4b15f3c-goog

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-02-23 16:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-23 15:57 [PATCH v2 0/4] Debug info for nVHE hyp panics Andrew Scull
2021-02-23 15:57 ` Andrew Scull
2021-02-23 15:57 ` [PATCH v2 1/4] bug: Remove redundant condition check in report_bug Andrew Scull
2021-02-23 15:57   ` Andrew Scull
2021-02-23 16:25   ` Steven Rostedt
2021-02-23 16:25     ` Steven Rostedt
2021-02-23 15:57 ` [PATCH v2 2/4] bug: Factor out a getter for a bug's file line Andrew Scull
2021-02-23 15:57   ` Andrew Scull
2021-02-23 16:35   ` Steven Rostedt
2021-02-23 16:35     ` Steven Rostedt
2021-02-23 15:57 ` [PATCH v2 3/4] KVM: arm64: Use BUG and BUG_ON in nVHE hyp Andrew Scull
2021-02-23 15:57   ` Andrew Scull
2021-02-23 15:57 ` [PATCH v2 4/4] KVM: arm64: Log source when panicking from " Andrew Scull
2021-02-23 15:57   ` Andrew Scull

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.