goldfish_rtc: re-arm the alarm after migration

After a migration the clock offset is updated, but we also
need to re-arm the alarm if needed.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20201220112615.933036-7-laurent@vivier.eu
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
Laurent Vivier 2020-12-20 12:26:14 +01:00 committed by Alistair Francis
parent 01153d2b60
commit 6b9409ba5f

View File

@ -211,6 +211,8 @@ static int goldfish_rtc_post_load(void *opaque, int version_id)
qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
s->tick_offset = s->tick_offset_vmstate - delta; s->tick_offset = s->tick_offset_vmstate - delta;
goldfish_rtc_set_alarm(s);
return 0; return 0;
} }