qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] goldfish_rtc: re-arm the alarm after migration
@ 2020-10-16 18:15 Laurent Vivier
  2020-10-16 20:01 ` Alistair Francis
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2020-10-16 18:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alistair Francis, Anup Patel, qemu-riscv, Laurent Vivier

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] goldfish_rtc: re-arm the alarm after migration
  2020-10-16 18:15 [PATCH] goldfish_rtc: re-arm the alarm after migration Laurent Vivier
@ 2020-10-16 20:01 ` Alistair Francis
  0 siblings, 0 replies; 2+ messages in thread
From: Alistair Francis @ 2020-10-16 20:01 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: open list:RISC-V, Anup Patel, Alistair Francis,
	qemu-devel@nongnu.org Developers

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
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-16 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-16 18:15 [PATCH] goldfish_rtc: re-arm the alarm after migration Laurent Vivier
2020-10-16 20:01 ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).