Received: from eggs.gnu.org ([208.118.235.92]:37097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzshY-0003Jr-AT for qemu-devel@nongnu.org; Fri, 10 Aug 2012 13:08:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzshW-0005k7-Iy for qemu-devel@nongnu.org; Fri, 10 Aug 2012 13:08:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzshW-0005jk-B7 for qemu-devel@nongnu.org; Fri, 10 Aug 2012 13:08:42 -0400 Date: Fri, 10 Aug 2012 14:09:48 -0300 From: Eduardo Habkost Message-ID: <20120810170948.GK4425@otherpad.lan.raisama.net> References: <1344618044-18704-1-git-send-email-aliguori@us.ibm.com> <1344618044-18704-3-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1344618044-18704-3-git-send-email-aliguori@us.ibm.com> Subject: Re: [Qemu-devel] [PATCH 2/2] cpu: for cpu-user and cpu-softmmu and make cpu-softmmu a child of DeviceState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Igor Mammedov , qemu-devel@nongnu.org On Fri, Aug 10, 2012 at 12:00:44PM -0500, Anthony Liguori wrote: > The line between linux-user and softmmu is not very well defined right now. > linux-user really don't want to include devices and making CpuState a child of > DeviceState would require pulling lots of stuff into linux-user. > > To solve this, we simply fork cpu-user and cpu-softmmu letting them evolve > independently. > > We also need to push a qdev_init_nofail() into all callers of cpu_init(). This > is needed eventually anyway so might as well do this now. > > Signed-off-by: Anthony Liguori > --- [...] > --- /dev/null > +++ b/qom/cpu-user.c [...] > +static TypeInfo cpu_type_info = { > + .name = TYPE_CPU, > +#ifdef CONFIG_USER_ONLY > + .parent = TYPE_OBJECT, > +#else > + .parent = TYPE_DEVICE, > +#endif Is this #ifdef supposed to be here? > + .instance_size = sizeof(CPUState), > + .abstract = true, > + .class_size = sizeof(CPUClass), > + .class_init = cpu_class_init, > +}; > + > +static void cpu_register_types(void) > +{ > + type_register_static(&cpu_type_info); > +} > + > +type_init(cpu_register_types) > -- > 1.7.5.4 > -- Eduardo