]> 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)
commitce9a1b9e51532ee227cf6d097feba8021d6bd7db
treefb022e34c6625d090654e3278f72f568b4ded61b
parent4ce6d9351b7faa6c6ce9374fa7b59eaead5a0c85
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