From: Andrew Scull <ascull@google.com>
To: kvmarm@lists.cs.columbia.edu
Cc: kernel-team@android.com, maz@kernel.org, catalin.marinas@arm.com,
will@kernel.org
Subject: [PATCH 0/2] Debug info for nVHE hyp panics
Date: Tue, 23 Feb 2021 09:49:25 +0000 [thread overview]
Message-ID: <20210223094927.766572-1-ascull@google.com> (raw)
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@google.com/
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@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next reply other threads:[~2021-02-23 9:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 9:49 Andrew Scull [this message]
2021-02-23 9:49 ` [PATCH 1/2] KVM: arm64: Use BUG and BUG_ON in nVHE hyp Andrew Scull
2021-02-23 9:49 ` [PATCH 2/2] KVM: arm64: Log source when panicking from " Andrew Scull
2021-02-23 11:29 ` Marc Zyngier
2021-02-23 12:34 ` Andrew Scull
2021-02-23 15:18 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210223094927.766572-1-ascull@google.com \
--to=ascull@google.com \
--cc=catalin.marinas@arm.com \
--cc=kernel-team@android.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=maz@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox