]> 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)
commit01aaf8457cb5de91930f6a8fdcc7843cc0ccead2
tree4a16958a9fb5a60641f9e17684df3c770fb17d0e
parentd65b168eea2d9ea3c89cbfde15e3ceaf86f8ba33
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