Skip to contentSkip to conversation

goldfish_rtc: re-arm the alarm after migration

PATCH In review Laurent Vivier 2 participants 2 messages Oct 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 hw/rtc/goldfish_rtc.c | 2 ++
 1 file changed, 2 insertions(+)
hw/rtc/goldfish_rtc.c +2 -0
index 0f4e8185a796..e07ff0164e0c 100644
@@ -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;
 }
 
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Laurent Vivier

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

Alistair

Quoted 21 lines
---
 hw/rtc/goldfish_rtc.c | 2 ++
 1 file changed, 2 insertions(+)
hw/rtc/goldfish_rtc.c +2 -1
index 0f4e8185a796..e07ff0164e0c 100644
@@ -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;
 }
 
--

2.26.2