diff mbox series

[PULL,v2,14/19] goldfish_rtc: re-arm the alarm after migration

Message ID 20210304144651.310037-15-alistair.francis@wdc.com
State New
Headers show
Series [PULL,v2,01/19] target/riscv: Declare csr_ops[] with a known size | expand

Commit Message

Alistair Francis March 4, 2021, 2:46 p.m. UTC
From: Laurent Vivier <laurent@vivier.eu>

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 | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series


diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
index 0f4e8185a7..e07ff0164e 100644
--- a/hw/rtc/goldfish_rtc.c
+++ b/hw/rtc/goldfish_rtc.c
@@ -211,6 +211,8 @@  static int goldfish_rtc_post_load(void *opaque, int version_id)
     s->tick_offset = s->tick_offset_vmstate - delta;
+    goldfish_rtc_set_alarm(s);
     return 0;