From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNmyH-000197-0O for qemu-devel@nongnu.org; Thu, 14 Jul 2016 16:10:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNmyF-00086s-Vc for qemu-devel@nongnu.org; Thu, 14 Jul 2016 16:10:56 -0400 Date: Thu, 14 Jul 2016 17:10:47 -0300 From: Eduardo Habkost Message-ID: <20160714201047.GD31865@thinpad.lan.raisama.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160614055856.6ixqhiuezthebact@hawk.localdomain> 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: Andrew Jones Cc: David Gibson , peter.maydell@linaro.org, agraf@suse.de, qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, imammedo@redhat.com, pbonzini@redhat.com, dgibson@redhat.com 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. -- Eduardo