From patchwork Tue Feb 8 17:18:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 82394 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 67582B7136 for ; Wed, 9 Feb 2011 06:33:08 +1100 (EST) Received: from localhost ([127.0.0.1]:39393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmtJA-0004SP-SS for incoming@patchwork.ozlabs.org; Tue, 08 Feb 2011 14:33:05 -0500 Received: from [140.186.70.92] (port=48149 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmtGc-0003J9-5l for qemu-devel@nongnu.org; Tue, 08 Feb 2011 14:30:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmtGb-0003ns-8r for qemu-devel@nongnu.org; Tue, 08 Feb 2011 14:30:26 -0500 Received: from mail-yi0-f45.google.com ([209.85.218.45]:61541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmrDI-0000yQ-DV for qemu-devel@nongnu.org; Tue, 08 Feb 2011 12:18:52 -0500 Received: by mail-yi0-f45.google.com with SMTP id 21so2633904yie.4 for ; Tue, 08 Feb 2011 09:18:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:subject:date:message-id:x-mailer :in-reply-to:references; bh=spsKyvW0F9mY22f6zqxD9YGHJx3uGl8MXtd2vl9AMME=; b=H402+Q3cDU8PYlCrUh9hCWGTsM9LlU0tH4FJZsCLFLQeH5CnG8/uCWUzIYcUqy/emf O/GxiZuDzk4KZ4G+LPodM6tBP4opg/Q43XFzpHwzQ9g6oqSvSO55xpIf+qo7qxwz43r8 5v/LYLIQ5cwtT1rC3n1QQ+3AsioqyJFVFpjD4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; b=EUX2eT3moz+DSwk8M8xTHBU4gwtrMnqZE2yJJGqzphy1eYob1hRz6MfiMIOVrkEuqg vzgzRHcMr0p9Y8T79dWXlVXt310TBgoBjWI5JXxoZJXKVfcK/WIFm7YSeOFJECaNQ+Vk RrLtdd4hRKJg5ytxG/iR4NqU55XBC8tIip5jk= Received: by 10.101.166.33 with SMTP id t33mr10443566ano.83.1297185532203; Tue, 08 Feb 2011 09:18:52 -0800 (PST) Received: from localhost.localdomain (93-34-149-100.ip50.fastwebnet.it [93.34.149.100]) by mx.google.com with ESMTPS id e24sm7303210ana.22.2011.02.08.09.18.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 08 Feb 2011 09:18:51 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 8 Feb 2011 18:18:23 +0100 Message-Id: <1297185509-20996-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.3.5 In-Reply-To: <1297185509-20996-1-git-send-email-pbonzini@redhat.com> References: <1297185509-20996-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.218.45 Subject: [Qemu-devel] [CFT PATCH 06/12] exit round-robin vcpu loop if cpu->stopped is true 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 Sometimes vcpus are stopped directly without going through ->stop = 1. Exit the VCPU execution loop in this case as well. Signed-off-by: Paolo Bonzini --- cpus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpus.c b/cpus.c index c1d0ceb..5b13961 100644 --- a/cpus.c +++ b/cpus.c @@ -1061,7 +1061,7 @@ bool cpu_exec_all(void) if (r == EXCP_DEBUG) { break; } - } else if (env->stop) { + } else if (env->stop || env->stopped) { break; } }