This allows save/restore (and live migration on kvm) of smp guests.
Index: hw/apic.c
===================================================================
RCS file: /sources/qemu/qemu/hw/apic.c,v
retrieving revision 1.13
diff -u -r1.13 apic.c
--- hw/apic.c 3 Apr 2007 16:38:34 -0000 1.13
+++ hw/apic.c 13 Aug 2007 15:54:50 -0000
@@ -832,7 +832,7 @@
}
s->timer = qemu_new_timer(vm_clock, apic_timer, s);
- register_savevm("apic", 0, 2, apic_save, apic_load, s);
+ register_savevm("apic", s->id, 2, apic_save, apic_load, s);
qemu_register_reset(apic_reset, s);
local_apics[s->id] = s;