aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-08-17 10:48:06 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-08-17 10:48:06 +0000
commite6cf6a8c7d1d01b1b3a293ba420d39c61435a9b9 (patch)
treebd9711f06cae2e7241b315ec8d96bcd5f1ae33f6 /hw
parent1941d19c657a8084603e88d7860786baa40c0e80 (diff)
save apic timer
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2116 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/apic.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/apic.c b/hw/apic.c
index 8f88cce011..aa6f2ef38f 100644
--- 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;
}