[PATCH] goldfish_rtc: re-arm the alarm after migration

Laurent Vivier posted 1 patch 1 week ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201016181548.1096112-1-laurent@vivier.eu
Maintainers: Alistair Francis <Alistair.Francis@wdc.com>, Anup Patel <anup.patel@wdc.com>
hw/rtc/goldfish_rtc.c | 2 ++
1 file changed, 2 insertions(+)

[PATCH] goldfish_rtc: re-arm the alarm after migration

Posted by Laurent Vivier 1 week ago
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>
---
 hw/rtc/goldfish_rtc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
index 0f4e8185a796..e07ff0164e0c 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)
             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


Re: [PATCH] goldfish_rtc: re-arm the alarm after migration

Posted by Alistair Francis 1 week ago
On Fri, Oct 16, 2020 at 11:16 AM Laurent Vivier <laurent@vivier.eu> wrote:
>
> 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>

Alistair

> ---
>  hw/rtc/goldfish_rtc.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
> index 0f4e8185a796..e07ff0164e0c 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)
>              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
>
>