From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/2] don't start cpu main loop while there is still init work to do. Date: Mon, 04 May 2009 17:48:44 +0300 Message-ID: <49FF004C.5070309@redhat.com> References: <1241037101-24842-1-git-send-email-glommer@redhat.com> <1241037101-24842-2-git-send-email-glommer@redhat.com> <49FEA7C2.7050908@redhat.com> <20090504142627.GG12844@poweredge.glommer> <49FEFCB6.5070906@redhat.com> <20090504144411.GH12844@poweredge.glommer> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, ehabkost@redhat.com To: Glauber Costa Return-path: Received: from mx2.redhat.com ([66.187.237.31]:53085 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757650AbZEDOtW (ORCPT ); Mon, 4 May 2009 10:49:22 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n44EnM5S016628 for ; Mon, 4 May 2009 10:49:22 -0400 In-Reply-To: <20090504144411.GH12844@poweredge.glommer> Sender: kvm-owner@vger.kernel.org List-ID: Glauber Costa wrote: > On Mon, May 04, 2009 at 05:33:26PM +0300, Avi Kivity wrote: > >> Glauber Costa wrote: >> >>>> I'd like to avoid vcpu ioctls from more than one thread, in case we >>>> ever move to a syscall implementation. >>>> >>>> >>> Although I don't see exactly what's your point in here. >>> We're just adding a serialization points through pthreads function, not doing any ioctl from >>> the outside. >>> >>> >> Doesn't the lapic creation call KVM_CREATE_LAPIC? >> > Oh yeah, that. > > Maybe we could then move kvm_vcpu_init to the end of pc_new_cpu. > > This way we don't break the separability of pc and x86 concepts. We would then issue the lapic creation > ioctl right after the vcpu is created. > > How would you feel about it Like I said, I'd like to see the lapic creation come from the vcpu thread. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.