diff options
author | Kalesh Singh <kaleshsingh@google.com> | 2022-07-26 00:37:40 -0700 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-07-26 10:49:05 +0100 |
commit | 548ec3336f323db56260b312c232ab37285f0284 (patch) | |
tree | 5df07e5749b888bc368e4b078c5801f1260c5188 /arch/arm64/kvm/hyp/nvhe/stacktrace.c | |
parent | arm64: stacktrace: Add description of stacktrace/common.h (diff) | |
download | linux-dev-548ec3336f323db56260b312c232ab37285f0284.tar.xz linux-dev-548ec3336f323db56260b312c232ab37285f0284.zip |
KVM: arm64: On stack overflow switch to hyp overflow_stack
On hyp stack overflow switch to 16-byte aligned secondary stack.
This provides us stack space to better handle overflows; and is
used in a subsequent patch to dump the hypervisor stacktrace.
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-8-kaleshsingh@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/stacktrace.c')
-rw-r--r-- | arch/arm64/kvm/hyp/nvhe/stacktrace.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/stacktrace.c b/arch/arm64/kvm/hyp/nvhe/stacktrace.c new file mode 100644 index 000000000000..a3d5b34e1249 --- /dev/null +++ b/arch/arm64/kvm/hyp/nvhe/stacktrace.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * KVM nVHE hypervisor stack tracing support. + * + * Copyright (C) 2022 Google LLC + */ +#include <asm/memory.h> +#include <asm/percpu.h> + +DEFINE_PER_CPU(unsigned long [OVERFLOW_STACK_SIZE/sizeof(long)], overflow_stack) + __aligned(16); |