From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sztwi-0001Io-Gj for qemu-devel@nongnu.org; Fri, 10 Aug 2012 14:28:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sztwf-00013q-Sq for qemu-devel@nongnu.org; Fri, 10 Aug 2012 14:28:28 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:35505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sztwf-00013k-Ol for qemu-devel@nongnu.org; Fri, 10 Aug 2012 14:28:25 -0400 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Aug 2012 14:28:25 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 035706E8045 for ; Fri, 10 Aug 2012 14:28:24 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7AISNOc096704 for ; Fri, 10 Aug 2012 14:28:23 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7AISMqF025552 for ; Fri, 10 Aug 2012 15:28:23 -0300 From: Anthony Liguori In-Reply-To: <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> <20120810170948.GK4425@otherpad.lan.raisama.net> Date: Fri, 10 Aug 2012 13:28:19 -0500 Message-ID: <87zk62eh4s.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Eduardo Habkost Cc: Igor Mammedov , qemu-devel@nongnu.org Eduardo Habkost writes: > 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? Nope. Thanks. Regards, Anthony Liguori > >> + .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