From patchwork Thu Oct 22 20:57:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 55446 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9MKvlX2031379 for ; Thu, 22 Oct 2009 20:57:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756632AbZJVU5l (ORCPT ); Thu, 22 Oct 2009 16:57:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756624AbZJVU5l (ORCPT ); Thu, 22 Oct 2009 16:57:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54012 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756609AbZJVU5k (ORCPT ); Thu, 22 Oct 2009 16:57:40 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9MKviK1014664; Thu, 22 Oct 2009 16:57:44 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9MKvix5015075; Thu, 22 Oct 2009 16:57:44 -0400 Received: from amt.cnet (vpn-10-110.str.redhat.com [10.32.10.110]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n9MKvgbl018494; Thu, 22 Oct 2009 16:57:43 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id AF2DE5881AE; Thu, 22 Oct 2009 18:57:29 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n9MKvRgN023652; Thu, 22 Oct 2009 18:57:27 -0200 Date: Thu, 22 Oct 2009 18:57:27 -0200 From: Marcelo Tosatti To: "Michael S. Tsirkin" Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: Re: qemu-kvm: sigsegv at exit Message-ID: <20091022205727.GA23092@amt.cnet> References: <20091022120015.GA28836@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091022120015.GA28836@redhat.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/qemu-kvm.c b/qemu-kvm.c index 87ece3d..141c8b1 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1931,7 +1931,8 @@ static int kvm_main_loop_cpu(CPUState *env) } if (run_cpu) { kvm_main_loop_wait(env, 0); - kvm_cpu_exec(env); + if (!is_cpu_stopped(env)) + kvm_cpu_exec(env); } else { kvm_main_loop_wait(env, 1000); }