mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
user: Move various declarations out of 'exec/exec-all.h'
Move various declarations related to user emulation from "exec/exec-all.h" to "user/cpu_loop.h". Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20241212185341.2857-19-philmd@linaro.org>
This commit is contained in:
parent
166a4b6e43
commit
1bf0d6e476
6 changed files with 59 additions and 54 deletions
|
@ -20,9 +20,63 @@
|
|||
#ifndef USER_CPU_LOOP_H
|
||||
#define USER_CPU_LOOP_H
|
||||
|
||||
#include "exec/abi_ptr.h"
|
||||
#include "exec/mmu-access-type.h"
|
||||
#include "exec/log.h"
|
||||
#include "exec/target_long.h"
|
||||
#include "special-errno.h"
|
||||
|
||||
/**
|
||||
* adjust_signal_pc:
|
||||
* @pc: raw pc from the host signal ucontext_t.
|
||||
* @is_write: host memory operation was write, or read-modify-write.
|
||||
*
|
||||
* Alter @pc as required for unwinding. Return the type of the
|
||||
* guest memory access -- host reads may be for guest execution.
|
||||
*/
|
||||
MMUAccessType adjust_signal_pc(uintptr_t *pc, bool is_write);
|
||||
|
||||
/**
|
||||
* handle_sigsegv_accerr_write:
|
||||
* @cpu: the cpu context
|
||||
* @old_set: the sigset_t from the signal ucontext_t
|
||||
* @host_pc: the host pc, adjusted for the signal
|
||||
* @host_addr: the host address of the fault
|
||||
*
|
||||
* Return true if the write fault has been handled, and should be re-tried.
|
||||
*/
|
||||
bool handle_sigsegv_accerr_write(CPUState *cpu, sigset_t *old_set,
|
||||
uintptr_t host_pc, abi_ptr guest_addr);
|
||||
|
||||
/**
|
||||
* cpu_loop_exit_sigsegv:
|
||||
* @cpu: the cpu context
|
||||
* @addr: the guest address of the fault
|
||||
* @access_type: access was read/write/execute
|
||||
* @maperr: true for invalid page, false for permission fault
|
||||
* @ra: host pc for unwinding
|
||||
*
|
||||
* Use the TCGCPUOps hook to record cpu state, do guest operating system
|
||||
* specific things to raise SIGSEGV, and jump to the main cpu loop.
|
||||
*/
|
||||
G_NORETURN void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr,
|
||||
MMUAccessType access_type,
|
||||
bool maperr, uintptr_t ra);
|
||||
|
||||
/**
|
||||
* cpu_loop_exit_sigbus:
|
||||
* @cpu: the cpu context
|
||||
* @addr: the guest address of the alignment fault
|
||||
* @access_type: access was read/write/execute
|
||||
* @ra: host pc for unwinding
|
||||
*
|
||||
* Use the TCGCPUOps hook to record cpu state, do guest operating system
|
||||
* specific things to raise SIGBUS, and jump to the main cpu loop.
|
||||
*/
|
||||
G_NORETURN void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr,
|
||||
MMUAccessType access_type,
|
||||
uintptr_t ra);
|
||||
|
||||
G_NORETURN void cpu_loop(CPUArchState *env);
|
||||
|
||||
void target_exception_dump(CPUArchState *env, const char *fmt, int code);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue