All of lore.kernel.org
 help / color / mirror / Atom feed
* qemu-kvm requires apic initialized before vcpu main loop
@ 2009-12-09 17:46 Marcelo Tosatti
  2009-12-09 18:23 ` Jan Kiszka
                   ` (3 more replies)
  0 siblings, 4 replies; 29+ messages in thread
From: Marcelo Tosatti @ 2009-12-09 17:46 UTC (permalink / raw)
  To: Avi Kivity, Glauber de Oliveira Costa; +Cc: kvm


Otherwise a zero apic base is loaded into KVM, which results
in interrupts being lost until a proper apic base with enabled 
bit set is loaded.

Fixes WinXP migration in qemu-kvm origin/next.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

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;
 }

^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2009-12-16 14:12 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-09 17:46 qemu-kvm requires apic initialized before vcpu main loop Marcelo Tosatti
2009-12-09 18:23 ` Jan Kiszka
2009-12-09 19:23   ` Gleb Natapov
2009-12-09 20:09     ` Jan Kiszka
2009-12-09 20:13       ` Marcelo Tosatti
2009-12-09 20:21         ` Jan Kiszka
2009-12-09 20:50       ` Gleb Natapov
2009-12-09 21:01         ` Jan Kiszka
2009-12-10  6:36           ` Gleb Natapov
2009-12-10  8:12             ` Jan Kiszka
2009-12-09 20:02   ` Marcelo Tosatti
2009-12-09 20:22   ` Marcelo Tosatti
2009-12-09 18:25 ` Glauber Costa
2009-12-09 19:00   ` Jan Kiszka
2009-12-09 20:21     ` Marcelo Tosatti
2009-12-10 11:06       ` Glauber Costa
2009-12-09 20:09   ` Marcelo Tosatti
2009-12-09 19:20 ` Gleb Natapov
2009-12-09 20:26   ` Marcelo Tosatti
2009-12-10  9:33 ` Avi Kivity
2009-12-10  9:45   ` Avi Kivity
2009-12-14 20:36     ` [PATCH] qemu-kvm initialize vcpu state after machine initialization Marcelo Tosatti
2009-12-15 10:16       ` Avi Kivity
2009-12-15 11:20       ` Gleb Natapov
2009-12-15 12:24         ` Marcelo Tosatti
2009-12-15 12:31           ` Avi Kivity
2009-12-15 12:51             ` Marcelo Tosatti
2009-12-15 12:33           ` Gleb Natapov
2009-12-16 14:12             ` Marcelo Tosatti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.