aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-02-01 22:15:44 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2011-02-14 12:39:44 -0200
commit1745eaaa7c53c6090d53090d239d0234a7ecfd2d (patch)
treecab9496f3e1a0313f86521363d2ea2ad191a373f
parentb4a3d965dee06d52281496bb5fd0a5cb5534b545 (diff)
Process vmstop requests in IO thread
A pending vmstop request is also a reason to leave the inner main loop. So far we ignored it, and pending stop requests issued over VCPU threads were simply ignored. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r--vl.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/vl.c b/vl.c
index 5e3f7f24e9..30263d6349 100644
--- a/vl.c
+++ b/vl.c
@@ -1391,15 +1391,11 @@ void main_loop_wait(int nonblocking)
static int vm_can_run(void)
{
- if (powerdown_requested)
- return 0;
- if (reset_requested)
- return 0;
- if (shutdown_requested)
- return 0;
- if (debug_requested)
- return 0;
- return 1;
+ return !(powerdown_requested ||
+ reset_requested ||
+ shutdown_requested ||
+ debug_requested ||
+ vmstop_requested);
}
qemu_irq qemu_system_powerdown;