[Top][All Lists]
[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: |
Eduardo Habkost |
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 14:09:48 -0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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?
> + .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