qemu/hw/rtc
Rodrigo Dias Correa 3521f9cadc goldfish_rtc: Fix tick_offset migration
Instead of migrating the raw tick_offset, goldfish_rtc migrates a
recalculated value based on QEMU_CLOCK_VIRTUAL. As QEMU_CLOCK_VIRTUAL
stands still across a save-and-restore cycle, the guest RTC becomes out
of sync with the host RTC when the VM is restored.

As described in the bug description, it looks like this calculation was
copied from pl031 RTC, which had its tick_offset migration fixed by
Commit 032cfe6a79 ("pl031: Correctly migrate state when using -rtc
clock=host").

Migrate the tick_offset directly, adding it as a version-dependent field
to VMState. Keep the old behavior when migrating from previous versions.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2033
Signed-off-by: Rodrigo Dias Correa <r@drigo.nl>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20250114212150.228241-1-r@drigo.nl>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2025-03-04 15:42:54 +10:00
..
allwinner-rtc.c hw/arm: Mark Allwinner Technology devices as little-endian 2025-02-16 14:41:46 +01:00
aspeed_rtc.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
ds1338.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
exynos4210_rtc.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
goldfish_rtc.c goldfish_rtc: Fix tick_offset migration 2025-03-04 15:42:54 +10:00
Kconfig hw/rtc: Remove twl92230 device 2024-10-01 14:40:59 +01:00
ls7a_rtc.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
m41t80.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01: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: Declare various const data as 'const' 2025-02-16 14:26:07 +01:00
m48t59.c hw: Declare various const data as 'const' 2025-02-16 14:26:07 +01:00
mc146818rtc.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
meson.build hw/rtc: Remove twl92230 device 2024-10-01 14:40:59 +01:00
pl031.c Accel & Exec patch queue 2024-12-21 11:07:00 -05: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 include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00