Am 30.01.2012 03:22, schrieb Anthony Liguori: > On 01/29/2012 07:25 AM, Andreas Färber wrote: >> +static void arm_cpu_realize(Object *obj) >> +{ >> + ARMCPU *cpu = ARM_CPU(obj); >> + ARMCPUClass *cpu_class = ARM_CPU_GET_CLASS(obj); >> + >> + memset(&cpu->env, 0, sizeof(CPUARMState)); >> + cpu_exec_init(&cpu->env); >> + >> + cpu->env.cpu_model_str = object_get_typename(obj); >> + cpu->env.cp15.c0_cpuid = cpu_class->id; >> +} >> + >> static void cpu_register(const struct ARMCPUDef *def) >> { >> TypeInfo type = { >> .name = def->name, >> .parent = TYPE_ARM_CPU, >> .instance_size = sizeof(ARMCPU), >> + .instance_init = arm_cpu_realize, > > > The convention I'm using is: instance_init => type_name_initfn. > > DeviceState::init => type_name_realize,
Fixed, thanks. Andreas > > Eventually, realized will become a property and there will be a realize > and unrealize method. -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg