]> Git Repo - qemu.git/commit
cpus: take seqlock across qemu_icount updates
authorPaolo Bonzini <[email protected]>
Tue, 11 Sep 2018 11:15:32 +0000 (13:15 +0200)
committerPaolo Bonzini <[email protected]>
Tue, 2 Oct 2018 16:47:55 +0000 (18:47 +0200)
commit9b4e6f496601d3cd35fd8d09c9e2103999fd5c33
treeccab9fa8b0930f3cc1bf9e675b721679a0e869d6
parent39fe576c82bc02749410ea16045109f7b7d4af62
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 <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
cpus.c
This page took 0.024723 seconds and 4 git commands to generate.