qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 7/8] openpic: add missing timer fields to vmstate_op


From: Mark Cave-Ayland
Subject: [Qemu-devel] [PATCH 7/8] openpic: add missing timer fields to vmstate_openpic_timer
Date: Sun, 17 Sep 2017 18:15:47 +0100

Observation of the code shows indicates that several timer fields are
missing from the migration stream.

Signed-off-by: Mark Cave-Ayland <address@hidden>
---
 hw/intc/openpic.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index 10d6e87..debfcbf 100644
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@ -1570,11 +1570,14 @@ static const VMStateDescription 
vmstate_openpic_irqsource = {
 
 static const VMStateDescription vmstate_openpic_timer = {
     .name = "openpic_timer",
-    .version_id = 0,
-    .minimum_version_id = 0,
+    .version_id = 1,
+    .minimum_version_id = 1,
     .fields = (VMStateField[]) {
         VMSTATE_UINT32(tccr, OpenPICTimer),
         VMSTATE_UINT32(tbcr, OpenPICTimer),
+        VMSTATE_BOOL(qemu_timer_active, OpenPICTimer),
+        VMSTATE_TIMER_PTR(qemu_timer, OpenPICTimer),
+        VMSTATE_UINT64(origin_time, OpenPICTimer),
         VMSTATE_END_OF_LIST()
     }
 };
@@ -1620,7 +1623,7 @@ static const VMStateDescription vmstate_openpic = {
         VMSTATE_UINT32_EQUAL(nb_cpus, OpenPICState, NULL),
         VMSTATE_STRUCT_VARRAY_UINT32(dst, OpenPICState, nb_cpus, 0,
                                      vmstate_openpic_irqdest, IRQDest),
-        VMSTATE_STRUCT_ARRAY(timers, OpenPICState, OPENPIC_MAX_TMR, 0,
+        VMSTATE_STRUCT_ARRAY(timers, OpenPICState, OPENPIC_MAX_TMR, 1,
                              vmstate_openpic_timer, OpenPICTimer),
         VMSTATE_STRUCT_ARRAY(msi, OpenPICState, MAX_MSI, 0,
                              vmstate_openpic_msi, OpenPICMSI),
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]