On Fri, Feb 13, 2026 at 11:37:05AM +0000, Oleksii Moisieiev wrote:
> Plumb the SCMI SMC multi-agent type through the toolstack:
>
> - Extend libxl_arm_sci_type enumeration with scmi_smc_multiagent (value 2)
> - Add agent_id field to libxl_arm_sci structure for per-domain agent
> assignment
> - Update libxl_arm.c to translate libxl config to
> XEN_DOMCTL_CONFIG_ARM_SCI_SCMI_SMC_MA
> and pass agent_id to the hypervisor via xen_domctl_createdomain
> - Add xl.cfg parsing for arm_sci="type=scmi_smc_multiagent,agent_id=N"
> - Document the new xl.cfg options in xl.cfg.5.pod.in
>
> This completes the userspace side of multi-agent SCMI, allowing xl create
> and dom0less configurations to assign unique agent_id values to domains.
>
> Signed-off-by: Grygorii Strashko <[email protected]>
> Signed-off-by: Oleksii Moisieiev <[email protected]>
> ---
>
> Changes in v10:
> - Split hypervisor and toolstack changes into separate commits
Thanks. That's easier to review.
> docs/man/xl.cfg.5.pod.in | 14 ++++++++++++++
> tools/libs/light/libxl_arm.c | 4 ++++
> tools/libs/light/libxl_types.idl | 4 +++-
> tools/xl/xl_parse.c | 12 ++++++++++++
> 4 files changed, 33 insertions(+), 1 deletion(-)
>
> diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in
> index 27c455210b..e7f8af6156 100644
> --- a/docs/man/xl.cfg.5.pod.in
> +++ b/docs/man/xl.cfg.5.pod.in
> @@ -3156,8 +3156,22 @@ single SCMI OSPM agent support.
> Should be used together with B<scmi-smc-passthrough> Xen command line
> option.
>
> +=item B<scmi_smc_multiagent>
> +
> +Enables ARM SCMI SMC multi-agent support for the guest by enabling SCMI over
> +SMC calls forwarding from domain to the EL3 firmware (like Trusted
> Firmware-A)
> +with a multi SCMI OSPM agent support. The SCMI B<agent_id> should be
> +specified for the guest.
> +
> =back
>
> +=item B<agent_id=NUMBER>
> +
> +Specifies a non-zero ARM SCI agent id for the guest. This option is mandatory
> +if the SCMI SMC support is enabled for the guest. The agent ids of domains
Those is need to say "SCMI SMC multi-agent support for the guest" ?
`agent_id` doesn't seems to be used if we only select "type=scmi_smc"
> +existing on a single host must be unique and in the range [0..254]. UINT8_MAX
> +(255) is treated as invalid.
What does "UINT8_MAX is treated as invalid" mean? Why is it mention? How
is it different that the number 3615? My guess is that we don't care in
this user documentation. All we need to say is that the value needs to
be between 0 and 254 included, which is already stated.
Also, it's written "non-zero agent id", but zero is in range of accepted
values ([0-254]). So is agent_id=0 a valid config, or not? Also, if this
config option isn't specified, we have a default to the value 0, is that
ok? (libxl doesn't check if `agent_id` is a valid value, only `xl`
doesn't that in this patch)
BTW, you could check that agent_id is valid value in
"libxl__arch_domain_build_info_setdefault()"
> +
> =back
>
> =back
> diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c
> index e4407d6e3f..be0e6263ae 100644
> --- a/tools/libs/light/libxl_arm.c
> +++ b/tools/libs/light/libxl_arm.c
> @@ -240,6 +240,10 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,
> case LIBXL_ARM_SCI_TYPE_SCMI_SMC:
> config->arch.arm_sci_type = XEN_DOMCTL_CONFIG_ARM_SCI_SCMI_SMC;
> break;
> + case LIBXL_ARM_SCI_TYPE_SCMI_SMC_MULTIAGENT:
> + config->arch.arm_sci_type = XEN_DOMCTL_CONFIG_ARM_SCI_SCMI_SMC_MA;
> + config->arch.arm_sci_agent_id =
> d_config->b_info.arch_arm.arm_sci.agent_id;
> + break;
> default:
> LOG(ERROR, "Unknown ARM_SCI type %d",
> d_config->b_info.arch_arm.arm_sci.type);
> diff --git a/tools/libs/light/libxl_types.idl
> b/tools/libs/light/libxl_types.idl
> index 4a958f69f4..9bfbf09145 100644
> --- a/tools/libs/light/libxl_types.idl
> +++ b/tools/libs/light/libxl_types.idl
> @@ -554,11 +554,13 @@ libxl_sve_type = Enumeration("sve_type", [
>
> libxl_arm_sci_type = Enumeration("arm_sci_type", [
> (0, "none"),
> - (1, "scmi_smc")
> + (1, "scmi_smc"),
> + (2, "scmi_smc_multiagent")
> ], init_val = "LIBXL_ARM_SCI_TYPE_NONE")
>
> libxl_arm_sci = Struct("arm_sci", [
> ("type", libxl_arm_sci_type),
> + ("agent_id", uint8)
Could you add a "#define LIBXL_HAVE_SCMI_SMC_MULTIAGENT" in
"tools/include/libxl.h"? With a quick description about the new type,
and new field. The are plenty of "LIBXL_HAVE_*" macro example in the
header.
> ])
>
> libxl_rdm_reserve = Struct("rdm_reserve", [
> diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
> index 1cc41f1bff..2f1b475022 100644
> --- a/tools/xl/xl_parse.c
> +++ b/tools/xl/xl_parse.c
> @@ -1306,6 +1306,18 @@ static int parse_arm_sci_config(XLU_Config *cfg,
> libxl_arm_sci *arm_sci,
> }
> }
>
> + if (MATCH_OPTION("agent_id", ptr, oparg)) {
> + unsigned long val = parse_ulong(oparg);
> +
> + if ( val >= UINT8_MAX ) {
> + fprintf(stderr, "An invalid ARM_SCI agent_id specified
> (%lu). Valid range [0..254]\n",
> + val);
> + ret = ERROR_INVAL;
> + goto out;
> + }
> + arm_sci->agent_id = val;
> + }
> +
> ptr = strtok(NULL, ",");
> }
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech