Eduardo Habkost <ehabk...@redhat.com> 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 <aligu...@us.ibm.com> >> --- > [...] >> --- /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