[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [ImageBuilder] uboot-script-gen: Add ability to configure static event channels
On 29.09.25 22:52, Stefano Stabellini wrote: Hello Stefano > On Mon, 29 Sep 2025, Oleksandr Tyshchenko wrote: >> Add DOMU_STATIC_EVTCHNS[number]="local_id local_port remote_id; ..." >> configuration file string option specifying the static event channel >> definitions for domain. >> >> The build script uses simple IDs to automatically and safely >> generate the required unique phandle numbers for the device tree. >> The user only needs to define simple numeric IDs and does not need >> to manage complex phandle values. >> >> For the following example: >> DOMU_STATIC_EVTCHNS[0]="1 10 2; 3 12 4" >> DOMU_STATIC_EVTCHNS[1]="2 11 1; 4 13 3" >> >> it generates: >> fdt mknod /chosen/domU0 evtchn@1 >> fdt set /chosen/domU0/evtchn@1 phandle <0xfffffffe> >> fdt set /chosen/domU0/evtchn@1 compatible "xen,evtchn-v1" >> fdt set /chosen/domU0/evtchn@1 xen,evtchn <10 0xfffffffd> >> fdt mknod /chosen/domU0 evtchn@3 >> fdt set /chosen/domU0/evtchn@3 phandle <0xfffffffc> >> fdt set /chosen/domU0/evtchn@3 compatible "xen,evtchn-v1" >> fdt set /chosen/domU0/evtchn@3 xen,evtchn <12 0xfffffffb> >> ... >> fdt mknod /chosen/domU1 evtchn@2 >> fdt set /chosen/domU1/evtchn@2 phandle <0xfffffffd> >> fdt set /chosen/domU1/evtchn@2 compatible "xen,evtchn-v1" >> fdt set /chosen/domU1/evtchn@2 xen,evtchn <11 0xfffffffe> >> fdt mknod /chosen/domU1 evtchn@4 >> fdt set /chosen/domU1/evtchn@4 phandle <0xfffffffb> >> fdt set /chosen/domU1/evtchn@4 compatible "xen,evtchn-v1" >> fdt set /chosen/domU1/evtchn@4 xen,evtchn <13 0xfffffffc> > > I'd like to make an alternative suggestion. The user specifies triplets: > DOMU_STATIC_EVTCHNS[0]="local-id remote-domid remote-id > > To generate the example above: > > DOMU_STATIC_EVTCHNS[0]="10 1 11; 12 1 13" > DOMU_STATIC_EVTCHNS[1]="11 0 10; 13 0 12" I guess by saying local-id and remote-id here you just meant local and remote event channels, right? If so, I would use local_port and remote_port. > > I think this is better because it doesn't require to invent (useless) > unique numbers as references. Instead, it focuses on the data that > actually matters to the user: the event channel IDs at both ends and > the domains involved. These are things the user must know anyway. > > The only catch with this suggesion is the definition of "remote-domid": > in reality the DOMU array index is not the domid in dom0less so we would > have to clarify. Maybe we could define it as remote-domain-index or > something like that. I see, yes remote-domain-index sounds clear. > > What do you think? I think, it is a great approach. I will try to implement what you suggested. > > > In ImageBuilder so far we have not used separators like ';' here but I > think it does improve readability so I would keep it. ok [snip]
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |