OSDN Git Service

goldfish_rtc: re-arm the alarm after migration
authorLaurent Vivier <laurent@vivier.eu>
Sun, 20 Dec 2020 11:26:14 +0000 (12:26 +0100)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 4 Mar 2021 14:43:29 +0000 (09:43 -0500)
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>
hw/rtc/goldfish_rtc.c

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