]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Allocate shared pKVM hyp stacktrace buffers
authorKalesh Singh <kaleshsingh@google.com>
Tue, 26 Jul 2022 07:37:46 +0000 (00:37 -0700)
committerMarc Zyngier <maz@kernel.org>
Tue, 26 Jul 2022 09:50:12 +0000 (10:50 +0100)
commit8fb7f396899396fd9f9f5182af3a406474bf494d
tree998aa50f0f6d9954e2155c5ef20a2b19e46f25c3
parent5e15ba9a61f2dca543d28cfc46d5d58cd33f1773
KVM: arm64: Allocate shared pKVM hyp stacktrace buffers

In protected nVHE mode the host cannot directly access
hypervisor memory, so we will dump the hypervisor stacktrace
to a shared buffer with the host.

The minimum size for the buffer required, assuming the min frame
size of [x29, x30] (2 * sizeof(long)), is half the combined size of
the hypervisor and overflow stacks plus an additional entry to
delimit the end of the stacktrace.

The stacktrace buffers are used later in the series to dump the
nVHE hypervisor stacktrace when using protected-mode.

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220726073750.3219117-14-kaleshsingh@google.com
arch/arm64/include/asm/memory.h
arch/arm64/kvm/hyp/nvhe/stacktrace.c