]> 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)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 2 Apr 2025 07:17:41 +0000 (10:17 +0300)
commitd87ee29327e20dfebbcab63c67db7789ece42a65
tree7be0a9578dc382e4f93b22e41fba984a00051a1e
parentec877d2ab010122fdcad904e44079790e0213e47
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>
(cherry picked from commit 2542d5cf471a38c4ceb9717708178938b96ded47)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/rtc/goldfish_rtc.c