From d549db5a732ef2ec145b84c5008a7585cf17cf67 Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Wed, 7 Oct 2009 16:38:03 -0300 Subject: unlock iothread mutex before running kvm ioctl Without this, kvm will hold the mutex while it issues its run ioctl, and never be able to step out of it, causing a deadlock. Patchworks-ID: 35359 Signed-off-by: Glauber Costa Signed-off-by: Anthony Liguori --- kvm-all.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kvm-all.c') diff --git a/kvm-all.c b/kvm-all.c index 5ea0dd8b1e..48ae26caed 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -605,7 +605,9 @@ int kvm_cpu_exec(CPUState *env) } kvm_arch_pre_run(env, run); + qemu_mutex_unlock_iothread(); ret = kvm_vcpu_ioctl(env, KVM_RUN, 0); + qemu_mutex_lock_iothread(); kvm_arch_post_run(env, run); if (ret == -EINTR || ret == -EAGAIN) { -- cgit v1.2.3