qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] cpu: for cpu-user and cpu-softmmu and make


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 2/2] cpu: for cpu-user and cpu-softmmu and make cpu-softmmu a child of DeviceState
Date: Fri, 10 Aug 2012 13:28:19 -0500
User-agent: Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu)

Eduardo Habkost <address@hidden> 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 <address@hidden>
>> ---
> [...]
>> --- /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




reply via email to

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