[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] do not issue ioctl from within the io thread

From: Glauber Costa
Subject: [Qemu-devel] [PATCH 2/2] do not issue ioctl from within the io thread
Date: Tue, 25 Aug 2009 18:13:36 -0400

According to Documentation/kvm/api.txt, (and well, to common sense),
we should not be calling vcpu ioctls from within the iothread.
Since vcpu initialization issues a vcpu ioctl, move it a little bit
further in time to prevent it.

Signed-off-by: Glauber Costa <address@hidden>
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vl.c b/vl.c
index aa5047e..89051b8 100644
--- a/vl.c
+++ b/vl.c
@@ -3675,6 +3675,7 @@ static void *kvm_cpu_thread_fn(void *arg)
+    kvm_init_vcpu(env);
     /* signal CPU creation */
@@ -3870,7 +3871,6 @@ static void tcg_init_vcpu(void *_env)
 static void kvm_start_vcpu(CPUState *env)
-    kvm_init_vcpu(env);
     env->thread = qemu_mallocz(sizeof(QemuThread));
     env->halt_cond = qemu_mallocz(sizeof(QemuCond));

reply via email to

[Prev in Thread] Current Thread [Next in Thread]