]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/rtc/goldfish: keep time offset when resetting
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 21 Mar 2025 22:12:48 +0000 (23:12 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 31 Mar 2025 19:32:43 +0000 (21:32 +0200)
commit2542d5cf471a38c4ceb9717708178938b96ded47
treec94dd0fbdce480edf07c9d48cbd100d2ad3a2dda
parentfacfc943cb943ae05997a22642334558751c2bdb
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: 9a5b40b8427 ("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>
hw/rtc/goldfish_rtc.c