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

Move the TCG-specific cpu_restore_state() 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-8-philmd@oss.qualcomm.com>
This commit is contained in:
Philippe Mathieu-Daudé
2026-06-16 17:59:57 +02:00
parent adec7aed17
commit e1883d1a32
19 changed files with 29 additions and 12 deletions

View File

@@ -21,6 +21,7 @@
#include "exec/log.h"
#include "system/tcg.h"
#include "qemu/plugin.h"
#include "accel/tcg/cpu-loop.h"
#include "internal-common.h"
bool tcg_allowed;

View File

@@ -25,6 +25,7 @@
#include "qemu/bitops.h"
#include "qemu/rcu.h"
#include "accel/tcg/cpu-ldst-common.h"
#include "accel/tcg/cpu-loop.h"
#include "accel/tcg/helper-retaddr.h"
#include "accel/tcg/probe.h"
#include "user/cpu_loop.h"

View File

@@ -33,4 +33,16 @@ void cpu_exec_step_atomic(CPUState *cpu);
*/
bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data);
/**
* cpu_restore_state:
* @cpu: the cpu context
* @host_pc: the host pc within the translation
* @return: true if state was restored, false otherwise
*
* Attempt to restore the state for a fault occurring in translated
* code. If @host_pc is not in translated code no state is
* restored and the function returns false.
*/
bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc);
#endif

View File

@@ -61,18 +61,6 @@ void list_cpus(void);
#ifdef CONFIG_TCG
#include "qemu/atomic.h"
/**
* cpu_restore_state:
* @cpu: the cpu context
* @host_pc: the host pc within the translation
* @return: true if state was restored, false otherwise
*
* Attempt to restore the state for a fault occurring in translated
* code. If @host_pc is not in translated code no state is
* restored and the function returns false.
*/
bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc);
/**
* cpu_loop_exit_requested:
* @cpu: The CPU state to be tested

View File

@@ -28,6 +28,7 @@
#include "exec/helper-proto.h"
#include "qemu/qemu-print.h"
#include "system/memory.h"
#include "accel/tcg/cpu-loop.h"
#include "qemu/plugin.h"

View File

@@ -21,6 +21,7 @@
#include "cpu.h"
#include "exec/helper-proto.h"
#include "accel/tcg/cpu-ldst.h"
#include "accel/tcg/cpu-loop.h"
static void do_unaligned_access(CPUAlphaState *env, vaddr addr, uintptr_t retaddr)
{

View File

@@ -23,6 +23,7 @@
#include "helper.h"
#include "internals.h"
#include "cpu-features.h"
#include "accel/tcg/cpu-loop.h"
#include "accel/tcg/probe.h"
#include "cpregs.h"

View File

@@ -8,6 +8,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "helper.h"
#include "accel/tcg/cpu-loop.h"
#include "internals.h"
#include "cpu-features.h"
#include "hw/intc/armv7m_nvic.h"

View File

@@ -29,6 +29,7 @@
#include "fpu/softfloat.h"
#include "tcg/tcg.h"
#include "hw/hppa/hppa_hardware.h"
#include "accel/tcg/cpu-loop.h"
#include "accel/tcg/cpu-ops.h"
static void hppa_cpu_set_pc(CPUState *cs, vaddr value)

View File

@@ -21,6 +21,7 @@
#include "qemu/log.h"
#include "cpu.h"
#include "exec/cputlb.h"
#include "accel/tcg/cpu-loop.h"
#include "accel/tcg/cpu-mmu-index.h"
#include "accel/tcg/probe.h"
#include "exec/page-protection.h"

View File

@@ -22,6 +22,7 @@
#include "cpu.h"
#include "exec/helper-proto.h"
#include "accel/tcg/cpu-ldst.h"
#include "accel/tcg/cpu-loop.h"
#include "accel/tcg/probe.h"
#include "qemu/timer.h"
#include "trace.h"

View File

@@ -23,6 +23,7 @@
#include "exec/helper-proto.h"
#include "exec/cputlb.h"
#include "accel/tcg/cpu-ldst.h"
#include "accel/tcg/cpu-loop.h"
#include "tcg/helper-tcg.h"
/* Secure Virtual Machine helpers */

View File

@@ -21,6 +21,7 @@
#include "cpu.h"
#include "exec/helper-proto.h"
#include "accel/tcg/cpu-ldst.h"
#include "accel/tcg/cpu-loop.h"
#include "semihosting/semihost.h"
#include "qemu/plugin.h"

View File

@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/cputlb.h"
#include "accel/tcg/cpu-loop.h"
#include "accel/tcg/cpu-mmu-index.h"
#include "exec/page-protection.h"
#include "exec/target_page.h"

View File

@@ -21,6 +21,7 @@
#include "qemu/log.h"
#include "target/ppc/cpu.h"
#include "accel/tcg/cpu-ldst.h"
#include "accel/tcg/cpu-loop.h"
#include "exec/helper-proto.h"
#include "system/runstate.h"

View File

@@ -24,6 +24,7 @@
#include "exec/helper-proto.h"
#include "exec/cputlb.h"
#include "exec/target_page.h"
#include "accel/tcg/cpu-loop.h"
#include "s390x-internal.h"
#include "tcg_s390x.h"
#ifndef CONFIG_USER_ONLY

View File

@@ -20,6 +20,7 @@
#include "cpu.h"
#include "exec/helper-proto.h"
#include "accel/tcg/cpu-ldst.h"
#include "accel/tcg/cpu-loop.h"
#include "fpu/softfloat.h"
#ifndef CONFIG_USER_ONLY

View File

@@ -19,6 +19,7 @@
#include "qemu/host-utils.h"
#include "exec/helper-proto.h"
#include "accel/tcg/cpu-ldst.h"
#include "accel/tcg/cpu-loop.h"
#include "qemu/plugin.h"
#include <zlib.h> /* for crc32 */

View File

@@ -32,6 +32,7 @@
#include "exec/target_page.h"
#include "gdbstub/helpers.h"
#include "exec/helper-proto.h"
#include "accel/tcg/cpu-loop.h"
#include "qemu/error-report.h"
#include "qemu/qemu-print.h"
#include "qemu/host-utils.h"