From aed807c8e2bf009b2c6a35490d4fd4383887221d Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 18 Aug 2015 06:43:15 -0700 Subject: 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 Signed-off-by: Paolo Bonzini --- cpu-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpu-exec.c') diff --git a/cpu-exec.c b/cpu-exec.c index e24c640013..ef9d74552e 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -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; } -- cgit v1.2.1