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

Re: [XEN PATCH v2 1/5] xen: introduce xen,enhanced dom0less property


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 13 Jan 2022 08:29:28 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=UbyiUFt3Q7OaC4Btyf0dw7vN1y0TUmlvYD4uWuYYkEs=; b=m7fcsritW96jyZRFFsTqcJPYI3XW/UARJUeoZ2AXjx2/XXohu4gCBQKsoasyiEzkL/d5M7548o4PTley7OFVq46SlTn290eFEyN16qFD0SYuVWh9qPX+OWVK0bzDtIB/9d4bCwS3gkaHNJxY+m8Ay9fdXeqz7z3rjv8iqWVUmQH9b/7FumH3DdCxJ60Gorjwuo8hhZx93ij+sO1jCADpXcgKHG7BY/j9ZPY6DL0ZLJDVR/8Yj+muwxqZIhjknXBaSJs7mjWwU4UdL4/GChkA1Km4uok33S58Fu59w7azPTW5PxRCmnTPBDVHCrdi/E5Na/VWl7igHDqfIau5JZbMzA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dIwOvPVrd/fBT1mpTMWKsC03l7sd6egkyz6BzTug6zidRKjkUsAoD5vbzUqRyPUQ1Ycr8swpQFrl46uub/s3X41q2/tsnfFhDnRnayka7gjh3Fz/d6cRUb2I36LQ+iI7PLBW3LG5zjniBHq4vaCiVs+ToBNMf2VnYSiY6pQBxF1m9Ru9TcrVi9W+wgpMc6Ket2/iVpmKsRrwGOVsGkX7p8537QCmcgy1VduA3pVZXM9nLB7HSW3o3Q/vp28KWqWEjteNLrG/JKmM+4U8iWN1kDRpB/tAorlljKbyyvuzhd7FLPC0Icu8yOJxF+/enuJzWjR64rVFzTcllzOvFxVdwQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
  • Delivery-date: Thu, 13 Jan 2022 08:30:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYCBjDVbDadtJPZUCNvtY/uFI3UqxgnyoA
  • Thread-topic: [XEN PATCH v2 1/5] xen: introduce xen,enhanced dom0less property

Hi Stefano,

> On 13 Jan 2022, at 00:58, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> 
> Introduce a new "xen,enhanced" dom0less property to enable/disable PV
> driver interfaces for dom0less guests. Currently only "enabled" and
> "disabled" are supported property values (and empty). Leave the option
> open to implement further possible values in the future (e.g.
> "xenstore" to enable only xenstore.)

You should also say here that you set this option to true in the code for dom0
and that the option is only for DomUs.

> 
> This patch only parses the property. Next patches will make use of it.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> CC: Julien Grall <julien@xxxxxxx>
> CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
> CC: Bertrand Marquis <bertrand.marquis@xxxxxxx>

With the previous added in commit message:
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> Changes in v2:
> - rename kinfo.enhanced to kinfo.dom0less_enhanced
> - set kinfo.dom0less_enhanced to true for dom0
> - handle -ENODATA in addition to -EILSEQ
> ---
> docs/misc/arm/device-tree/booting.txt | 18 ++++++++++++++++++
> xen/arch/arm/domain_build.c           |  8 ++++++++
> xen/arch/arm/include/asm/kernel.h     |  3 +++
> 3 files changed, 29 insertions(+)
> 
> diff --git a/docs/misc/arm/device-tree/booting.txt 
> b/docs/misc/arm/device-tree/booting.txt
> index 71895663a4..38c29fb3d8 100644
> --- a/docs/misc/arm/device-tree/booting.txt
> +++ b/docs/misc/arm/device-tree/booting.txt
> @@ -169,6 +169,24 @@ with the following properties:
>     Please note that the SPI used for the virtual pl011 could clash with the
>     physical SPI of a physical device assigned to the guest.
> 
> +- xen,enhanced
> +
> +    A string property. Possible property values are:
> +
> +    - "enabled" (or missing property value)
> +    Xen PV interfaces, including grant-table and xenstore, will be
> +    enabled for the VM.
> +
> +    - "disabled"
> +    Xen PV interfaces are disabled.
> +
> +    If the xen,enhanced property is present with no value, it defaults
> +    to "enabled". If the xen,enhanced property is not present, PV
> +    interfaces are disabled.
> +
> +    In the future other possible property values might be added to
> +    enable only selected interfaces.
> +
> - nr_spis
> 
>     Optional. A 32-bit integer specifying the number of SPIs (Shared
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 6931c022a2..9144d6c0b6 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -2963,6 +2963,7 @@ static int __init construct_domU(struct domain *d,
>                                  const struct dt_device_node *node)
> {
>     struct kernel_info kinfo = {};
> +    const char *dom0less_enhanced;
>     int rc;
>     u64 mem;
> 
> @@ -2978,6 +2979,12 @@ static int __init construct_domU(struct domain *d,
> 
>     kinfo.vpl011 = dt_property_read_bool(node, "vpl011");
> 
> +    rc = dt_property_read_string(node, "xen,enhanced", &dom0less_enhanced);
> +    if ( rc == -EILSEQ ||
> +         rc == -ENODATA ||
> +         (rc == 0 && !strcmp(dom0less_enhanced, "enabled")) )
> +        kinfo.dom0less_enhanced = true;
> +
>     if ( vcpu_create(d, 0) == NULL )
>         return -ENOMEM;
> 
> @@ -3095,6 +3102,7 @@ static int __init construct_dom0(struct domain *d)
> 
>     kinfo.unassigned_mem = dom0_mem;
>     kinfo.d = d;
> +    kinfo.dom0less_enhanced = true;
> 
>     rc = kernel_probe(&kinfo, NULL);
>     if ( rc < 0 )
> diff --git a/xen/arch/arm/include/asm/kernel.h 
> b/xen/arch/arm/include/asm/kernel.h
> index 874aa108a7..c4dc039b54 100644
> --- a/xen/arch/arm/include/asm/kernel.h
> +++ b/xen/arch/arm/include/asm/kernel.h
> @@ -36,6 +36,9 @@ struct kernel_info {
>     /* Enable pl011 emulation */
>     bool vpl011;
> 
> +    /* Enable PV drivers */
> +    bool dom0less_enhanced;
> +
>     /* GIC phandle */
>     uint32_t phandle_gic;
> 
> -- 
> 2.25.1
> 




 


Rackspace

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