From patchwork Fri Feb 4 15:47:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 532211 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p14FoZ6c021974 for ; Fri, 4 Feb 2011 15:50:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753031Ab1BDPuW (ORCPT ); Fri, 4 Feb 2011 10:50:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3115 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752709Ab1BDPtt (ORCPT ); Fri, 4 Feb 2011 10:49:49 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p14Fnl0B019026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Feb 2011 10:49:47 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p14FnkgV001047; Fri, 4 Feb 2011 10:49:46 -0500 Received: from amt.cnet (vpn2-8-97.ams2.redhat.com [10.36.8.97]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p14FnhlA002221; Fri, 4 Feb 2011 10:49:45 -0500 Received: from amt.cnet (localhost.localdomain [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id E0EB2652029; Fri, 4 Feb 2011 13:47:45 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.4/8.14.4/Submit) id p14Flgbw017669; Fri, 4 Feb 2011 13:47:42 -0200 From: Marcelo Tosatti To: Anthony Liguori Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Jan Kiszka , Marcelo Tosatti Subject: [PATCH 03/23] Process vmstop requests in IO thread Date: Fri, 4 Feb 2011 13:47:06 -0200 Message-Id: <00d6e393b0a59b558e86e73625c47610a7382f19.1296834446.git.mtosatti@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 04 Feb 2011 15:50:35 +0000 (UTC) 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;