mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
tcg: synchronize cpu->exit_request and cpu->tcg_exit_req accesses
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b0a46fa796
commit
ab096a75cd
2 changed files with 7 additions and 1 deletions
|
@ -114,6 +114,8 @@ void cpu_reset_interrupt(CPUState *cpu, int mask)
|
|||
void cpu_exit(CPUState *cpu)
|
||||
{
|
||||
cpu->exit_request = 1;
|
||||
/* Ensure cpu_exec will see the exit request after TCG has exited. */
|
||||
smp_wmb();
|
||||
cpu->tcg_exit_req = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue