From patchwork Tue Oct 27 15:33:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 56120 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 n9RFYv8C019040 for ; Tue, 27 Oct 2009 15:34:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754996AbZJ0Peu (ORCPT ); Tue, 27 Oct 2009 11:34:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755205AbZJ0Peu (ORCPT ); Tue, 27 Oct 2009 11:34:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39794 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754346AbZJ0Pet (ORCPT ); Tue, 27 Oct 2009 11:34:49 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9RFYsWn027027 for ; Tue, 27 Oct 2009 11:34:54 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9RFYsId017437; Tue, 27 Oct 2009 11:34:54 -0400 Received: from amt.cnet (vpn-10-14.str.redhat.com [10.32.10.14]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n9RFYqdU011112; Tue, 27 Oct 2009 11:34:53 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 8A0EC682A77; Tue, 27 Oct 2009 13:33:47 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n9RFXkJS009775; Tue, 27 Oct 2009 13:33:46 -0200 Date: Tue, 27 Oct 2009 13:33:46 -0200 From: Marcelo Tosatti To: Gleb Natapov Cc: Avi Kivity , kvm Subject: [PATCH v2] fix qemu-kvm sigsegv at exit Message-ID: <20091027153346.GA9730@amt.cnet> References: <20091026184602.GB6016@amt.cnet> <20091026185849.GA5930@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091026185849.GA5930@redhat.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 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 4c13628..809fd65 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1867,8 +1867,8 @@ static int kvm_main_loop_cpu(CPUState *env) run_cpu = !env->halted; } if (run_cpu) { - kvm_main_loop_wait(env, 0); kvm_cpu_exec(env); + kvm_main_loop_wait(env, 0); } else { kvm_main_loop_wait(env, 1000); }