From patchwork Tue Feb 1 21:16:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 81404 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 AD269B7110 for ; Wed, 2 Feb 2011 10:28:30 +1100 (EST) Received: from localhost ([127.0.0.1]:34002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkO1q-0002Wt-8m for incoming@patchwork.ozlabs.org; Tue, 01 Feb 2011 16:44:50 -0500 Received: from [140.186.70.92] (port=46268 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkNhG-0000fh-BK for qemu-devel@nongnu.org; Tue, 01 Feb 2011 16:23:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkNb2-0003LT-Ea for qemu-devel@nongnu.org; Tue, 01 Feb 2011 16:17:09 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:60091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkNb2-0003LB-6Y for qemu-devel@nongnu.org; Tue, 01 Feb 2011 16:17:08 -0500 Received: from smtp05.web.de ( [172.20.4.166]) by fmmailgate01.web.de (Postfix) with ESMTP id E38D2186D8AD1; Tue, 1 Feb 2011 22:16:15 +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 1PkNaB-0006FM-02; Tue, 01 Feb 2011 22:16:15 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Tue, 1 Feb 2011 22:16:02 +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: V01U2FsdGVkX18faTaI3/4pZO/qkbJEDs69tNKz8tX9fpDE8S/L DiYHmze7Q3qCkFa7W3lVOaQfangMynC441dbHECqXI5+XlP/Qu l3xwEGlEw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.221 Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH v2 22/24] kvm: Leave kvm_cpu_exec directly after KVM_EXIT_SHUTDOWN 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 The reset we issue on KVM_EXIT_SHUTDOWN implies that we should also leave the VCPU loop. As we now check for exit_request which is set by qemu_system_reset_request, this bug is no longer critical. Still it's an unneeded extra turn. Signed-off-by: Jan Kiszka --- kvm-all.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index cf54256..35860df 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -959,7 +959,6 @@ int kvm_cpu_exec(CPUState *env) case KVM_EXIT_SHUTDOWN: DPRINTF("shutdown\n"); qemu_system_reset_request(); - ret = 1; break; case KVM_EXIT_UNKNOWN: fprintf(stderr, "KVM: unknown exit, hardware reason %" PRIx64 "\n",