@samitouri / QOSamiQemu / commits / adec7aed17

accel/tcg: Move cpu_unwind_state_data() out of 'exec/cpu-common.h'

Move the TCG-specific cpu_unwind_state_data() declaration out of the generic "exec/cpu-common.h" header, to the recently created "accel/tcg/cpu-loop.h" one. Include "accel/tcg/cpu-loop.h" where appropriate. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260617171438.75914-7-philmd@oss.qualcomm.com>

Philippe Mathieu-Daudé committed Jun 16, 2026 at 17:55 UTC adec7aed1722aa0c75963d7482295a831dd7c336
6 files changed +17 -13
accel/tcg/translate-all.c
+1
@@ -29,6 +29,7 @@
29 #include "qemu/target-info.h"
30 #include "exec/log.h"
31 #include "exec/icount.h"
32 +#include "accel/tcg/cpu-loop.h"
33 #include "accel/tcg/cpu-ops.h"
34 #include "tb-jmp-cache.h"
35 #include "tb-hash.h"
include/accel/tcg/cpu-loop.h
+13
@@ -20,4 +20,17 @@ int cpu_exec(CPUState *cpu);
20
21 void cpu_exec_step_atomic(CPUState *cpu);
22
23 +/**
24 + * cpu_unwind_state_data:
25 + * @cpu: the cpu context
26 + * @host_pc: the host pc within the translation
27 + * @data: output data
28 + *
29 + * Attempt to load the unwind state for a host pc occurring in
30 + * translated code. If @host_pc is not in translated code, the
31 + * function returns false; otherwise @data is loaded.
32 + * This is the same unwind info as given to restore_state_to_opc.
33 + */
34 +bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data);
35 +
36 #endif
include/exec/cpu-common.h
-13
@@ -61,19 +61,6 @@ void list_cpus(void);
61 #ifdef CONFIG_TCG
62 #include "qemu/atomic.h"
63
64 -/**
65 - * cpu_unwind_state_data:
66 - * @cpu: the cpu context
67 - * @host_pc: the host pc within the translation
68 - * @data: output data
69 - *
70 - * Attempt to load the unwind state for a host pc occurring in
71 - * translated code. If @host_pc is not in translated code, the
72 - * function returns false; otherwise @data is loaded.
73 - * This is the same unwind info as given to restore_state_to_opc.
74 - */
75 -bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data);
76 -
64 /**
65 * cpu_restore_state:
66 * @cpu: the cpu context
target/i386/helper.c
+1
@@ -32,6 +32,7 @@
32 #endif
33 #include "qemu/log.h"
34 #ifdef CONFIG_TCG
35 +#include "accel/tcg/cpu-loop.h"
36 #include "tcg/insn-start-words.h"
37 #endif
38
target/or1k/sys_helper.c
+1
@@ -23,6 +23,7 @@
23 #include "exec/cputlb.h"
24 #include "exec/target_page.h"
25 #include "exec/helper-proto.h"
26 +#include "accel/tcg/cpu-loop.h"
27 #include "exception.h"
28 #ifndef CONFIG_USER_ONLY
29 #include "hw/core/boards.h"
target/riscv/csr.c
+1
@@ -27,6 +27,7 @@
27 #include "time_helper.h"
28 #include "exec/cputlb.h"
29 #include "exec/icount.h"
30 +#include "accel/tcg/cpu-loop.h"
31 #include "accel/tcg/getpc.h"
32 #include "qemu/guest-random.h"
33 #include "qapi/error.h"