[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/79] cpus: access .qemu_icount with atomic64
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 13/79] cpus: access .qemu_icount with atomic64 |
Date: |
Sun, 30 Sep 2018 10:12:11 +0200 |
From: "Emilio G. Cota" <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
cpus.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cpus.c b/cpus.c
index 6e1a892..fed8ec1 100644
--- a/cpus.c
+++ b/cpus.c
@@ -250,8 +250,8 @@ static void cpu_update_icount_locked(CPUState *cpu)
int64_t executed = cpu_get_icount_executed(cpu);
cpu->icount_budget -= executed;
- atomic_set__nocheck(&timers_state.qemu_icount,
- timers_state.qemu_icount + executed);
+ atomic_set_i64(&timers_state.qemu_icount,
+ timers_state.qemu_icount + executed);
}
/*
@@ -280,8 +280,8 @@ static int64_t cpu_get_icount_raw_locked(void)
/* Take into account what has run */
cpu_update_icount_locked(cpu);
}
- /* The read is protected by the seqlock, so __nocheck is okay. */
- return atomic_read__nocheck(&timers_state.qemu_icount);
+ /* The read is protected by the seqlock, but needs atomic64 to avoid UB */
+ return atomic_read_i64(&timers_state.qemu_icount);
}
static int64_t cpu_get_icount_locked(void)
--
1.8.3.1
- [Qemu-devel] [PULL 03/79] es1370: fix ADC_FRAMEADR and ADC_FRAMECNT, (continued)
- [Qemu-devel] [PULL 03/79] es1370: fix ADC_FRAMEADR and ADC_FRAMECNT, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 02/79] qsp: hide indirect function calls from Coverity, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 04/79] ps2: prevent changing irq state on save and load, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 06/79] cpus: initialize timers_state.vm_clock_lock, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 08/79] util: add atomic64, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 07/79] cacheinfo: add i/d cache_linesize_log, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 05/79] atomic: fix comment s/x64_64/x86_64/, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 01/79] virtio: Return true from virtio_queue_empty if broken, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 09/79] tests: add atomic64-bench, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 16/79] hostmem-memfd: add checks before adding hostmem-memfd & properties, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 13/79] cpus: access .qemu_icount with atomic64,
Paolo Bonzini <=
- [Qemu-devel] [PULL 12/79] cpus: take seqlock across qemu_icount updates, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 14/79] cpus: access .qemu_icount_bias with atomic64, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 17/79] kvm: x86: Fix kvm_arch_fixup_msi_route for remap-less case, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 22/79] serial: fix DLL writes, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 10/79] qsp: use atomic64 accessors, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 15/79] dump: fix Windows dump memory run mapping, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 11/79] test-rcu-list: access n_reclaims and n_nodes_removed with atomic64, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 18/79] configure: preserve various environment variables in config.status, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 19/79] hw/char/sh_serial: Add timeout handling to unbreak serial input, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 21/79] util: use fcntl() for qemu_write_pidfile() locking, Paolo Bonzini, 2018/09/30