diff options
| author | Paolo Bonzini | 2018-08-14 09:31:58 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2018-08-23 18:46:25 +0200 |
| commit | c1ff073cd88eddce5a0870791431878b96d08157 (patch) | |
| tree | ffe953a1e92d208a9151bdf3c67cee4ea10a9a45 /include | |
| parent | module: Use QEMU_MODULE_DIR as a search path (diff) | |
| download | qemu-c1ff073cd88eddce5a0870791431878b96d08157.tar.gz qemu-c1ff073cd88eddce5a0870791431878b96d08157.tar.xz qemu-c1ff073cd88eddce5a0870791431878b96d08157.zip | |
cpus: protect all icount computation with seqlock
Move the icount->ns computation to cpu_get_icount, and make
cpu_get_icount_locked return the raw value. This makes the
atomic_read__nocheck safe, because it now happens always inside a
seqlock and any torn reads will be retried. qemu_icount_bias and
icount_time_shift also need to be accessed with atomics. At the
same time, however, you don't need atomic_read within the writer,
because no concurrent writes are possible.
The fix to vmstate lets us keep the struct nicely packed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
