[SLOF] [Qemu-ppc] [PATCH v4] board-qemu: add private hcall to inform host on "phandle" update

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Sep 8 22:54:45 AEST 2017

On 08/09/17 13:30, Alexey Kardashevskiy wrote:

>> Thanks for the explanation. For comparison how does this work in real
>> hardware - presumably there must some existing mechanism for notifying
>> XICS that an extra PHB has been inserted?
> I am not aware of any hardware capable of hotplugging PHBs :)

Ha okay :)

>> If you're looking for a way to reference a node outside of OF then the
>> only way to consistently do this is via an OF path. What if when the DT
>> blob for PHB was created in QEMU you create a fake interrupt-parent-path
>> string property containing the OF path to the interrupt controller, and
>> move the generation of interrupt-map to SLOF?
>>> In SLOF you could then do something like below to get the phandle from
>> the OF path:
>> "interrupt-parent-path" get-package-property dev ihandle>phandle
>> and from there, substituting the phandle into interrupt-map is trivial.
>> Similarly for the guest, it should be easy to iterate over the kernel DT
>> to locate the interrupt controller device based upon OF path, and then
>> use the interrupt-map information to update its routing information for
>> the hotplugged PHB accordingly.
> There is no path in the interrups-map, it uses phandles, this is defined in
> the interrupt binding spec which the existing guests use, it is kinda late
> to change that. We can change how things work between QEMU and SLOF but
> once the guest kernel is up, there is no more SLOF and QEMU has to do all
> these tricks to the DT blobs itself.

My understanding from this thread though was that the FDT can't be
inserted directly into the kernel DT as-is because it still needs to
translate between qhandles and phandles. So there must already be a hook
somewhere on hotplug to allow the FDT blob to be altered before it is
handed over to the kernel, so the interrupt-map property can be fixed up
based upon interrupt-parent-path at the same time.



More information about the SLOF mailing list