From: Glauber Costa <[email protected]>

The goal is to get rid of the call to kvm_init. But those things
are subtle, and often break. So do it in a separate patch, to help
finding potential issues in future bisections.

Signed-off-by: Glauber Costa <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>

diff --git a/vl.c b/vl.c
index c09d801..8ea0771 100644
--- a/vl.c
+++ b/vl.c
@@ -5736,19 +5736,6 @@ int main(int argc, char **argv, char **envp)
         signal(SIGTTIN, SIG_IGN);
     }
 
-#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;
-       }
-    }
-#endif
-
     if (pid_file && qemu_create_pidfile(pid_file) != 0) {
         if (daemonize) {
             uint8_t status = 1;
@@ -5946,6 +5933,19 @@ int main(int argc, char **argv, char **envp)
     }
 #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;
+       }
+    }
+#endif
+
     if (monitor_device) {
         monitor_hd = qemu_chr_open("monitor", monitor_device, NULL);
         if (!monitor_hd) {
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to