diff --git a/qemu-timer.c b/qemu-timer.c index 9be1a4131d..00a5d35c3f 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -126,6 +126,9 @@ static void qemu_clock_init(QEMUClockType type) { QEMUClock *clock = qemu_clock_ptr(type); + /* Assert that the clock of type TYPE has not been initialized yet. */ + assert(main_loop_tlg.tl[type] == NULL); + clock->type = type; clock->enabled = true; clock->last = INT64_MIN; diff --git a/vl.c b/vl.c index 73e06610b0..709d8cda8d 100644 --- a/vl.c +++ b/vl.c @@ -3024,7 +3024,6 @@ int main(int argc, char **argv, char **envp) runstate_init(); - init_clocks(); rtc_clock = QEMU_CLOCK_HOST; qemu_init_auxval(envp);