]> git.ipfire.org Git - thirdparty/qemu.git/commit
pl031: Update last RTCLR value on write in case it's read back
authorJessica Clarke <jrtc27@jrtc27.com>
Mon, 26 Feb 2024 14:07:24 +0000 (14:07 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 27 Feb 2024 17:37:06 +0000 (20:37 +0300)
commita0fb839d0a48b1d421c41e301cadb6e5cd516eed
treec92bff99a5d410a43cc8e1aa3c6c988997e2657d
parente4e36e65c9416c225cc684d82754ba1e5c3ca8ff
pl031: Update last RTCLR value on write in case it's read back

The PL031 allows you to read RTCLR, which is meant to give you the last
value written. PL031State has an lr field which is used when reading
from RTCLR, and is present in the VM migration state, but we never
actually update it, so it always reads as its initial 0 value.

Cc: qemu-stable@nongnu.org
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20240222000341.1562443-1-jrtc27@jrtc27.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 4d28d57c9f2eb1cdf70b29cea6e50282e010075b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/rtc/pl031.c