From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC][PATCH 0/21] QEMU Object Model
Date: Wed, 27 Jul 2011 11:19:32 -0500 [thread overview]
Message-ID: <4E303A94.8060208@codemonkey.ws> (raw)
In-Reply-To: <4E302FBF.4040500@redhat.com>
On 07/27/2011 10:33 AM, Paolo Bonzini wrote:
> On 07/27/2011 02:48 PM, Anthony Liguori wrote:
>>
>> So the idea here is that the PIC will multiplex a bunch of interrupts
>> into a single line?
>
> Yes, but the device needs to know the interrupt number so it can expose
> it through the enumerator interface. So the configuration cannot be simply
>
> pic->irq[n] = tty->irq;
>
> Logically, it's more similar to the ISA case, but I doubt the PIC
> distributes all interrupts to everyone in real hardware.
>
>> Is the enumerator something that has an interface to devices where
>> the devices hold this info? Or is the enumerator just a bank of
>> flash that's preprogrammed with fixed info?
>
> The former, at least in theory. Not sure if it also works that way in
> real hardware, but that's the model it exposes and the way the Android
> guys implemented it.
>
> The device model provides hotplug support, so it is definitely not just
> flash. Not sure again if this support is used in the hardware.
Sounds like I need to read a little about how this enumerator works. I
can't see how this would all operate without the enumerating being some
form of a bus.
>
>> At each phase, we also get significantly better modularity.
>
> Fine, but when do we decide it's good enough to merge it?
I think we should evaluate the complexity vs. value trade off with the
character device layer (when fully converted) and make the decision in a
vacuum.
If the complexity seems too high, I can try to also convert the block
layer and we can reevaluate. I believe that just with the character
device layer, it's a net win and I don't think it can be dramatically
simplified. The patches are actually not a lot of code. The only
complexity is conceptual and that's because it takes into account a lot
of different problems.
I can even pair things down a bit by removing support for Interfaces and
simplifying class initialization of need be for the first merge.
> And what if it
> turns out that it's not suitable for devices? We unified some things,
> but we also dug ourselves in NIH when we could have used GObject.
> (GObject definitely does not work for devices, but at least we don't
> need to write the infrastructure).
I tried to use GObject btw, I can share the results with you if you'd
like. Even with backends, I couldn't make properties work. GObject
uses GValues for properties which roughly models immutable values in a
variant. But I couldn't find a reasonable way to express Plugs and
Sockets in terms of GValues.
I expect that at some point in the future, GObject will grow GVariant
properties. But I still think GVariant isn't quite what it needs to be
since it still assumes immutable variants that can be copied.
I thought about just using GType but I thought using GType without using
GObject was probably not a great long term plan as I doubt anyone else
does this.
Regards,
Anthony Liguori
>
>> My only real concern is how to attack the device layer incrementally.
>> I don't think it's impossible but it requires careful thought.
>
> No idea here, honestly. :)
>
> Paolo
>
next prev parent reply other threads:[~2011-07-27 16:19 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-25 1:44 [Qemu-devel] [RFC][PATCH 0/21] QEMU Object Model Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 01/21] qom: add make infrastructure Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 02/21] qom: convert QAPI to use Qconfig build system Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 03/21] qom: Add core type system Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 04/21] qom: add Plug class Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 05/21] plug: add Plug property type Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 06/21] plug: add socket " Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 07/21] plug: add generated property types Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 08/21] qom: add plug_create QMP command Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 09/21] qom: add plug_list " Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 10/21] qom: add plug_get " Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 11/21] qom: add plug_set " Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 12/21] qom: add plug_list_props " Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 13/21] qom: add plug_destroy command Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 14/21] qom: add example qsh command Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 15/21] qom: add Device class Anthony Liguori
2011-07-27 15:10 ` Peter Maydell
2011-07-27 16:07 ` Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 16/21] qom-devices: add a Pin class Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 17/21] qom: add CharDriver class Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 18/21] qom-chrdrv: add memory character driver Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 19/21] qom-chrdrv: add Socket base class Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 20/21] qom-chrdrv: add TCPServer class Anthony Liguori
2011-07-25 1:44 ` [Qemu-devel] [PATCH 21/21] qom-chrdrv: add UnixServer Anthony Liguori
2011-07-25 11:21 ` [Qemu-devel] [RFC][PATCH 0/21] QEMU Object Model Kevin Wolf
2011-07-25 12:45 ` Anthony Liguori
2011-07-25 13:08 ` Kevin Wolf
2011-07-25 13:10 ` Anthony Liguori
2011-07-26 12:59 ` Paolo Bonzini
2011-07-26 14:02 ` Anthony Liguori
2011-07-26 14:35 ` Paolo Bonzini
2011-07-26 15:34 ` Anthony Liguori
2011-07-26 18:26 ` Paolo Bonzini
2011-07-26 19:23 ` Anthony Liguori
2011-07-27 8:55 ` Paolo Bonzini
2011-07-27 12:48 ` Anthony Liguori
2011-07-27 15:33 ` Paolo Bonzini
2011-07-27 16:19 ` Anthony Liguori [this message]
2011-07-27 16:28 ` Anthony Liguori
2011-07-27 18:51 ` Paolo Bonzini
2011-07-27 20:01 ` Anthony Liguori
2011-07-28 7:36 ` Paolo Bonzini
2011-07-28 12:46 ` Anthony Liguori
2011-07-28 13:50 ` Paolo Bonzini
2011-07-28 14:03 ` Anthony Liguori
2011-07-28 14:41 ` Paolo Bonzini
2011-07-28 15:04 ` Anthony Liguori
2011-07-28 15:47 ` Paolo Bonzini
2011-07-28 17:59 ` Anthony Liguori
2011-07-29 7:19 ` Paolo Bonzini
2011-07-27 21:33 ` Peter Maydell
2011-07-27 22:31 ` Anthony Liguori
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=4E303A94.8060208@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).