qemu/hw/rtc
Heinrich Schuchardt ce9a1b9e51 hw/rtc/goldfish: keep time offset when resetting
Currently resetting the leads to resynchronizing the Goldfish RTC
with the system clock of the host. In real hardware an RTC reset
would not change the wall time. Other RTCs like pl031 do not show
this behavior.

Move the synchronization of the RTC with the system clock to the
instance realization.

Cc: qemu-stable@nongnu.org
Reported-by: Frederik Du Toit Lotter <fred.lotter@canonical.com>
Fixes: 9a5b40b842 ("hw: rtc: Add Goldfish RTC device")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250321221248.17764-1-heinrich.schuchardt@canonical.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 2542d5cf47)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-04-02 10:17:41 +03:00
..
allwinner-rtc.c rtc: Move RTC function prototypes to their own header 2022-01-28 14:29:46 +00:00
aspeed_rtc.c rtc: Move RTC function prototypes to their own header 2022-01-28 14:29:46 +00:00
ds1338.c rtc: Move RTC function prototypes to their own header 2022-01-28 14:29:46 +00:00
exynos4210_rtc.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
goldfish_rtc.c hw/rtc/goldfish: keep time offset when resetting 2025-04-02 10:17:41 +03:00
Kconfig hw/loongarch: Add LoongArch ls7a rtc device support 2022-06-06 18:14:13 +00:00
ls7a_rtc.c hw/rtc/ls7a_rtc: Drop unused inline functions 2022-07-05 16:17:53 +05:30
m41t80.c Replace qemu_gettimeofday() with g_get_real_time() 2022-04-06 10:50:37 +02:00
m48t59-internal.h hw/timer/m48t59: Convert debug printf()s to trace events 2020-02-06 10:51:24 +01:00
m48t59-isa.c hw/isa: Inline and remove one-line isa_init_irq() 2022-03-08 19:38:17 +01:00
m48t59.c rtc: Move RTC function prototypes to their own header 2022-01-28 14:29:46 +00:00
mc146818rtc.c hw/rtc/mc146818rtc: QOM'ify io_base offset 2022-06-11 11:44:50 +02:00
meson.build hw/loongarch: Add LoongArch ls7a rtc device support 2022-06-06 18:14:13 +00:00
pl031.c pl031: Update last RTCLR value on write in case it's read back 2024-02-27 20:36:50 +03:00
sun4v-rtc.c hw/rtc/sun4v-rtc: Relicense to GPLv2-or-later 2024-03-13 23:09:00 +03:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
twl92230.c rtc: Move RTC function prototypes to their own header 2022-01-28 14:29:46 +00:00
xlnx-zynqmp-rtc.c rtc: Move RTC function prototypes to their own header 2022-01-28 14:29:46 +00:00