All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Michal Simek <monstr@monstr.eu>,
	Paul Brook <paul@codesourcery.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	John Williams <john.williams@petalogix.com>
Subject: Re: [Qemu-devel] [RFC] QOMification of AXI stream
Date: Sat, 09 Jun 2012 04:12:21 +0200	[thread overview]
Message-ID: <4FD2B105.2030202@suse.de> (raw)
In-Reply-To: <CAEgOgz5z=7Cfu0XddqgXaXdWoyr4mgSADYOh3HwStmWsVs6DtQ@mail.gmail.com>

Am 09.06.2012 03:53, schrieb Peter Crosthwaite:
> On Fri, Jun 8, 2012 at 7:45 PM, Andreas Färber <afaerber@suse.de> wrote:
>> Am 08.06.2012 06:23, schrieb Peter Crosthwaite:
>>> Each of the two core has three interfaces (+interrupt pins):
>>>
>>> 1: Sysbus attachment for device control
>>> 2: AXI stream TX link
>>> 3: AXI stream RX link
>> [...]
>>> struct XilinxDMAConnection {
>>>     void *dma;
>>>     void *client;
>>>
>>>     DMAPushFn to_dma;
>>>     DMAPushFn to_client;
>>> };
>>>
>>> So what im proposing is AXI stream is implemented as a unidirectional
>>> point to point bus. The xilinx ethernet system would consist of two of
>>> these buses one for tx, one for rx.
>> [...]
>>> A: Make AXI_STREAM_SLAVE an interface (not a sub-class of DEVICE). Its
>>> kind of annoying though if someone in the future whats the create a
>>> device thats only and axi stream slave, as they would have to
>>> explicitly inherit from DEVICE as well.
>>>
>>> or
>>>
>>> B: Have the slave attachment be a device within a device. Hard part is
>>> getting an accessor so machine models can retrieve the slave
>>> attachment and hook it up.
>>
>> If you dive into busses, note that Anthony has refactored QBus on
>> qom-next branch.
>>
> 
> How stable is this branch? It seems like I should use it as the
> development point. Is the merge immenent. If the merge is delayed, can
> I at least rely on the fundamental APIs define here (around links and
> stuff) no changing?

At this point we're pretty close to merging (hopefully next week) so I
would advise against basing new work on that branch. Just be prepared to
rebase onto the "qdev: Convert busses to QEMU Object Model" patch, i.e.
BusInfo gets replaced by TypeInfo and creation uses TYPE_FOO.

>> As Paul has already mentioned, the concept of tree-structured qdev
>> busses is deprecated by QOM in favor of link<> properties.
> 
> Ive had a brief look at the refactorings on qom-next, I notice that
> busses are now just children of the parent object TYPE_BUS.
> Essentially for point-to-point links this means that link itself has a
> QOM object. So for finer clarification, for new busses should or
> should I not have an object (whether it inheritTYPE_BUS or some other
> parent) for the link itself? Or should The master device interface
> directly with its slave? Im thinking the latter, no need for an object
> for a trivial point-to-point link.

No bus expert myself, deferring to Anthony and Paolo.

> Heres what i'm thinking now. each device will
> 
> Inherit from SYSBUS
> implement interface AXI_STREAM_SLAVE
> have a link property "axi_stream_connected_slave"
> 
> AXI_STREAM_SLAVE has a single function to push data down the link
> (what I believe you called DMAPushFn), but I will rename to
> axi_stream_push or the like as its not DMA specific.
> 
> Machine model then just sets axi_stream_connected_slave to each other.

Doesn't sound wrong so far under the premise of that simplistic
modelling approach. Not that I'm specifically advocating this approach.

>> That would of course limit the number of channels to one. Otherwise you
>> need a dedicated child<> object, of which a device can have multiple.
> 
> Im not too worried about that, but Peter and Paul have opened the
> discussion. Is the straight up interface on the sysbus device fine for
> what im trying to do - or should I have proxy objects for the sake of
> consistency?

I'm not aware of any use of interfaces in upstream nor of any proxy
object. In the end it'll be a compromise between fancy and quick... ;)

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-06-09  2:12 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
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 [this message]
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=4FD2B105.2030202@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=john.williams@petalogix.com \
    --cc=monstr@monstr.eu \
    --cc=paul@codesourcery.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@petalogix.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 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.