mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 09:01:10 +00:00
cpu: Add crash_occurred flag into CPUState
CPUState::crash_occurred field inside CPUState marks that guest crash occurred. This value is added into cpu common migration subsection. Backports commit bac05aa9a77af1ca7972c8dc07560f4daa7c2dfc from qemu
This commit is contained in:
parent
62544c10af
commit
5e2862b29d
|
@ -184,6 +184,7 @@ struct kvm_run;
|
||||||
* @halted: Nonzero if the CPU is in suspended state.
|
* @halted: Nonzero if the CPU is in suspended state.
|
||||||
* @stop: Indicates a pending stop request.
|
* @stop: Indicates a pending stop request.
|
||||||
* @stopped: Indicates the CPU has been artificially stopped.
|
* @stopped: Indicates the CPU has been artificially stopped.
|
||||||
|
* @crash_occurred: Indicates the OS reported a crash (panic) for this CPU
|
||||||
* @tcg_exit_req: Set to force TCG to stop executing linked TBs for this
|
* @tcg_exit_req: Set to force TCG to stop executing linked TBs for this
|
||||||
* CPU and return to its top level loop.
|
* CPU and return to its top level loop.
|
||||||
* @singlestep_enabled: Flags for single-stepping.
|
* @singlestep_enabled: Flags for single-stepping.
|
||||||
|
@ -223,6 +224,7 @@ struct CPUState {
|
||||||
bool created;
|
bool created;
|
||||||
bool stop;
|
bool stop;
|
||||||
bool stopped;
|
bool stopped;
|
||||||
|
bool crash_occurred;
|
||||||
volatile sig_atomic_t exit_request;
|
volatile sig_atomic_t exit_request;
|
||||||
uint32_t interrupt_request;
|
uint32_t interrupt_request;
|
||||||
int singlestep_enabled;
|
int singlestep_enabled;
|
||||||
|
|
|
@ -167,6 +167,7 @@ static void cpu_common_reset(CPUState *cpu)
|
||||||
cpu->icount_extra = 0;
|
cpu->icount_extra = 0;
|
||||||
cpu->icount_decr.u32 = 0;
|
cpu->icount_decr.u32 = 0;
|
||||||
cpu->can_do_io = 0;
|
cpu->can_do_io = 0;
|
||||||
|
cpu->crash_occurred = false;
|
||||||
memset(cpu->tb_jmp_cache, 0, TB_JMP_CACHE_SIZE * sizeof(void *));
|
memset(cpu->tb_jmp_cache, 0, TB_JMP_CACHE_SIZE * sizeof(void *));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue