From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51769 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlNuw-000637-PA for qemu-devel@nongnu.org; Fri, 04 Feb 2011 10:49:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PlNut-0007zj-VF for qemu-devel@nongnu.org; Fri, 04 Feb 2011 10:49:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PlNut-0007z1-OX for qemu-devel@nongnu.org; Fri, 04 Feb 2011 10:49:47 -0500 From: Marcelo Tosatti Date: Fri, 4 Feb 2011 13:47:06 -0200 Message-Id: <00d6e393b0a59b558e86e73625c47610a7382f19.1296834446.git.mtosatti@redhat.com> In-Reply-To: References: Subject: [Qemu-devel] [PATCH 03/23] Process vmstop requests in IO thread List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org From: Jan Kiszka 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 Signed-off-by: Marcelo Tosatti --- vl.c | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/vl.c b/vl.c index b1dc3ff..57b4c9f 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; -- 1.7.2.3