]> Git Repo - qemu.git/commitdiff
cpus: initialize timers_state.vm_clock_lock
authorEmilio G. Cota <[email protected]>
Mon, 3 Sep 2018 17:18:29 +0000 (13:18 -0400)
committerPaolo Bonzini <[email protected]>
Tue, 2 Oct 2018 16:47:55 +0000 (18:47 +0200)
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 <[email protected]>
Message-Id: <20180903171831[email protected]>
Reviewed-by: Alex BennĂ©e <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
cpus.c

diff --git a/cpus.c b/cpus.c
index 719788320f94c4df910400717df647db59865036..4abc3b3dda2d3d0f76e008c4bd894e723c7c5139 100644 (file)
--- 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);
This page took 0.023695 seconds and 4 git commands to generate.