mirror of
https://github.com/mii443/qemu.git
synced 2025-12-07 21:18:22 +00:00
make SIG_IPI to tcg vcpu thread reliable
Store tcg loop exit request on a global variable, and transfer it to per-CPUState exit_request after assignment of cpu_single_env. This makes exit request signal from robust. Drop the timedlock hack. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
@@ -213,6 +213,8 @@ static void cpu_handle_debug_exception(CPUState *env)
|
||||
|
||||
/* main execution loop */
|
||||
|
||||
volatile sig_atomic_t exit_request;
|
||||
|
||||
int cpu_exec(CPUState *env1)
|
||||
{
|
||||
volatile host_reg_t saved_env_reg;
|
||||
@@ -234,6 +236,11 @@ int cpu_exec(CPUState *env1)
|
||||
asm("");
|
||||
env = env1;
|
||||
|
||||
if (exit_request) {
|
||||
env->exit_request = 1;
|
||||
exit_request = 0;
|
||||
}
|
||||
|
||||
#if defined(TARGET_I386)
|
||||
if (!kvm_enabled()) {
|
||||
/* put eflags in CPU temporary format */
|
||||
|
||||
Reference in New Issue
Block a user