diff options
author | Glauber Costa <glommer@redhat.com> | 2009-08-25 18:13:36 -0400 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-09-04 09:37:27 -0500 |
commit | 4e2f73ce3d70083dacb99815c9633af48aae32b4 (patch) | |
tree | 3c12b36ab4212f3c160c2f0270bae6491c57e1c9 | |
parent | 67b3b71d51844b9413278add178a49723a97aad9 (diff) | |
download | qemu-4e2f73ce3d70083dacb99815c9633af48aae32b4.zip qemu-4e2f73ce3d70083dacb99815c9633af48aae32b4.tar.gz qemu-4e2f73ce3d70083dacb99815c9633af48aae32b4.tar.bz2 |
do not issue ioctl from within the io thread
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 <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | vl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3749,6 +3749,7 @@ static void *kvm_cpu_thread_fn(void *arg) block_io_signals(); qemu_thread_self(env->thread); + kvm_init_vcpu(env); /* signal CPU creation */ qemu_mutex_lock(&qemu_global_mutex); @@ -3944,7 +3945,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)); qemu_cond_init(env->halt_cond); |