提交 87a09cdc 编写于 作者: E Emilio G. Cota 提交者: Paolo Bonzini

cpus: initialize timers_state.vm_clock_lock

We forgot to initialize the spinlock introduced in 94377115
("cpus: protect TimerState writes with a spinlock", 2018-08-23).
Fix it.
Signed-off-by: NEmilio G. Cota <cota@braap.org>
Message-Id: <20180903171831.15446-5-cota@braap.org>
Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 119c440c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册