The workaround I described above is actually not the good one, because of this check occurring just before:
if (!all_cpu_threads_idle()) { return; }
The exit request setting must be done before, so my code looks like this:
CPUState *cpu; CPU_FOREACH(cpu) { atomic_mb_set(&cpu->exit_request, 1); }
(version is v2.11.0-2122-g9fa673c-dirty)
The workaround I described above is actually not the good one, because of this check occurring just before:
if (!all_cpu_ threads_ idle()) {
return;
}
The exit request setting must be done before, so my code looks like this:
CPUState *cpu; FOREACH( cpu) {
atomic_ mb_set( &cpu->exit_ request, 1);
CPU_
}
if (!all_cpu_ threads_ idle()) {
return;
}
(version is v2.11.0- 2122-g9fa673c- dirty)