Commit adec7aed17 for qemu.org

commit adec7aed1722aa0c75963d7482295a831dd7c336
Author: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Date:   Tue Jun 16 17:55:22 2026 +0200

    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>

diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 5235c73bc2..3f1a3a2843 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -29,6 +29,7 @@
 #include "qemu/target-info.h"
 #include "exec/log.h"
 #include "exec/icount.h"
+#include "accel/tcg/cpu-loop.h"
 #include "accel/tcg/cpu-ops.h"
 #include "tb-jmp-cache.h"
 #include "tb-hash.h"
diff --git a/include/accel/tcg/cpu-loop.h b/include/accel/tcg/cpu-loop.h
index 94e91eb9a3..88333d3920 100644
--- a/include/accel/tcg/cpu-loop.h
+++ b/include/accel/tcg/cpu-loop.h
@@ -20,4 +20,17 @@ int cpu_exec(CPUState *cpu);

 void cpu_exec_step_atomic(CPUState *cpu);

+/**
+ * cpu_unwind_state_data:
+ * @cpu: the cpu context
+ * @host_pc: the host pc within the translation
+ * @data: output data
+ *
+ * Attempt to load the unwind state for a host pc occurring in
+ * translated code.  If @host_pc is not in translated code, the
+ * function returns false; otherwise @data is loaded.
+ * This is the same unwind info as given to restore_state_to_opc.
+ */
+bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data);
+
 #endif
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index a97bb6faf4..7c9631efb0 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -61,19 +61,6 @@ void list_cpus(void);
 #ifdef CONFIG_TCG
 #include "qemu/atomic.h"

-/**
- * cpu_unwind_state_data:
- * @cpu: the cpu context
- * @host_pc: the host pc within the translation
- * @data: output data
- *
- * Attempt to load the unwind state for a host pc occurring in
- * translated code.  If @host_pc is not in translated code, the
- * function returns false; otherwise @data is loaded.
- * This is the same unwind info as given to restore_state_to_opc.
- */
-bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data);
-
 /**
  * cpu_restore_state:
  * @cpu: the cpu context
diff --git a/target/i386/helper.c b/target/i386/helper.c
index c3cba04e14..6836214162 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -32,6 +32,7 @@
 #endif
 #include "qemu/log.h"
 #ifdef CONFIG_TCG
+#include "accel/tcg/cpu-loop.h"
 #include "tcg/insn-start-words.h"
 #endif

diff --git a/target/or1k/sys_helper.c b/target/or1k/sys_helper.c
index ca627bd719..8ffa31b84f 100644
--- a/target/or1k/sys_helper.c
+++ b/target/or1k/sys_helper.c
@@ -23,6 +23,7 @@
 #include "exec/cputlb.h"
 #include "exec/target_page.h"
 #include "exec/helper-proto.h"
+#include "accel/tcg/cpu-loop.h"
 #include "exception.h"
 #ifndef CONFIG_USER_ONLY
 #include "hw/core/boards.h"
diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index ec931a8c3d..dd9726fcf4 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -27,6 +27,7 @@
 #include "time_helper.h"
 #include "exec/cputlb.h"
 #include "exec/icount.h"
+#include "accel/tcg/cpu-loop.h"
 #include "accel/tcg/getpc.h"
 #include "qemu/guest-random.h"
 #include "qapi/error.h"