From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Andreas Färber" <afaerber@suse.de>,
"Developers qemu-devel" <qemu-devel@nongnu.org>,
"KVM devel mailing list" <kvm@vger.kernel.org>,
quintela@redhat.com
Subject: Re: [Qemu-devel] KVM call agenda for Tuesday 7
Date: Tue, 07 Feb 2012 16:21:35 +0100 [thread overview]
Message-ID: <4F31417F.2000102@redhat.com> (raw)
In-Reply-To: <4F313BA8.9070601@codemonkey.ws>
On 02/07/2012 03:56 PM, Anthony Liguori wrote:
>> Another related question is, should the 4th QOM series present a full
>> composition tree based on the legacy qdev bus concept?
>
> Composition, no. The legacy qbus concept doesn't model composition
> because it puts children created by composition (like the Cirrus VGA
> adapter) in the same context as a device created by a user (like an
> e1000 network card).
>
>> Currently it doesn't, but
>> if not, why not? That would help _a lot_ with removing PROP_PTR.
>
> One thing that we could do, is modify qdev_create() like:
>
> DeviceState *qdev_create_with_name(BusState *bus, const char *typename,
> const char *name)
> {
> // ...
> object_property_add_child(legacy_machine_root(), name, OBJECT(dev), &err);
> // assert if err due to conflicting property names
> }
>
> DeviceState *qdev_create(BusState *bus, const char *typename)
> {
> return qdev_create_with_name(bus, typename, typename);
> }
>
> Most devices only have a single instance. In the cases where there are
> multiple instances, we'll have to fix it up manually but that really
> shouldn't be all that hard.
I'm wary of all plans that require to go through all the code once.
What about simply /devices/default/child[...] or something like that?
BTW, I would like to change /i440fx to /devices/i440fx, so that we will
have clean namespaces:
/block
...
/chardev
...
/clocks
...
/devices
/peripheral
... # named devices created with -device
/peripheral-anon
/child[...] # unnamed devices created with -device
/default
/child[...] # created with qdev_create
Paolo
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: quintela@redhat.com, "Andreas Färber" <afaerber@suse.de>,
"KVM devel mailing list" <kvm@vger.kernel.org>,
"Developers qemu-devel" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] KVM call agenda for Tuesday 7
Date: Tue, 07 Feb 2012 16:21:35 +0100 [thread overview]
Message-ID: <4F31417F.2000102@redhat.com> (raw)
In-Reply-To: <4F313BA8.9070601@codemonkey.ws>
On 02/07/2012 03:56 PM, Anthony Liguori wrote:
>> Another related question is, should the 4th QOM series present a full
>> composition tree based on the legacy qdev bus concept?
>
> Composition, no. The legacy qbus concept doesn't model composition
> because it puts children created by composition (like the Cirrus VGA
> adapter) in the same context as a device created by a user (like an
> e1000 network card).
>
>> Currently it doesn't, but
>> if not, why not? That would help _a lot_ with removing PROP_PTR.
>
> One thing that we could do, is modify qdev_create() like:
>
> DeviceState *qdev_create_with_name(BusState *bus, const char *typename,
> const char *name)
> {
> // ...
> object_property_add_child(legacy_machine_root(), name, OBJECT(dev), &err);
> // assert if err due to conflicting property names
> }
>
> DeviceState *qdev_create(BusState *bus, const char *typename)
> {
> return qdev_create_with_name(bus, typename, typename);
> }
>
> Most devices only have a single instance. In the cases where there are
> multiple instances, we'll have to fix it up manually but that really
> shouldn't be all that hard.
I'm wary of all plans that require to go through all the code once.
What about simply /devices/default/child[...] or something like that?
BTW, I would like to change /i440fx to /devices/i440fx, so that we will
have clean namespaces:
/block
...
/chardev
...
/clocks
...
/devices
/peripheral
... # named devices created with -device
/peripheral-anon
/child[...] # unnamed devices created with -device
/default
/child[...] # created with qdev_create
Paolo
next prev parent reply other threads:[~2012-02-07 15:21 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 19:25 KVM call agenda for Tuesday 7 Juan Quintela
2012-02-06 19:25 ` [Qemu-devel] " Juan Quintela
2012-02-07 13:45 ` Andreas Färber
2012-02-07 13:45 ` Andreas Färber
2012-02-07 13:52 ` Paolo Bonzini
2012-02-07 13:52 ` Paolo Bonzini
2012-02-07 14:56 ` Anthony Liguori
2012-02-07 14:56 ` Anthony Liguori
2012-02-07 15:21 ` Paolo Bonzini [this message]
2012-02-07 15:21 ` Paolo Bonzini
2012-02-07 16:24 ` Anthony Liguori
2012-02-07 16:24 ` Anthony Liguori
2012-02-07 16:27 ` Paolo Bonzini
2012-02-07 16:27 ` Paolo Bonzini
2012-02-07 16:33 ` Anthony Liguori
2012-02-07 16:33 ` Anthony Liguori
2012-02-07 16:40 ` Peter Maydell
2012-02-07 16:40 ` Peter Maydell
2012-02-07 17:04 ` Paolo Bonzini
2012-02-07 17:04 ` Paolo Bonzini
2012-02-07 16:41 ` Andreas Färber
2012-02-07 16:41 ` Andreas Färber
2012-02-07 16:53 ` Anthony Liguori
2012-02-07 16:53 ` Anthony Liguori
2012-02-07 18:01 ` Anthony Liguori
2012-02-07 18:01 ` Anthony Liguori
2012-02-07 18:17 ` Andreas Färber
2012-02-07 18:17 ` Andreas Färber
2012-02-07 19:06 ` Anthony Liguori
2012-02-07 14:23 ` Juan Quintela
2012-02-07 14:23 ` [Qemu-devel] " Juan Quintela
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=4F31417F.2000102@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.