Files
qemu/include/accel/tcg/cpu-loop.h
Philippe Mathieu-Daudé e1883d1a32 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>
2026-06-18 14:27:21 +02:00

49 lines
1.2 KiB
C

/*
* QEMU TCG CPU loop API
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef ACCEL_TCG_CPU_LOOP_COMMON_H
#define ACCEL_TCG_CPU_LOOP_COMMON_H
#ifndef CONFIG_TCG
#error Can only include this header with TCG
#endif
/**
* cpu_exec:
* @cpu: the cpu context
*
* Returns one of the EXCP_* definitions (see "exec/cpu-common.h").
*/
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);
/**
* 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