summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/stacktrace/nvhe.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/include/asm/stacktrace/nvhe.h')
-rw-r--r--arch/arm64/include/asm/stacktrace/nvhe.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/stacktrace/nvhe.h b/arch/arm64/include/asm/stacktrace/nvhe.h
index 21082fd4a0b7..170fe7459f7c 100644
--- a/arch/arm64/include/asm/stacktrace/nvhe.h
+++ b/arch/arm64/include/asm/stacktrace/nvhe.h
@@ -16,6 +16,23 @@
#include <asm/stacktrace/common.h>
+/*
+ * kvm_nvhe_unwind_init - Start an unwind from the given nVHE HYP fp and pc
+ *
+ * @state : unwind_state to initialize
+ * @fp : frame pointer at which to start the unwinding.
+ * @pc : program counter at which to start the unwinding.
+ */
+static inline void kvm_nvhe_unwind_init(struct unwind_state *state,
+ unsigned long fp,
+ unsigned long pc)
+{
+ unwind_init_common(state, NULL);
+
+ state->fp = fp;
+ state->pc = pc;
+}
+
static inline bool on_hyp_stack(unsigned long sp, unsigned long size,
struct stack_info *info);