* [Qemu-devel] [PATCH] fix -daemonize with kvm
@ 2009-09-18 5:41 Marcelo Tosatti
0 siblings, 0 replies; only message in thread
From: Marcelo Tosatti @ 2009-09-18 5:41 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel
Otherwise fork might not inherit state initialized by kvm_init().
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/vl.c b/vl.c
index eb01da7..7e62a65 100644
--- a/vl.c
+++ b/vl.c
@@ -5424,16 +5424,6 @@ int main(int argc, char **argv, char **envp)
}
}
- if (kvm_enabled()) {
- int ret;
-
- ret = kvm_init(smp_cpus);
- if (ret < 0) {
- fprintf(stderr, "failed to initialize KVM\n");
- exit(1);
- }
- }
-
/* If no data_dir is specified then try to find it relative to the
executable path. */
if (!data_dir) {
@@ -5523,6 +5513,16 @@ int main(int argc, char **argv, char **envp)
}
#endif
+ if (kvm_enabled()) {
+ int ret;
+
+ ret = kvm_init(smp_cpus);
+ if (ret < 0) {
+ fprintf(stderr, "failed to initialize KVM\n");
+ exit(1);
+ }
+ }
+
if (qemu_init_main_loop()) {
fprintf(stderr, "qemu_init_main_loop failed\n");
exit(1);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-18 5:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-18 5:41 [Qemu-devel] [PATCH] fix -daemonize with kvm 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.