From: Anthony Liguori <aliguori@us.ibm.com>
To: Paul Brook <paul@codesourcery.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Michal Simek" <monstr@monstr.eu>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
"Peter Crosthwaite" <peter.crosthwaite@petalogix.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Andreas Färber" <afaerber@suse.de>,
"John Williams" <john.williams@petalogix.com>
Subject: Re: [Qemu-devel] [RFC] QOMification of AXI stream
Date: Fri, 08 Jun 2012 21:39:24 +0800 [thread overview]
Message-ID: <4FD2008C.1020908@us.ibm.com> (raw)
In-Reply-To: <201206081413.26378.paul@codesourcery.com>
On 06/08/2012 09:13 PM, Paul Brook wrote:
>> On 8 June 2012 10:13, Paul Brook<paul@codesourcery.com> wrote:
>>> Of course we then hit the usual problem with QOM that we can only link to
>>> objects, and it's impossible to expose multiple interfaces of the same
>>> type.
>>
>> I'm pretty sure Anthony claimed this was entirely possible --
>> presumably that's how Pins are going to work.
>
> Really? Every time I've talked to him I've got the opposite impression. Part
> of the response has been that interrupt pins are the only case where this
> actually occurs, so It's not worth fixing properly.
I think it depends on your definition of "properly".
There's really only three concepts in QOM that matter for this discussion: 1)
objects 2) children and 3) links.
There is absolutely no difference between a Pin object and a SerialState object.
They both are first-class objects are far as QOM and concerned. Both can have
links to other objects.
The most common way for other objects to create objects is via children. A
device could have a bunch of Pin child objects with that being the sole
communication mechanism with the outside world.
A device could also have a 'PCISocket' child object (which inherits from
PCIDevice) in order to expose a PCI interface to the world.
For most bus-based devices, I think the above is poor design. But that's my
opinion from a modeling PoV, QOM doesn't have an opinion from an infrastructure PoV.
> I disagree with this
> assesment.
>
> Given we do need to expose multiple instances of the same interface, I see a
> few different options:
>
> - Create a proxy object for each reciever which multiplexes onto a different
> interface on the main object. For interrupt pins this basically means making
> the qemu_irq object part of the device tree, and have the actual device
> implement qemu_irq_handler (see hw/irq.h). The equivalent of qemu_irq (i.e.
> irq.c/h) needs to be created for every duplicated interface. It's worth
> noting that qemu_irq is about as simple as it gets, it's a single
> unidirectional call.
>
> - Make some form of handle an explicit part of the API. IMO this is a really
> bad idea, and a step backwards. In the qemu_irq case it means that the device
> raising the interrupt needs to know how the interrupt controller enumerates
> its input pins, and which one it's connected to. Instead of making
> connections via a nice clean links we have a link and some other device
> specific information. It's worse than the old callback+opaque pointer pair
> because user [machine description] has to provide that device specific
> additional value.
>
> - Link to properties, not objects. This probably ends up similar to the first
> option, except with a framework and consistent implementation across different
> interfaces.
Let me read and respond to the rest of the thread. I'm not sure a super
abstract discussion here is going to be helpful
Regards,
Anthony Liguori
>
> Paul
>
next prev parent reply other threads:[~2012-06-08 13:39 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 4:23 [Qemu-devel] [RFC] QOMification of AXI stream Peter Crosthwaite
2012-06-08 9:13 ` Paul Brook
2012-06-08 9:34 ` Peter Maydell
2012-06-08 13:13 ` Paul Brook
2012-06-08 13:39 ` Anthony Liguori [this message]
2012-06-08 13:59 ` Paul Brook
2012-06-08 14:17 ` Anthony Liguori
2012-06-08 13:41 ` Anthony Liguori
2012-06-08 13:53 ` Paul Brook
2012-06-08 13:55 ` Peter Maydell
2012-06-08 9:45 ` Andreas Färber
2012-06-09 1:53 ` Peter Crosthwaite
2012-06-09 2:12 ` Andreas Färber
2012-06-09 3:28 ` Peter Crosthwaite
2012-06-11 5:54 ` Paolo Bonzini
2012-06-11 13:05 ` Peter Maydell
2012-06-11 13:17 ` Anthony Liguori
2012-06-11 13:41 ` Paolo Bonzini
2012-06-08 14:15 ` Anthony Liguori
2012-06-09 1:24 ` Peter Crosthwaite
2012-06-11 13:15 ` Anthony Liguori
2012-06-11 13:39 ` Peter Maydell
2012-06-11 14:38 ` Edgar E. Iglesias
2012-06-11 14:53 ` Peter Maydell
2012-06-11 14:58 ` Edgar E. Iglesias
2012-06-11 15:03 ` Anthony Liguori
2012-06-11 15:34 ` Peter Maydell
2012-06-11 15:56 ` Edgar E. Iglesias
2012-06-12 0:33 ` Peter Crosthwaite
2012-06-12 7:58 ` Edgar E. Iglesias
2012-06-14 1:01 ` Peter Crosthwaite
2012-06-11 15:01 ` Anthony Liguori
2012-06-11 17:31 ` Avi Kivity
2012-06-11 18:35 ` Anthony Liguori
2012-06-11 22:00 ` [Qemu-devel] [RFC] QOMification of AXI streams Benjamin Herrenschmidt
2012-06-11 22:29 ` Anthony Liguori
2012-06-11 23:46 ` Benjamin Herrenschmidt
2012-06-12 1:33 ` Anthony Liguori
2012-06-12 2:06 ` Benjamin Herrenschmidt
2012-06-12 9:46 ` Avi Kivity
2012-06-13 0:37 ` Benjamin Herrenschmidt
2012-06-13 20:57 ` Anthony Liguori
2012-06-13 21:25 ` Benjamin Herrenschmidt
2012-06-14 0:00 ` Edgar E. Iglesias
2012-06-14 1:34 ` Benjamin Herrenschmidt
2012-06-14 2:03 ` Edgar E. Iglesias
2012-06-14 2:16 ` Benjamin Herrenschmidt
2012-06-14 2:31 ` Edgar E. Iglesias
2012-06-14 2:41 ` Benjamin Herrenschmidt
2012-06-14 3:17 ` Edgar E. Iglesias
2012-06-14 3:43 ` Benjamin Herrenschmidt
2012-06-14 5:16 ` Benjamin Herrenschmidt
2012-06-12 1:04 ` Andreas Färber
2012-06-12 2:42 ` Benjamin Herrenschmidt
2012-06-12 9:31 ` [Qemu-devel] [RFC] QOMification of AXI stream Avi Kivity
2012-06-12 9:42 ` Edgar E. Iglesias
2012-06-11 18:36 ` Anthony Liguori
2012-06-12 9:51 ` Avi Kivity
2012-06-12 12:58 ` Peter Maydell
2012-06-12 13:18 ` Avi Kivity
2012-06-12 13:32 ` Peter Maydell
2012-06-12 13:48 ` Avi Kivity
2012-06-12 13:55 ` Andreas Färber
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=4FD2008C.1020908@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=afaerber@suse.de \
--cc=edgar.iglesias@gmail.com \
--cc=john.williams@petalogix.com \
--cc=monstr@monstr.eu \
--cc=paul@codesourcery.com \
--cc=peter.crosthwaite@petalogix.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).