]> Git Repo - qemu.git/blobdiff - hw/apic.c
save apic timer
[qemu.git] / hw / apic.c
index 8f88cce0116fa126be1c168371d0b8eddd9194b4..aa6f2ef38fcf30fdcc246beede9aed8121922c74 100644 (file)
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -745,6 +745,8 @@ static void apic_save(QEMUFile *f, void *opaque)
     qemu_put_be32s(f, &s->initial_count);
     qemu_put_be64s(f, &s->initial_count_load_time);
     qemu_put_be64s(f, &s->next_time);
+
+    qemu_put_timer(f, s->timer);
 }
 
 static int apic_load(QEMUFile *f, void *opaque, int version_id)
@@ -752,7 +754,7 @@ static int apic_load(QEMUFile *f, void *opaque, int version_id)
     APICState *s = opaque;
     int i;
 
-    if (version_id != 1)
+    if (version_id > 2)
         return -EINVAL;
 
     /* XXX: what if the base changes? (registered memory regions) */
@@ -779,6 +781,9 @@ static int apic_load(QEMUFile *f, void *opaque, int version_id)
     qemu_get_be32s(f, &s->initial_count);
     qemu_get_be64s(f, &s->initial_count_load_time);
     qemu_get_be64s(f, &s->next_time);
+
+    if (version_id >= 2)
+        qemu_get_timer(f, s->timer);
     return 0;
 }
 
This page took 0.024443 seconds and 4 git commands to generate.