From: "Anthony PERARD" <anthony.perard@vates.tech>
To: "Oleksii Moisieiev" <Oleksii_Moisieiev@epam.com>
Cc: xen-devel@lists.xenproject.org,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Juergen Gross" <jgross@suse.com>,
"Julien Grall" <julien@xen.org>,
"Michal Orzel" <michal.orzel@amd.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Grygorii Strashko" <grygorii_strashko@epam.com>
Subject: Re: [PATCH v10 5/6] tools/xl/libxl: wire up SCMI SMC multi-agent configuration
Date: Wed, 25 Feb 2026 16:01:39 +0000 [thread overview]
Message-ID: <aZ8c2KGivXuLZGLn@l14> (raw)
In-Reply-To: <4ed96ed7bbb04c02b09eed63730702398b00b83f.1770982468.git.oleksii_moisieiev@epam.com>
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 <grygorii_strashko@epam.com>
> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
> ---
>
> 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
next prev parent reply other threads:[~2026-02-25 16:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-13 11:37 [PATCH v10 0/6] xen/arm: scmi: introduce SCI SCMI SMC multi-agent support Oleksii Moisieiev
2026-02-13 11:37 ` [PATCH v10 1/6] xen/domctl: chain SCI handling before IOMMU in assign_device domctl Oleksii Moisieiev
2026-02-13 12:51 ` Jan Beulich
2026-02-13 13:31 ` Oleksii Moisieiev
2026-02-13 11:37 ` [PATCH v10 2/6] xen: arm: smccc: add INVALID_PARAMETER error code Oleksii Moisieiev
2026-02-13 11:37 ` [PATCH v10 3/6] lib/arm: Add I/O memory copy helpers Oleksii Moisieiev
2026-02-13 11:37 ` [PATCH v10 4/6] xen/arm: scmi: introduce SCI SCMI SMC multi-agent driver Oleksii Moisieiev
2026-02-13 11:37 ` [PATCH v10 5/6] tools/xl/libxl: wire up SCMI SMC multi-agent configuration Oleksii Moisieiev
2026-02-25 16:01 ` Anthony PERARD [this message]
2026-02-13 11:37 ` [PATCH v10 6/6] docs: arm: add SCI SCMI SMC multi-agent driver docs Oleksii Moisieiev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aZ8c2KGivXuLZGLn@l14 \
--to=anthony.perard@vates.tech \
--cc=Oleksii_Moisieiev@epam.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=bertrand.marquis@arm.com \
--cc=grygorii_strashko@epam.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.