From: Helge Deller <deller@kernel.org>
To: qemu-devel@nongnu.org
Cc: Keith Monahan <keith@techtravels.org>,
Helge Deller <deller@gmx.de>,
Richard Henderson <richard.henderson@linaro.org>
Subject: [PULL 2/4] target/hppa: re-arm the interval timer after loadvm
Date: Thu, 19 Nov 2026 23:47:42 +0100 [thread overview]
Message-ID: <20261119224744.31309-3-deller@kernel.org> (raw)
In-Reply-To: <20261119224744.31309-1-deller@kernel.org>
From: Keith Monahan <keith@techtravels.org>
CR_IT holds the absolute expiry of the interval timer and is migrated
with the other control registers, but the QEMUTimer behind it was not
re-armed, so a restored guest never saw another clock interrupt.
Signed-off-by: Keith Monahan <keith@techtravels.org>
Signed-off-by: Helge Deller <deller@gmx.de>
---
target/hppa/machine.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/target/hppa/machine.c b/target/hppa/machine.c
index 6a143cf8df..1e59b8c2c9 100644
--- a/target/hppa/machine.c
+++ b/target/hppa/machine.c
@@ -21,6 +21,7 @@
#include "cpu.h"
#include "migration/qemu-file-types.h"
#include "migration/vmstate.h"
+#include "qemu/timer.h"
static int get_psw(QEMUFile *f, void *opaque, size_t size,
@@ -222,9 +223,21 @@ static const VMStateField vmstate_cpu_fields[] = {
VMSTATE_END_OF_LIST()
};
+static int cpu_post_load(void *opaque, int version_id)
+{
+ HPPACPU *cpu = opaque;
+
+ /* CR_IT holds the absolute expiry of the interval timer; re-arm it */
+ if (cpu->env.cr[CR_IT]) {
+ timer_mod(cpu->alarm_timer, cpu->env.cr[CR_IT]);
+ }
+ return 0;
+}
+
const VMStateDescription vmstate_hppa_cpu = {
.name = "cpu",
.version_id = 1,
.minimum_version_id = 1,
+ .post_load = cpu_post_load,
.fields = vmstate_cpu_fields,
};
--
2.54.0
next prev parent reply other threads:[~2026-11-19 22:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 22:47 [PULL 0/4] Hp715 fixes patches Helge Deller
2026-11-19 22:47 ` [PULL 1/4] target/hppa: clear EIRR under the BQL and keep the interval timer matching Helge Deller
2026-11-19 22:47 ` Helge Deller [this message]
2026-11-19 22:47 ` [PULL 3/4] Revert "target/hppa: Move emulated power button into CPU I/O region" Helge Deller
2026-11-19 22:47 ` [PULL 4/4] hw/hppa: preload a BTLB entry for the soft power button page Helge Deller
2026-11-20 19:43 ` [PULL 0/4] Hp715 fixes patches Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119224744.31309-3-deller@kernel.org \
--to=deller@kernel.org \
--cc=deller@gmx.de \
--cc=keith@techtravels.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.