KVM: arm64: Save protected-nVHE (pKVM) hyp stacktrace
authorKalesh Singh <kaleshsingh@google.com>
Tue, 26 Jul 2022 07:37:48 +0000 (00:37 -0700)
committerMarc Zyngier <maz@kernel.org>
Tue, 26 Jul 2022 09:51:17 +0000 (10:51 +0100)
commit871c5d931417d3c0e1aa32c9e04da1dc74703843
treea44bb1f1bc39304d3a74a792f0cac31d00c046b3
parent25aa73b6db1831527cd4f14bf0ddf8dceadec802
KVM: arm64: Save protected-nVHE (pKVM) hyp stacktrace

In protected nVHE mode, the host cannot access private owned hypervisor
memory. Also the hypervisor aims to remains simple to reduce the attack
surface and does not provide any printk support.

For the above reasons, the approach taken to provide hypervisor stacktraces
in protected mode is:
   1) Unwind and save the hyp stack addresses in EL2 to a shared buffer
      with the host (done in this patch).
   2) Delegate the dumping and symbolization of the addresses to the
      host in EL1 (later patch in the series).

On hyp_panic(), the hypervisor prepares the stacktrace before returning to
the host.

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220726073750.3219117-16-kaleshsingh@google.com
arch/arm64/kvm/hyp/nvhe/stacktrace.c