提交 06dec083 编写于 作者: J Jan Kiszka 提交者: Blue Swirl

chardev: Use real-time clock for open timer

The vm clock may be stopped, and then we won't get open events anymore.
Seen with QMP sessions.
Reported-by: NDietmar Maurer <dietmar@proxmox.com>
Tested-by: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 a85903ff
......@@ -134,9 +134,9 @@ static void qemu_chr_fire_open_event(void *opaque)
void qemu_chr_generic_open(CharDriverState *s)
{
if (s->open_timer == NULL) {
s->open_timer = qemu_new_timer_ms(vm_clock,
s->open_timer = qemu_new_timer_ms(rt_clock,
qemu_chr_fire_open_event, s);
qemu_mod_timer(s->open_timer, qemu_get_clock_ms(vm_clock) - 1);
qemu_mod_timer(s->open_timer, qemu_get_clock_ms(rt_clock) - 1);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册