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

Re: [RFC PATCH v4 8/8] docs: armproposa: l to add separate SCMI node for Xen agent


  • To: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>
  • Date: Mon, 30 Jun 2025 11:57:10 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iiXCFbfbSkJXhwT6a/rOMtUdu6laUsAoPsL1b+sE1tE=; b=bMtn9/IZqiODbmCD3vbDrG6oQH2gcQMB6o6s3baPuHVpflvqQANPtZFljow8/F8IGh7ar3dEeD65pKvCQRDmCrxb40apOnu03MUISsXPq0sGPrVGF86jVRvJ+hituJ0bb3AhBa7UCl/T0RiPoQQ4udpLexwulOHCecky9sU7Q94k1SY9FQQvFbuBpMIqYuL30mDokccIxRvkys5wNnH3REMVykwqrLCR60A4oSQ+QmCtggEyv97eBOoaYSMtudVTo9a7Vzz74zGGZhfhGolPZ8rF3nrghp0azJxn54oGylfwXPSPTNDnUSqcXQpnA57AfFdPQzdz9y8iWbwwpxoYuw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mAEHM5P8U4Q+5v8h7eHNJl1xyo3/06ftH0oynuD2fQfew17REJ3f5Dpv3OfPm+tcK8RO99NuF9WkED2b6W95BMgDyN/aSfE133irnHfpYFZYfi9+WTSyJ+CK2SPUVsp+pQ98eP6sTT4rqKieoNIMkoDm7rWjxw2f3j27famQGoghGRn47FnE2xw6oozaxxiIRVAzI7qNwWm/okBO+v+VEd6t9i3LgB/LHHjNVeHmjrjOLcCQso0zKhgoUCvyO/FYjYt6jUI7MEsxKs8CRpsS4T9ciI3C2LOef76HEqK3xhMmIDZPZ33U3WjHNOn/4j4/e2K5nrhZOhnQhvxv/X75HQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Delivery-date: Mon, 30 Jun 2025 11:57:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHb4TVhOpwmaSC7dkC7oLLOKyrberQPvwGAgACpCACAA+mNgIAADJ6AgAX31oCAADB+gIABI0OA
  • Thread-topic: [RFC PATCH v4 8/8] docs: armproposa: l to add separate SCMI node for Xen agent


On 29/06/2025 21:34, Julien Grall wrote:
> Hi Oleksii,
>
> On 29/06/2025 16:41, Oleksii Moisieiev wrote:
> > --->
>> In the Virtualized system:
>
> Thanks for the long explanation. In this section, you mention Xen all 
> over the place. But as you previously agreed the multi-agent SCMI is 
> not Xen specific. To put it differently, aside the fact...
>
>>
> > - The Xen is real OSPM which manages other Virtual OSPM and it 
> needs> dedicated SCMI management channel through which
>>    it can perform HW resources assignment for Virtual OSPM by
>> communicating with EL2 SCMI FW
>>    during Virtual OSPM creation or release HW resources during Virtual
>> OSPM destruction.
>>    In the future it also possible to enable such PM feature as SCMI 
>> based
>> CpuFreq in Xen.
>>
>>    The SCMI DT binding for Xen SCMI Agent expected to be exactly the 
>> same
>> as for any OSPM (like Linux) as from
>>    SCMI FW point of few it is just OS running on Application Core (which
>> substitutes regular OS - Linux, RTOS).
>>    So no new SCMI specific bindings (including compatibilities)
>> introduced neither in this series nor in this proposal.
>>
>>    In other words, Xen needs two DT to boot, kinda:
>>    - Xen DT (with bootinfo, Application Core info, uart)
>>    - Host Platform DT (source information to create domains)
>>     and if there would be two separate DTs - each will have own standard
>> (bindings) DT SCMI node.
>> According to the current design Xen accepts DT which is Host Platform DT
>> with added Xen configuration so Xen SCMI info is added in Xen
>> configuration node under /chosen, and no Domains is expected to see it
>> ever. After Xen initialization DT nodes from Xen DT are copied to the
>> Dom0 device tree. Our proposal is to keep SCMI configuration from
>> Platform Host DT the  same so it will be copied to the Dom0 device tree.
>>
>>
>> - the number of Virtual Machines or Virtual OSPMs (in terms of SCMI)
>> depends on hypervisor (Xen) configuration.
>>    And Virtual OSPM is defined as VM which has direct access to HW
>> (passthrough), so need access
>>    SCMI services to get fine-grained and safe access to required 
>> Platform
>> HW resources, and avoid interference.
>>
>>    Every Virtual OSPM is SCMI agent, which sees it's own SCMI transport,
>> and doesn't know about other agents.
>>    In the case of DT - the standard SCMI bindings are used.
>>
>> - So the Xen is the only entity in the platform which need to know about
>> other Agents.
>>     Therefore, this Xen specific configuration 
>> "xen,scmi-secondary-agents",
>>     for the case of the EL2 SCMI FW, is introduced and added under the
>> /chosen node (or xen-config).
>>     Unfortunately, there is no way to discover Agent's configurations
>> using SCMI protocol (base), like "func-id"
>>     and shmem parameter (only can get Number of Agents, and discover own
>> Agent id), so only option is to
>>     define this info in DT for Xen. However, Xen can use shared memory
>> regions and func_ids of the other Agents to   determine agent_id using
>> base protocol. That's why it was decided to make agent_id in
>> "xem,scmi-secondary-agents" optional.
>
>
> ... the name of this property contains "xen", I still don't understand 
> why the binding could not be used by other hypervisors. IOW, what if 
> above you s/xen/KVM/ (or any other hypervisor you come up with)? Are 
> they all going to create their own bindings? I would guess not given 
> the single agent is already generic (if I am not mistaken, both Linux 
> and Xen are using it)
>
KVM [1] is not applicable here as it starts under/inside Linux, so it 
doesn't have direct access to SCMI, the Linux does.
And Linux will see only one SCMI transport (Agent).
Seems, the only option possible is virtio-scmi (qemu) - the virtio-scmi 
potentially can simulate multi-channel,
but this is out if scope of this work.

QNX [0] relies on configuration files rather than the Device Tree.

[0] 
https://www.qnx.com/developers/docs/8.0/com.qnx.doc.hypervisor.user/topic/config/hyp.html
[1] 
https://trueconf.com/blog/knowledge-base/configure-kvm-hypervisor-ubuntu-server#KVM_configuration

> I will not insist on moving the binding outside of /chosen if the 
> other maintainers think this is the best. But I think this is 
> shortsighted to add "xen" in all the name or put it in a Xen specific 
> position.
>
> Ultimately what I want to avoid is we have to support multiple 
> bindings in Xen because someone else decided to create a new binding 
> as we didn't even attempt to make ours generic...
>

Not aware of any similar task done or in progress.
> Cheers,
>

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.