diff options
| author | Paolo Bonzini | 2018-09-11 13:15:32 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2018-10-02 18:47:55 +0200 |
| commit | 9b4e6f496601d3cd35fd8d09c9e2103999fd5c33 (patch) | |
| tree | ccab9fa8b0930f3cc1bf9e675b721679a0e869d6 /include/exec | |
| parent | test-rcu-list: access n_reclaims and n_nodes_removed with atomic64 (diff) | |
| download | qemu-9b4e6f496601d3cd35fd8d09c9e2103999fd5c33.tar.gz qemu-9b4e6f496601d3cd35fd8d09c9e2103999fd5c33.tar.xz qemu-9b4e6f496601d3cd35fd8d09c9e2103999fd5c33.zip | |
cpus: take seqlock across qemu_icount updates
Even though writes of qemu_icount can safely race with reads in
qemu_icount_raw, qemu_icount is also read by icount_adjust, which
runs in the I/O thread. Therefore, writes do needs protection of
the vm_clock_lock; for simplicity the patch protects it with both
seqlock+spinlock, which we already do for hosts that lack 64-bit atomics.
The bug actually predated the introduction of vm_clock_lock;
cpu_update_icount would have needed the BQL before the spinlock was
introduced.
Reported-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions
