From patchwork Sat Feb 26 15:40:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 84652 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 77731B7148 for ; Sun, 27 Feb 2011 02:53:16 +1100 (EST) Received: from localhost ([127.0.0.1]:53946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtMRy-0007so-5o for incoming@patchwork.ozlabs.org; Sat, 26 Feb 2011 10:52:54 -0500 Received: from [140.186.70.92] (port=40706 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtMGG-0002P2-QA for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PtMGF-0007Yu-Rc for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:48 -0500 Received: from mail-ww0-f53.google.com ([74.125.82.53]:41779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PtMGF-0007RV-NE for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:47 -0500 Received: by mail-ww0-f53.google.com with SMTP id 29so366964wwb.10 for ; Sat, 26 Feb 2011 07:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer:in-reply-to:references; bh=7gI1m5yrnOJR29p7RH1V1FnYuA9ER81EDcSXf3ojFUM=; b=tFWOcx+XWiO/f+jVGICjXdsx7YyUvKO6KCTy5OIquVMI6KDXcFzHMEdGWlIibmOGmi EI+lnOb3opaNjP3sYRuykmfCZUvL1L0gr/ZaFXaNS4uuLh7OqQnF7BjFhzSSXNEV9H9N AzQRNs4uIgRIWQphDb7tTb8e5ERa6x2LK7g40= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=bpvrCsv2d5MptdGPa8oUbiTa5qiNy/DassJGLIWLWg4Ftt7bMAUCLeufkg83CO4gO7 qnAZsfFRXc+sX1ImAARQCNIb1ZkE841021/i9A1hY7FIRMXebObzXGVszdqRYVea3NVV JFlC1JTPZPvBiP4+mfzzva/dVWYng5TwgVG1k= Received: by 10.227.146.8 with SMTP id f8mr3260102wbv.84.1298734847307; Sat, 26 Feb 2011 07:40:47 -0800 (PST) Received: from localhost.localdomain (93-34-149-100.ip50.fastwebnet.it [93.34.149.100]) by mx.google.com with ESMTPS id f27sm1592788wbf.1.2011.02.26.07.40.45 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 Feb 2011 07:40:46 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sat, 26 Feb 2011 16:40:09 +0100 Message-Id: <1298734819-1960-13-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1298734819-1960-1-git-send-email-pbonzini@redhat.com> References: <1298734819-1960-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.53 Cc: jan.kiszka@siemens.com, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH v2 upstream 12/22] 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 c5743c4..785a104 100644 --- a/cpus.c +++ b/cpus.c @@ -1098,7 +1098,7 @@ bool cpu_exec_all(void) cpu_handle_debug_exception(env); break; } - } else if (env->stop) { + } else if (env->stop || env->stopped) { break; } }