kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qemu-kvm: Fix segfault on -no-kvm startup
@ 2009-09-25 16:05 Jan Kiszka
  2009-09-25 17:05 ` Gleb Natapov
  2009-09-27  8:33 ` Avi Kivity
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Kiszka @ 2009-09-25 16:05 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm-devel

The check for in-kernel irqchip must be protected by kvm_enabled, and we
have a different wrapper for it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 hw/apic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/apic.c b/hw/apic.c
index 3a2e128..01ac174 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -509,9 +509,10 @@ void apic_init_reset(CPUState *env)
 
     env->halted = !(s->apicbase & MSR_IA32_APICBASE_BSP);
 #ifdef KVM_CAP_MP_STATE
-    if (kvm_irqchip_in_kernel(kvm_context))
+    if (kvm_enabled() && qemu_kvm_irqchip_in_kernel()) {
         env->mp_state
             = env->halted ? KVM_MP_STATE_UNINITIALIZED : KVM_MP_STATE_RUNNABLE;
+    }
 #endif
 }
 

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

end of thread, other threads:[~2009-09-27  8:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-25 16:05 [PATCH] qemu-kvm: Fix segfault on -no-kvm startup Jan Kiszka
2009-09-25 17:05 ` Gleb Natapov
2009-09-25 19:03   ` Jan Kiszka
2009-09-27  8:33     ` Avi Kivity
2009-09-27  8:33 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).