diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-02-15 15:36:11 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-03-03 16:40:02 +0100 |
commit | c5c6679d37547a2a5125e257529fcd3fd095b88f (patch) | |
tree | 53807260d032576948f37a24e37f0b668ba2dd96 /kvm-all.c | |
parent | 18268b6016930efe76c77ae590e244d42d9671ea (diff) |
kvm: use atomic_read/atomic_set to access cpu->exit_request
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1933,7 +1933,7 @@ int kvm_cpu_exec(CPUState *cpu) DPRINTF("kvm_cpu_exec()\n"); if (kvm_arch_process_async_events(cpu)) { - cpu->exit_request = 0; + atomic_set(&cpu->exit_request, 0); return EXCP_HLT; } @@ -1948,7 +1948,7 @@ int kvm_cpu_exec(CPUState *cpu) } kvm_arch_pre_run(cpu, run); - if (cpu->exit_request) { + if (atomic_read(&cpu->exit_request)) { DPRINTF("interrupt exit requested\n"); /* * KVM requires us to reenter the kernel after IO exits to complete @@ -2069,7 +2069,7 @@ int kvm_cpu_exec(CPUState *cpu) vm_stop(RUN_STATE_INTERNAL_ERROR); } - cpu->exit_request = 0; + atomic_set(&cpu->exit_request, 0); return ret; } |