From patchwork Tue Dec 15 12:33:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 67608 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBFCXWs8020736 for ; Tue, 15 Dec 2009 12:33:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760155AbZLOMda (ORCPT ); Tue, 15 Dec 2009 07:33:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760149AbZLOMd3 (ORCPT ); Tue, 15 Dec 2009 07:33:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37102 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760146AbZLOMd3 (ORCPT ); Tue, 15 Dec 2009 07:33:29 -0500 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 nBFCXSVY018471 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Dec 2009 07:33:29 -0500 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBFCXRA4023135; Tue, 15 Dec 2009 07:33:28 -0500 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id 8B8BC18D46A; Tue, 15 Dec 2009 14:33:27 +0200 (IST) Date: Tue, 15 Dec 2009 14:33:27 +0200 From: Gleb Natapov To: Marcelo Tosatti Cc: Avi Kivity , Glauber de Oliveira Costa , kvm Subject: Re: [PATCH] qemu-kvm initialize vcpu state after machine initialization Message-ID: <20091215123327.GD8031@redhat.com> References: <20091209174654.GA28056@amt.cnet> <4B20C058.5080307@redhat.com> <4B20C32B.7070005@redhat.com> <20091214203637.GA7120@amt.cnet> <20091215112037.GC8031@redhat.com> <20091215122415.GA9715@amt.cnet> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091215122415.GA9715@amt.cnet> 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 44e8b75..fa6db8e 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1920,12 +1920,12 @@ static void *ap_main_loop(void *_env) pthread_mutex_lock(&qemu_mutex); cpu_single_env = env; + current_env->created = 1; kvm_arch_init_vcpu(env); kvm_arch_load_regs(env); /* signal VCPU creation */ - current_env->created = 1; pthread_cond_signal(&qemu_vcpu_cond); /* and wait for machine initialization */