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

Re: [PATCH v10 07/12] xen/arm: add support for cache coloring configuration via device-tree


  • To: Carlo Nonato <carlo.nonato@xxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 28 Nov 2024 13:00:15 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=minervasys.tech smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=eB7Yb5HGZxjWzyl3RpwCdAeA90lJ2umlKPswSFSyfiQ=; b=NAF+ewOoALou3/hB+oT9NPlCnbiaMWxppwm8c6R/88Yo2s27rdAP45k0x35RVo+WoH13bJpCPE1EVAk1zJxjvhPn6/4xhzCnlf+DCyKNzFr0Kez9bZaZvcJoLzsTdNPWeUsYZcvpz4euohgWAnBOOLIebkZD65xYeDOQH8E1uteCuPbehVFHLNIIjvcEhMJlfJAN4vYHInpvkyKeElVcbB9gYfbQACXIhgjIbOHYJGtVPow1W3mmQ56LlWRzmk6OE0JacYH7QY0qbhs7QenCXZ7AodH7L9T8SZBLVPiZWf7zhU2Q4PbOn1hFUYfrGD3BOseHHf+mSbkhMn3N1GhYZw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PKKKsnNRY8gC7GHXsyEH0GLTTAkYIktu5jf04Bj0/agpzCATmMoQukg/tqcoAIJ7ChGU7P+dfs2f962EAYW5qviiC6N0+WoSv3b5Ya9hW/WijpGT56VtQHxcp8OmyHZfHMiQwQ3xqKZfbLoMaCxdNWZpjPW6ehhqTdcAsz+d+MWWtS2rdhOK5Edft/2tYLq//VeLP/Nl/Lo61XDeQh8w4WQIKQpFGB/p7S8nlEfldosQiLdxpl58mKo1za5RXD6qN4RNXZ6mnHKgeD8tQjL91FFRFUePWWoWe2PrhDveMk4/rT22IrOUXW+zVPIPmd06NGhxhW5GomrxK3tvkcuXog==
  • Cc: <andrea.bastoni@xxxxxxxxxxxxxxx>, <marco.solieri@xxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Thu, 28 Nov 2024 12:00:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 19/11/2024 15:13, Carlo Nonato wrote:
> 
> 
> Add the "llc-colors" Device Tree attribute to express DomUs and Dom0less
NIT: s/attribute/property/

> color configurations.
> 
> Based on original work from: Luca Miccio <lucmiccio@xxxxxxxxx>
> 
> Signed-off-by: Carlo Nonato <carlo.nonato@xxxxxxxxxxxxxxx>
> Signed-off-by: Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> # non-Arm
> ---
> v10:
> - no changes
> v9:
> - use best-effort allocation in domain_set_llc_colors_from_str()
> v8:
> - fixed memory leak on error path of domain_set_llc_colors_from_str()
> - realloc colors array after parsing from string to reduce memory usage
> v7:
> - removed alloc_colors() helper usage from domain_set_llc_colors_from_str()
> v6:
> - rewrote domain_set_llc_colors_from_str() to be more explicit
> v5:
> - static-mem check has been moved in a previous patch
> - added domain_set_llc_colors_from_str() to set colors after domain creation
> ---
>  docs/misc/arm/device-tree/booting.txt |  4 +++
>  docs/misc/cache-coloring.rst          | 48 +++++++++++++++++++++++++++
>  xen/arch/arm/dom0less-build.c         | 10 ++++++
>  xen/common/llc-coloring.c             | 41 +++++++++++++++++++++++
>  xen/include/xen/llc-coloring.h        |  1 +
>  xen/include/xen/xmalloc.h             | 12 +++++++
>  6 files changed, 116 insertions(+)
> 
> diff --git a/docs/misc/arm/device-tree/booting.txt 
> b/docs/misc/arm/device-tree/booting.txt
> index 3a04f5c57f..9085645433 100644
> --- a/docs/misc/arm/device-tree/booting.txt
> +++ b/docs/misc/arm/device-tree/booting.txt
> @@ -162,6 +162,10 @@ with the following properties:
> 
>      An integer specifying the number of vcpus to allocate to the guest.
> 
> +- llc-colors
> +    A string specifying the LLC color configuration for the guest.
> +    Refer to docs/misc/cache_coloring.rst for syntax.
Shouldn't we make it clear that this property is Arm64 only?

> +
>  - vpl011
> 
>      An empty property to enable/disable a virtual pl011 for the guest to
> diff --git a/docs/misc/cache-coloring.rst b/docs/misc/cache-coloring.rst
> index c5fb33996c..c14b6ee2f4 100644
> --- a/docs/misc/cache-coloring.rst
> +++ b/docs/misc/cache-coloring.rst
> @@ -12,6 +12,7 @@ If needed, change the maximum number of colors with
>  ``CONFIG_LLC_COLORS_ORDER=<n>``.
> 
>  Runtime configuration is done via `Command line parameters`_.
> +For DomUs follow `DomUs configuration`_.
> 
>  Background
>  **********
> @@ -147,6 +148,53 @@ LLC specs can be manually set via the above command line 
> parameters. This
>  bypasses any auto-probing and it's used to overcome failing situations, such 
> as
>  flawed probing logic, or for debugging/testing purposes.
> 
> +DomUs configuration
> +*******************
> +
> +DomUs colors can be set either in the ``xl`` configuration file 
> (documentation
> +at `docs/man/xl.cfg.pod.5.in`) or via Device Tree, also for Dom0less
> +configurations (documentation at `docs/misc/arm/device-tree/booting.txt`) 
> using
NIT: I think you can remove the part "also for Dom0less configurations" if you 
already
mentioned "or via Device Tree".

Other than that:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal





 


Rackspace

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