qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC 7/7] target-arm: Embed CPUARMState in QOM AR


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH RFC 7/7] target-arm: Embed CPUARMState in QOM ARMCPU
Date: Mon, 30 Jan 2012 17:01:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]