diff mbox

qemu-kvm requires apic initialized before vcpu main loop

Message ID 20091209174654.GA28056@amt.cnet (mailing list archive)
State New, archived
Headers show

Commit Message

Marcelo Tosatti Dec. 9, 2009, 5:46 p.m. UTC
None
diff mbox

Patch

diff --git a/hw/apic.c b/hw/apic.c
index 627ff98..45a4d2b 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -1131,6 +1131,11 @@  int apic_init(CPUState *env)
     vmstate_register(s->idx, &vmstate_apic, s);
     qemu_register_reset(apic_reset, s);
 
+    /* apic_reset must be called before the vcpu threads are initialized and load 
+     * registers, in qemu-kvm.
+     */
+    apic_reset(s);
+
     local_apics[s->idx] = s;
     return 0;
 }