qemu/hw/rtc
Heinrich Schuchardt d87ee29327 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 hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
aspeed_rtc.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
ds1338.c Misc HW patch queue 2024-11-06 17:28:45 +00:00
exynos4210_rtc.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
goldfish_rtc.c hw/rtc/goldfish: keep time offset when resetting 2025-04-02 10:17:41 +03:00
Kconfig hw/rtc: Remove twl92230 device 2024-10-01 14:40:59 +01:00
ls7a_rtc.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
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: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
m48t59.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
mc146818rtc.c hw/i386: move rtc-reset-reinjection command out of hw/rtc 2024-05-10 15:45:15 +02:00
meson.build hw/rtc: Remove twl92230 device 2024-10-01 14:40:59 +01:00
pl031.c pl031: Update last RTCLR value on write in case it's read back 2024-02-27 13:01:41 +00:00
sun4v-rtc.c hw/rtc/sun4v-rtc: Relicense to GPLv2-or-later 2024-03-07 12:54:56 +00:00
trace-events hw/rtc/ds1338: Trace send and receive operations 2024-11-05 10:09:59 +00:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
xlnx-zynqmp-rtc.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00