Commit e6cf6a8c7d1d01b1b3a293ba420d39c61435a9b9
1 parent
1941d19c
save apic timer
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2116 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
1 deletions
hw/apic.c
| @@ -745,6 +745,8 @@ static void apic_save(QEMUFile *f, void *opaque) | @@ -745,6 +745,8 @@ static void apic_save(QEMUFile *f, void *opaque) | ||
| 745 | qemu_put_be32s(f, &s->initial_count); | 745 | qemu_put_be32s(f, &s->initial_count); |
| 746 | qemu_put_be64s(f, &s->initial_count_load_time); | 746 | qemu_put_be64s(f, &s->initial_count_load_time); |
| 747 | qemu_put_be64s(f, &s->next_time); | 747 | qemu_put_be64s(f, &s->next_time); |
| 748 | + | ||
| 749 | + qemu_put_timer(f, s->timer); | ||
| 748 | } | 750 | } |
| 749 | 751 | ||
| 750 | static int apic_load(QEMUFile *f, void *opaque, int version_id) | 752 | 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) | @@ -752,7 +754,7 @@ static int apic_load(QEMUFile *f, void *opaque, int version_id) | ||
| 752 | APICState *s = opaque; | 754 | APICState *s = opaque; |
| 753 | int i; | 755 | int i; |
| 754 | 756 | ||
| 755 | - if (version_id != 1) | 757 | + if (version_id > 2) |
| 756 | return -EINVAL; | 758 | return -EINVAL; |
| 757 | 759 | ||
| 758 | /* XXX: what if the base changes? (registered memory regions) */ | 760 | /* XXX: what if the base changes? (registered memory regions) */ |
| @@ -779,6 +781,9 @@ static int apic_load(QEMUFile *f, void *opaque, int version_id) | @@ -779,6 +781,9 @@ static int apic_load(QEMUFile *f, void *opaque, int version_id) | ||
| 779 | qemu_get_be32s(f, &s->initial_count); | 781 | qemu_get_be32s(f, &s->initial_count); |
| 780 | qemu_get_be64s(f, &s->initial_count_load_time); | 782 | qemu_get_be64s(f, &s->initial_count_load_time); |
| 781 | qemu_get_be64s(f, &s->next_time); | 783 | qemu_get_be64s(f, &s->next_time); |
| 784 | + | ||
| 785 | + if (version_id >= 2) | ||
| 786 | + qemu_get_timer(f, s->timer); | ||
| 782 | return 0; | 787 | return 0; |
| 783 | } | 788 | } |
| 784 | 789 |