On 23/02/21 12:01, Alex Bennée wrote:
diff --git a/target/arm/machine.c b/target/arm/machine.c
index 666ef329ef..13d7c6d930 100644
--- a/target/arm/machine.c
+++ b/target/arm/machine.c
@@ -822,8 +822,13 @@ const VMStateDescription vmstate_arm_cpu = {
VMSTATE_UINT32(env.exception.syndrome, ARMCPU),
VMSTATE_UINT32(env.exception.fsr, ARMCPU),
VMSTATE_UINT64(env.exception.vaddress, ARMCPU),
+#ifdef CONFIG_TCG
VMSTATE_TIMER_PTR(gt_timer[GTIMER_PHYS], ARMCPU),
VMSTATE_TIMER_PTR(gt_timer[GTIMER_VIRT], ARMCPU),
+#else
+ VMSTATE_UNUSED(sizeof(QEMUTimer *)),
+ VMSTATE_UNUSED(sizeof(QEMUTimer *)),
+#endif /* CONFIG_TCG */
I'm not sure this is correct - VMSTATE_TIMER_PTR chases the links to
just expose expired time but QEMUTimer has more in it than that. Paolo
If the timer is never set, it is completely free to create it with
timer_new. So it seems simpler to do nothing here.
The observation about the null pointer makes sense, but I think it would
break existing migration streams. Also we would like to convert all
QEMUTimer* to embedded QEMUTimers, so my advice is to not bother adding
it, instead of figuring out how to solve those problems.
Paolo