[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kvm-commits
Subject:    [COMMIT master] use qemu version of kvm initialization
From:       Avi Kivity <avi () redhat ! com>
Date:       2009-07-26 9:44:36
Message-ID: 20090726094436.21F3B250258 () cleopatra ! tlv ! redhat ! com
[Download RAW message or body]

From: Glauber Costa <glommer@redhat.com>

Our code now looks like qemu's a lot. Remove ours, and leave just
qemu's.

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

diff --git a/vl.c b/vl.c
index 74a1c60..30c4ff9 100644
--- a/vl.c
+++ b/vl.c
@@ -5921,30 +5921,19 @@ int main(int argc, char **argv, char **envp)
         }
     }
 
-#ifdef KVM_UPSTREAM
     if (kvm_enabled()) {
         int ret;
 
         ret = kvm_init(smp_cpus);
         if (ret < 0) {
+#if defined(KVM_UPSTREAM) || defined(NO_CPU_EMULATION)
             fprintf(stderr, "failed to initialize KVM\n");
             exit(1);
-        }
-    }
 #endif
-
-#ifdef CONFIG_KVM
-    if (kvm_enabled()) {
-	if (kvm_init(smp_cpus) < 0) {
-	    fprintf(stderr, "Could not initialize KVM, will disable KVM support\n");
-#ifdef NO_CPU_EMULATION
-	    fprintf(stderr, "Compiled with --disable-cpu-emulation, exiting.\n");
-	    exit(1);
-#endif
-	    kvm_allowed = 0;
-	}
+            fprintf(stderr, "Could not initialize KVM, will disable KVM support\n");
+	     kvm_allowed = 0;
+        }
     }
-#endif
 
     if (monitor_device) {
         monitor_hd = qemu_chr_open("monitor", monitor_device, NULL);
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic