From: Anthony Liguori <aliguori@us.ibm.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <87zk62eh4s.fsf@codemonkey.ws> (raw)
In-Reply-To: <20120810170948.GK4425@otherpad.lan.raisama.net>
Eduardo Habkost <ehabkost@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 <aliguori@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
next prev parent reply other threads:[~2012-08-10 18:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-10 17:00 [Qemu-devel] [PATCH 0/2] cpu: make a child of DeviceState Anthony Liguori
2012-08-10 17:00 ` [Qemu-devel] [PATCH 1/2] qdev: split up header so it can be used in cpu.h Anthony Liguori
2012-08-15 15:11 ` Andreas Färber
2012-08-10 17:00 ` [Qemu-devel] [PATCH 2/2] cpu: for cpu-user and cpu-softmmu and make cpu-softmmu a child of DeviceState Anthony Liguori
2012-08-10 17:09 ` Eduardo Habkost
2012-08-10 18:28 ` Anthony Liguori [this message]
2012-08-15 15:41 ` Andreas Färber
2012-08-15 16:29 ` Anthony Liguori
2012-08-15 15:50 ` [Qemu-devel] [PATCH 0/2] cpu: make " Andreas Färber
-- strict thread matches above, loose matches on Subject: below --
2012-06-22 19:36 [Qemu-devel] [PATCH 1/2] qdev: split up header so it can be used in cpu.h Anthony Liguori
2012-06-22 19:36 ` [Qemu-devel] [PATCH 2/2] cpu: for cpu-user and cpu-softmmu and make cpu-softmmu a child of DeviceState Anthony Liguori
2012-06-23 14:00 ` Andreas Färber
2012-06-24 7:07 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zk62eh4s.fsf@codemonkey.ws \
--to=aliguori@us.ibm.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).