All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Alistair Francis <alistair.francis@xilinx.com>
Subject: Re: [Qemu-devel] [PATCH v5 5/6] xlnx-zynqmp: Connect the SPI devices
Date: Sat, 19 Dec 2015 13:59:15 -0800	[thread overview]
Message-ID: <CAPokK=ro3qT8vmuDOXPJNRY8vyJPdUozVAaT+1atkm4FPYM9_Q@mail.gmail.com> (raw)
In-Reply-To: <567448AC.7060404@redhat.com>

On Fri, Dec 18, 2015 at 9:55 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 18/12/2015 18:17, Alistair Francis wrote:
>> Does anyone have any ideas on how we can do this?
>>
>> AFAIK there is no way to currently do this, so we need to add
>> something. What is the preferred way to expose the buses?
>
> For now, what you're doing is okay for me, just moving the funky code in
> zynq-specific files.
>

OK I think I have a real fix on this that doesn't require any funk.
Backing up, qdev currently doubly connects buses and devices and
devices to devs. The two connections are:

1: The child bus list
2: As QOM children

Ultimately what we need here is an aliasing mechanism. I don't thing
detaching and re-attaching works in the local sense, as it is
realistic for a container device to make a few local connections to a
bus (by ref to the controller bus) while also pinning it out on the
container level. The bus should remain accessible on the two different
entities.

So QOM aliases make the most sense to me. The real problem is that
qdev_get_child_bus only uses the child bus list and cannot resolve a
QOM path. My solution is to add preferred attempt to use a QOM path to
implement qdev_get_child_bus and fallback to the current
child-bus-list behaviour on failure.

I'll send a v5 within the next few hours after cleanup.

Regards,
Peter

> Thanks,
>
> Paolo
>
>> Thanks,
>>
>> Alistair

  reply	other threads:[~2015-12-19 21:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 21:44 [Qemu-devel] [PATCH v5 0/6] Connect the SPI devices to ZynqMP Alistair Francis
2015-12-16 21:45 ` [Qemu-devel] [PATCH v5 1/6] m25p80.c: Add sst25wf080 SPI flash device Alistair Francis
2015-12-16 21:45 ` [Qemu-devel] [PATCH v5 2/6] ssi: Move ssi.h into a separate directory Alistair Francis
2015-12-16 21:45 ` [Qemu-devel] [PATCH v5 3/6] xilinx_spips: Separate the state struct into a header Alistair Francis
2015-12-19 22:06   ` Peter Crosthwaite
2015-12-16 21:45 ` [Qemu-devel] [PATCH v5 4/6] qdev: Add a function to rename busses Alistair Francis
2015-12-16 22:36   ` Peter Crosthwaite
2015-12-17  0:55     ` Alistair Francis
2015-12-16 21:45 ` [Qemu-devel] [PATCH v5 5/6] xlnx-zynqmp: Connect the SPI devices Alistair Francis
2015-12-16 23:24   ` Paolo Bonzini
2015-12-17  0:45     ` Alistair Francis
2015-12-17  8:26     ` Peter Maydell
2015-12-17 10:28       ` Paolo Bonzini
2015-12-17 11:11         ` Peter Maydell
2015-12-17 11:12           ` Paolo Bonzini
2015-12-18 17:17             ` Alistair Francis
2015-12-18 17:55               ` Paolo Bonzini
2015-12-19 21:59                 ` Peter Crosthwaite [this message]
2015-12-16 21:45 ` [Qemu-devel] [PATCH v5 6/6] xlnx-ep108: Connect the SPI Flash Alistair Francis
2015-12-19 22:09   ` Peter Crosthwaite

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='CAPokK=ro3qT8vmuDOXPJNRY8vyJPdUozVAaT+1atkm4FPYM9_Q@mail.gmail.com' \
    --to=crosthwaitepeter@gmail.com \
    --cc=alistair.francis@xilinx.com \
    --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 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.