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

Re: [PATCH v2 2/2] xen/arm: Restrict Kconfig configuration for LLC coloring


  • To: Luca Fancellu <luca.fancellu@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 17 Feb 2025 13:55:01 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • 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=MhCOZRGyX+S0QXguNWg8dPtjtVr9Hw9WeNfu6KIZYRM=; b=gWkqgGXx8c5lWkgL127UPjFFviqCkO8YnibmH2Dus/Mrme9z6MjuCVfLSmHRX20FSWYpptOwwD1z2pxOiuL+cStPimWV3Jit3OIRiSOxJjFYk7qbIH5s37wo0Y4vaTO34dicSmxs3OA766hguqbchu9htJD9CNiK7X+ZbrWxXk2mQayH6famd2YV4R0Z6xVV9QOBDxPTx2bfTvU8iMG/sF/IIpQqKyUONbSDNfQSt6EbJeBJ/n+aRlKSdiAyZsmYAVB0C5cq3+qD8WVBjc+eIu3DkDPP5TlRWGxLxI1pONE3BPRFKIAibqVpI2xCHyYZA6OzlUZzuhAFGiVkAsZyHw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dCmzMifMjBjlG2WecYK3IwElCTZDtqSzj6klSpSOfK1601+bQtBit0yg0b+gV2m6+i/bX7iQA6UioT19X/3hIkSpWB2kR8vxsh2xOrf9Wk1NSILigceizpXe/SoweRI1Q/NH7Oy9gt+FltqzEICNHlO49y10gE3aO/UujzWBc9bPdx2RVsytn3zSXRSovrd7CqO37zkCGH4L/3b6W3yEfQyKopzbawyAyJzY53dnA27vTG0AiPoD/n9ZOs4acwgATODYdDHriCawWtY+QOsuAK2rHilMB2W77Pr5MleNzuDeCFLWxRmQWA/LGxNDgaGOj+OLtRrXIKPJeKV/jYtx/A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 17 Feb 2025 12:55:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 17/02/2025 11:27, Luca Fancellu wrote:
> 
> 
> LLC coloring can be used only on MMU system, move the code
> that selects it from ARM_64 to MMU and add the ARM_64
> dependency.
> 
> While there, add a clarification comment in the startup
> code related to the LLC coloring, because boot_fdt_info()
> is required to be called before llc_coloring_init(), because
> it parses the memory banks from the DT, but to discover that
> the developer needs to dig into the function.
Well, if at all such requirement would better be expressed using ASSERT in
get_xen_paddr(). The reason is ...

> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> ---
> v2 changes:
>  - dropped part of the v1 code, now this one is simpler, I will
>    discuss better how to design a common boot flow for MPU and
>    implement on another patch.
> 
> ---
> ---
>  xen/arch/arm/Kconfig | 2 +-
>  xen/arch/arm/setup.c | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> index a26d3e11827c..ffdff1f0a36c 100644
> --- a/xen/arch/arm/Kconfig
> +++ b/xen/arch/arm/Kconfig
> @@ -8,7 +8,6 @@ config ARM_64
>         depends on !ARM_32
>         select 64BIT
>         select HAS_FAST_MULTIPLY
> -       select HAS_LLC_COLORING if !NUMA
> 
>  config ARM
>         def_bool y
> @@ -76,6 +75,7 @@ choice
> 
>  config MMU
>         bool "MMU"
> +       select HAS_LLC_COLORING if !NUMA && ARM_64
>         select HAS_PMAP
>         select HAS_VMAP
>         select HAS_PASSTHROUGH
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index c1f2d1b89d43..91fa579e73e5 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -328,6 +328,7 @@ void asmlinkage __init start_xen(unsigned long fdt_paddr)
>                               (paddr_t)(uintptr_t)(_end - _start), false);
>      BUG_ON(!xen_bootmodule);
> 
> +    /* This parses memory banks needed for LLC coloring */
this comment is confusing. It reads as if boot_fdt_info was here only for LLC
coloring. Moreover, if you add such comment here, why not adding a comment above
boot_fdt_cmdline and cmdline_parse which are hard dependency for LLC coloring
code to read LLC cmdline options parsed by llc_coloring_init?

~Michal




 


Rackspace

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