From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNwa1-00047H-WF for qemu-devel@nongnu.org; Fri, 15 Jul 2016 02:26:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNwa1-0000X6-0x for qemu-devel@nongnu.org; Fri, 15 Jul 2016 02:26:33 -0400 Date: Fri, 15 Jul 2016 08:26:20 +0200 From: Andrew Jones Message-ID: <20160715062620.6du2q6japlty7aye@hawk.localdomain> References: <1465580427-13596-1-git-send-email-drjones@redhat.com> <1465580427-13596-5-git-send-email-drjones@redhat.com> <20160614013037.GG4882@voom.fritz.box> <20160614055856.6ixqhiuezthebact@hawk.localdomain> <20160714201047.GD31865@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160714201047.GD31865@thinpad.lan.raisama.net> Subject: Re: [Qemu-devel] [PATCH RFC 04/16] hw/core/machine: Introduce pre_init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, agraf@suse.de, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, pbonzini@redhat.com, imammedo@redhat.com, dgibson@redhat.com, David Gibson On Thu, Jul 14, 2016 at 05:10:47PM -0300, Eduardo Habkost wrote: > On Tue, Jun 14, 2016 at 07:58:56AM +0200, Andrew Jones wrote: > > On Tue, Jun 14, 2016 at 11:30:37AM +1000, David Gibson wrote: > > > On Fri, Jun 10, 2016 at 07:40:15PM +0200, Andrew Jones wrote: > > > > From: Igor Mammedov > > > > > > > > Signed-off-by: Igor Mammedov > > > > Signed-off-by: Andrew Jones > > > > > > I think this needs some kind of rationale. > > > > > > Since with this patch it is called immediately before ->init, I'm not > > > really seeing the point of this. > > > > Many machines already override ->init, so if we want to move code > > from vl.c into machine methods, but be sure that they run it now, > > then we have to invent a pre-init. I (or Igor) can add something > > like that to the commit message for the next round. > > If we just want to move vl.c code into machine, why not just > create a simple machine_pre_init() function? > > We can add a virtual method that can be reimplemented by > subclasses later, only when we really see the need for a subclass > to override some behavior. That's fine for this series. Of course one of the main motivators of this series is to be able to override the old parsing though, so I already see the need. I'll need to either add this method now, or later, when I add cpu topo support to the ARM mach-virt machine type. Thanks, drew > > -- > Eduardo >