summaryrefslogtreecommitdiffstats
path: root/vl.c
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2009-10-07 16:38:03 -0300
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-12 09:42:31 -0500
commitd549db5a732ef2ec145b84c5008a7585cf17cf67 (patch)
tree62fa1660dca3ce393c20c92be0469408d4e46204 /vl.c
parentce88f890bdbb4e38a047d9e5d096233163452651 (diff)
downloadhqemu-d549db5a732ef2ec145b84c5008a7585cf17cf67.zip
hqemu-d549db5a732ef2ec145b84c5008a7585cf17cf67.tar.gz
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 <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vl.c b/vl.c
index 374f85b..afe01af 100644
--- a/vl.c
+++ b/vl.c
@@ -3560,8 +3560,8 @@ void qemu_notify_event(void)
}
}
-#define qemu_mutex_lock_iothread() do { } while (0)
-#define qemu_mutex_unlock_iothread() do { } while (0)
+void qemu_mutex_lock_iothread(void) {}
+void qemu_mutex_unlock_iothread(void) {}
void vm_stop(int reason)
{
@@ -3760,7 +3760,7 @@ static void qemu_signal_lock(unsigned int msecs)
qemu_mutex_unlock(&qemu_fair_mutex);
}
-static void qemu_mutex_lock_iothread(void)
+void qemu_mutex_lock_iothread(void)
{
if (kvm_enabled()) {
qemu_mutex_lock(&qemu_fair_mutex);
@@ -3770,7 +3770,7 @@ static void qemu_mutex_lock_iothread(void)
qemu_signal_lock(100);
}
-static void qemu_mutex_unlock_iothread(void)
+void qemu_mutex_unlock_iothread(void)
{
qemu_mutex_unlock(&qemu_global_mutex);
}
OpenPOWER on IntegriCloud