diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-23 13:37:13 -0300 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-04-26 11:28:35 -0300 |
commit | 6164e6d6e86e8f3f0b5ff7ae08b677026cb291c3 (patch) | |
tree | 1b96e3ec722a87286d66ca210e636d10dce8ea01 /cpus.c | |
parent | 204204308b011d5fe494970255b318ec444d1d45 (diff) | |
download | qemu-6164e6d6e86e8f3f0b5ff7ae08b677026cb291c3.tar.gz qemu-6164e6d6e86e8f3f0b5ff7ae08b677026cb291c3.tar.bz2 qemu-6164e6d6e86e8f3f0b5ff7ae08b677026cb291c3.zip |
kvm_init_vcpu requires global lock held
Since it accesses data protected by the lock.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r-- | cpus.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -401,6 +401,7 @@ static void *kvm_cpu_thread_fn(void *arg) { CPUState *env = arg; + qemu_mutex_lock(&qemu_global_mutex); qemu_thread_self(env->thread); if (kvm_enabled()) kvm_init_vcpu(env); @@ -408,7 +409,6 @@ static void *kvm_cpu_thread_fn(void *arg) kvm_block_io_signals(env); /* signal CPU creation */ - qemu_mutex_lock(&qemu_global_mutex); env->created = 1; qemu_cond_signal(&qemu_cpu_cond); |