diff mbox

fix vl.c compilation if CONFIG_KVM is not defined

Message ID 1251928744-404-1-git-send-email-jcd@tribudubois.net
State Superseded
Headers show

Commit Message

Jean-Christophe Dubois Sept. 2, 2009, 9:59 p.m. UTC
vl.c will not link if CONFIG_KVM is not defined.

This patch fixes the problem.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---
 vl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/vl.c b/vl.c
index 1bdc586..4188178 100644
--- a/vl.c
+++ b/vl.c
@@ -3944,7 +3944,8 @@  static void tcg_init_vcpu(void *_env)
 
 static void kvm_start_vcpu(CPUState *env)
 {
-    kvm_init_vcpu(env);
+    if (kvm_enabled())
+        kvm_init_vcpu(env);
     env->thread = qemu_mallocz(sizeof(QemuThread));
     env->halt_cond = qemu_mallocz(sizeof(QemuCond));
     qemu_cond_init(env->halt_cond);