From patchwork Tue Feb 1 21:15:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 81380 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 55679B70EA for ; Wed, 2 Feb 2011 08:29:29 +1100 (EST) Received: from localhost ([127.0.0.1]:41471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkNkQ-0002Ov-Kz for incoming@patchwork.ozlabs.org; Tue, 01 Feb 2011 16:26:50 -0500 Received: from [140.186.70.92] (port=47457 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkNh6-000138-SY for qemu-devel@nongnu.org; Tue, 01 Feb 2011 16:23:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkNbN-0003Od-0Y for qemu-devel@nongnu.org; Tue, 01 Feb 2011 16:17:34 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:59158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkNbM-0003O9-Pk for qemu-devel@nongnu.org; Tue, 01 Feb 2011 16:17:28 -0500 Received: from smtp05.web.de ( [172.20.4.166]) by fmmailgate03.web.de (Postfix) with ESMTP id EAC6C186EC2F2; Tue, 1 Feb 2011 22:16:09 +0100 (CET) Received: from [88.65.41.52] (helo=localhost.localdomain) by smtp05.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1PkNa5-0006FM-02; Tue, 01 Feb 2011 22:16:09 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Tue, 1 Feb 2011 22:15:44 +0100 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX1/DN/LDNwZmz7gIBMV6V7yijHc0KjFXJRbhqLT3 XzHnOEwYXt0z9Uf3h1dnb6jGy2E2FgUyg/6EpHOXvOFSRBFDaE knpmmFyu8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.234 Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH v2 04/24] Process vmstop requests in IO thread X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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 --- vl.c | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/vl.c b/vl.c index db24a05..5fad700 100644 --- a/vl.c +++ b/vl.c @@ -1373,15 +1373,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;