aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2018-09-03 13:18:29 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-02 18:47:55 +0200
commit87a09cdc529ddb5daa660e3c442b793032a2169d (patch)
tree46030979851d765f82c233cade60f6863ae12a35 /cpus.c
parent119c440c3c599778bfb4f90d8e39fda132925813 (diff)
cpus: initialize timers_state.vm_clock_lock
We forgot to initialize the spinlock introduced in 94377115b2 ("cpus: protect TimerState writes with a spinlock", 2018-08-23). Fix it. Signed-off-by: Emilio G. Cota <cota@braap.org> Message-Id: <20180903171831.15446-5-cota@braap.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c
index 719788320f..4abc3b3dda 100644
--- a/cpus.c
+++ b/cpus.c
@@ -823,6 +823,7 @@ int cpu_throttle_get_percentage(void)
void cpu_ticks_init(void)
{
seqlock_init(&timers_state.vm_clock_seqlock);
+ qemu_spin_init(&timers_state.vm_clock_lock);
vmstate_register(NULL, 0, &vmstate_timers, &timers_state);
throttle_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL_RT,
cpu_throttle_timer_tick, NULL);