diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2018-08-14 09:57:16 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-08-23 18:46:25 +0200 |
| commit | 94377115b2458506579907f3ebf1ffbfea12b216 (patch) | |
| tree | 401e56cc1152cca4c83e59cc8d70855285f68011 /hw/scsi/vhost-user-scsi.c | |
| parent | 988fcafc730242711ba92f9e62557e37f2b22cc0 (diff) | |
| download | focaccia-qemu-94377115b2458506579907f3ebf1ffbfea12b216.tar.gz focaccia-qemu-94377115b2458506579907f3ebf1ffbfea12b216.zip | |
cpus: protect TimerState writes with a spinlock
In the next patch, we will need to write cpu_ticks_offset from any thread, even outside the BQL. Currently, it is protected by the BQL just because cpu_enable_ticks and cpu_disable_ticks happen to hold it, but the critical sections are well delimited and it's easy to remove the BQL dependency. Add a spinlock that matches vm_clock_seqlock, and hold it when writing to the TimerState. This also lets us fix cpu_update_icount when 64-bit atomics are not available. Fields of TiemrState are reordered to avoid padding. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/vhost-user-scsi.c')
0 files changed, 0 insertions, 0 deletions