diff options
Diffstat (limited to 'hw/core')
| -rw-r--r-- | hw/core/cpu-common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 152abc9024..42463e6258 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -74,7 +74,8 @@ void cpu_reset_interrupt(CPUState *cpu, int mask) void cpu_exit(CPUState *cpu) { - qatomic_set(&cpu->exit_request, 1); + /* Ensure cpu_exec will see the reason why the exit request was set. */ + qatomic_store_release(&cpu->exit_request, true); /* Ensure cpu_exec will see the exit request after TCG has exited. */ smp_wmb(); qatomic_set(&cpu->neg.icount_decr.u16.high, -1); |