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

Re: [RFC v1 4/5] tools/arm: add "scmi_smc" option to xl.cfg


  • To: Oleksandr <olekstysh@xxxxxxxxx>
  • From: Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>
  • Date: Fri, 17 Dec 2021 11:00:33 +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=arcselector9901; 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=slWg4g/yF2h8UtMXIgfp5KuwYyf+5AYnIrB2mZ05rvU=; b=avXA2hm7MA6Nas+l8k8ElEVkup3KpBUmW17X9NVy7h5s5NyiY8/GBCABIkt2HZUWa3qZ1NJ8SQf3QXNXlu5eOjahY7adPcpJ3YUraRxp5YzgiXbKGyaoVN0m3kLT9D9Z5JhEME6JEg5W9EWvcmI2ORjoLR2w8CchkJkJaRdhbZbl4PCFza8TqSoDtXqxs/scml8rgJEXuaX7I96yiwiwtw2s+X0jSmsa5pGRZXuo5T/xyhbwMT7qBt6e7FubwqV4adSfln9NbiUpVwpVldCPdpPFQ8Qg7jbiydfcbF4MOWtmbN4cqzkUmHhYYfDJw2rZW8UL+MYFvd+CcblS24ValQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fHJijGYD/+Y7X1wiK6O9OVYf35xZTpMChdXXeqiXBpdZZdycKHKVgejIaMLhZXunvr9QrXByrYN8qU6J1KzifkfMvdL9wkpCa6yZqItEurt4FUovrwhyalrjGd9z4et0H9RKsiK4vtDu/wKbewDsvVCzuNgxceXVzhCr6uRPFZ4/IuXi1BmhCgNrlImpGDnsIjJIoUG5A44h+xgEKh2/dmK6lS4uxMZAcymC1lVhiAwKq0EQE2hzsChbZ5xy87aNm8aCSPmqWGt1ICDNEXvNrT5DeptTvispBU4r2TbYtPSAHkQEnXTZkDNyyeGj6DjgxlP8uCjkQrUw3xY+22hxnA==
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Fri, 17 Dec 2021 11:01:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHX8M3K+4k+NJRDpU6TSJ1TAn9Owqw0GheAgAJu7YA=
  • Thread-topic: [RFC v1 4/5] tools/arm: add "scmi_smc" option to xl.cfg

Hi Oleksandr,

On Wed, Dec 15, 2021 at 11:51:01PM +0200, Oleksandr wrote:
> 
> On 14.12.21 11:34, Oleksii Moisieiev wrote:
> 
> 
> Hi Oleksii
> 
> > This enumeration sets SCI type for the domain. Currently there is
> > two possible options: either 'none' or 'scmi_smc'.
> > 
> > 'none' is the default value and it disables SCI support at all.
> > 
> > 'scmi_smc' enables access to the Firmware from the domains using SCMI
> > protocol and SMC as transport.
> > 
> > Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@xxxxxxxx>
> > ---
> >   docs/man/xl.cfg.5.pod.in         | 22 ++++++++++++++++++++++
> >   tools/include/libxl.h            |  5 +++++
> >   tools/libs/light/libxl_types.idl |  6 ++++++
> >   tools/xl/xl_parse.c              |  9 +++++++++
> >   4 files changed, 42 insertions(+)
> > 
> > diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in
> > index b98d161398..92d0593875 100644
> > --- a/docs/man/xl.cfg.5.pod.in
> > +++ b/docs/man/xl.cfg.5.pod.in
> > @@ -1614,6 +1614,28 @@ This feature is a B<technology preview>.
> >   =back
> > +=item B<sci="STRING">
> > +
> > +B<Arm only> Set SCI type for the guest. SCI is System Control Protocol -
> > +allows domain to manage various functions that are provided by HW platform.
> > +
> > +=over 4
> > +
> > +=item B<none>
> > +
> > +Don't allow guest to use SCI if present on the platform. This is the 
> > default
> > +value.
> > +
> > +=item B<scmi_smc>
> > +
> > +Enables SCMI-SMC support for the guest. SCMI is System Control Management
> > +Inferface - allows domain to manage various functions that are provided by 
> > HW
> > +platform, such as clocks, resets and power-domains. Xen will mediate 
> > access to
> > +clocks, power-domains and resets between Domains and ATF. Disabled by 
> > default.
> > +SMC is used as transport.
> > +
> > +=back
> > +
> >   =back
> >   =head2 Paravirtualised (PV) Guest Specific Options
> > diff --git a/tools/include/libxl.h b/tools/include/libxl.h
> > index 2bbbd21f0b..30e5aee119 100644
> > --- a/tools/include/libxl.h
> > +++ b/tools/include/libxl.h
> > @@ -278,6 +278,11 @@
> >    */
> >   #define LIBXL_HAVE_BUILDINFO_ARCH_ARM_TEE 1
> > +/*
> > + * libxl_domain_build_info has the arch_arm.sci field.
> > + */
> > +#define LIBXL_HAVE_BUILDINFO_ARCH_ARM_SCI 1
> > +
> >   /*
> >    * LIBXL_HAVE_SOFT_RESET indicates that libxl supports performing
> >    * 'soft reset' for domains and there is 'soft_reset' shutdown reason
> > diff --git a/tools/libs/light/libxl_types.idl 
> > b/tools/libs/light/libxl_types.idl
> > index 2a42da2f7d..9067b509f4 100644
> > --- a/tools/libs/light/libxl_types.idl
> > +++ b/tools/libs/light/libxl_types.idl
> 
> I assume that at least goland bindings want updating.
> 

Thanks for the notice. I will fix that in v2.

> 
> > @@ -480,6 +480,11 @@ libxl_tee_type = Enumeration("tee_type", [
> >       (1, "optee")
> >       ], init_val = "LIBXL_TEE_TYPE_NONE")
> > +libxl_sci_type = Enumeration("sci_type", [
> > +    (0, "none"),
> > +    (1, "scmi_smc")
> > +    ], init_val = "LIBXL_SCI_TYPE_NONE")
> > +
> >   libxl_rdm_reserve = Struct("rdm_reserve", [
> >       ("strategy",    libxl_rdm_reserve_strategy),
> >       ("policy",      libxl_rdm_reserve_policy),
> > @@ -564,6 +569,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
> >       ("apic",             libxl_defbool),
> >       ("dm_restrict",      libxl_defbool),
> >       ("tee",              libxl_tee_type),
> > +    ("sci",              libxl_sci_type),
> >       ("u", KeyedUnion(None, libxl_domain_type, "type",
> >                   [("hvm", Struct(None, [("firmware",         string),
> >                                          ("bios",             
> > libxl_bios_type),
> > diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
> > index 117fcdcb2b..c37bf6298b 100644
> > --- a/tools/xl/xl_parse.c
> > +++ b/tools/xl/xl_parse.c
> > @@ -2747,6 +2747,15 @@ skip_usbdev:
> >           }
> >       }
> > +    if (!xlu_cfg_get_string (config, "sci", &buf, 1)) {
> > +        e = libxl_sci_type_from_string(buf, &b_info->sci);
> > +        if (e) {
> > +            fprintf(stderr,
> > +                    "Unknown sci \"%s\" specified\n", buf);
> > +            exit(-ERROR_FAIL);
> > +        }
> > +    }
> > +
> >       parse_vkb_list(config, d_config);
> >       xlu_cfg_get_defbool(config, "xend_suspend_evtchn_compat",
> 
> -- 
> Regards,
> 
> Oleksandr Tyshchenko
> 


 


Rackspace

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