qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 5/6] xlnx-zynqmp: Connect the SPI devices


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [PATCH v5 5/6] xlnx-zynqmp: Connect the SPI devices
Date: Sat, 19 Dec 2015 13:59:15 -0800

On Fri, Dec 18, 2015 at 9:55 AM, Paolo Bonzini <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]