]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf15dbb6f9aa15d3a7bae40fd4f33ddacbf308907
treea44bb1f1bc39304d3a74a792f0cac31d00c046b3
parentc7c458b4114b57b949ec35364ef554cf07bcd380
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