tcg: synchronize exit_request and tcg_current_cpu accesses

Synchronize the remaining pair of accesses in cpu_signal.  These should
be necessary on Windows as well, at least in theory.  Probably
SuspendProcess and ResumeProcess introduce some implicit memory
barrier.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2015-08-18 06:43:15 -07:00
parent ab096a75cd
commit aed807c8e2
2 changed files with 11 additions and 5 deletions

View file

@ -372,7 +372,7 @@ int cpu_exec(CPUState *cpu)
atomic_mb_set(&tcg_current_cpu, cpu);
rcu_read_lock();
if (unlikely(exit_request)) {
if (unlikely(atomic_mb_read(&exit_request))) {
cpu->exit_request = 1;
}