Skip to content

Commit

Permalink
goldfish_rtc: re-arm the alarm after migration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vivier authored and alistair23 committed Feb 18, 2021
1 parent 72ff3ac commit 3a14553
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/rtc/goldfish_rtc.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3a14553

Please sign in to comment.