[PATCH] dom0less: Fix LLC coloring when mixing colored and non-colored domains

Alejandro Vallejo posted 1 patch 3 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20250716153504.77542-1-alejandro.garciavallejo@amd.com
xen/common/device-tree/dom0less-build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] dom0less: Fix LLC coloring when mixing colored and non-colored domains
Posted by Alejandro Vallejo 3 months, 2 weeks ago
llc_colors_str being outside the main loop makes domains without
explicit coloring inherit the colors of the last colored domain parsed.

Move it inside so that's no longer the case.

Fixes: 5948dc16759c("xen/arm: add support for cache coloring...")
Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
---
pipeline: https://gitlab.com/xen-project/people/agvallejo/xen/-/pipelines/1930276681
---
 xen/common/device-tree/dom0less-build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tree/dom0less-build.c
index 221b875a2f..87828d4d9d 100644
--- a/xen/common/device-tree/dom0less-build.c
+++ b/xen/common/device-tree/dom0less-build.c
@@ -829,11 +829,11 @@ void __init create_domUs(void)
     bool iommu = false;
     const struct dt_device_node *cpupool_node,
                                 *chosen = dt_find_node_by_path("/chosen");
-    const char *llc_colors_str = NULL;
 
     BUG_ON(chosen == NULL);
     dt_for_each_child_node(chosen, node)
     {
+        const char *llc_colors_str = NULL;
         struct domain *d;
         struct xen_domctl_createdomain d_cfg = {0};
         unsigned int flags = 0U;

base-commit: dff462313fe0bfa273c54ffc9bff71f054c365af
-- 
2.43.0
Re: [PATCH] dom0less: Fix LLC coloring when mixing colored and non-colored domains
Posted by dmkhn@proton.me 3 months, 2 weeks ago
On Wed, Jul 16, 2025 at 05:35:03PM +0200, Alejandro Vallejo wrote:
> llc_colors_str being outside the main loop makes domains without
> explicit coloring inherit the colors of the last colored domain parsed.
> 
> Move it inside so that's no longer the case.
> 
> Fixes: 5948dc16759c("xen/arm: add support for cache coloring...")
> Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>

Reviewed-by: Denis Mukhin <dmukhin@ford.com> 

> ---
> pipeline: https://gitlab.com/xen-project/people/agvallejo/xen/-/pipelines/1930276681
> ---
>  xen/common/device-tree/dom0less-build.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tree/dom0less-build.c
> index 221b875a2f..87828d4d9d 100644
> --- a/xen/common/device-tree/dom0less-build.c
> +++ b/xen/common/device-tree/dom0less-build.c
> @@ -829,11 +829,11 @@ void __init create_domUs(void)
>      bool iommu = false;
>      const struct dt_device_node *cpupool_node,
>                                  *chosen = dt_find_node_by_path("/chosen");
> -    const char *llc_colors_str = NULL;
> 
>      BUG_ON(chosen == NULL);
>      dt_for_each_child_node(chosen, node)
>      {
> +        const char *llc_colors_str = NULL;
>          struct domain *d;
>          struct xen_domctl_createdomain d_cfg = {0};
>          unsigned int flags = 0U;
> 
> base-commit: dff462313fe0bfa273c54ffc9bff71f054c365af
> --
> 2.43.0
> 
> 
Re: [PATCH] dom0less: Fix LLC coloring when mixing colored and non-colored domains
Posted by Stefano Stabellini 3 months, 2 weeks ago
On Wed, 16 Jul 2025, dmkhn@proton.me wrote:
> On Wed, Jul 16, 2025 at 05:35:03PM +0200, Alejandro Vallejo wrote:
> > llc_colors_str being outside the main loop makes domains without
> > explicit coloring inherit the colors of the last colored domain parsed.
> > 
> > Move it inside so that's no longer the case.
> > 
> > Fixes: 5948dc16759c("xen/arm: add support for cache coloring...")
> > Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
> 
> Reviewed-by: Denis Mukhin <dmukhin@ford.com> 

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> > ---
> > pipeline: https://gitlab.com/xen-project/people/agvallejo/xen/-/pipelines/1930276681
> > ---
> >  xen/common/device-tree/dom0less-build.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tree/dom0less-build.c
> > index 221b875a2f..87828d4d9d 100644
> > --- a/xen/common/device-tree/dom0less-build.c
> > +++ b/xen/common/device-tree/dom0less-build.c
> > @@ -829,11 +829,11 @@ void __init create_domUs(void)
> >      bool iommu = false;
> >      const struct dt_device_node *cpupool_node,
> >                                  *chosen = dt_find_node_by_path("/chosen");
> > -    const char *llc_colors_str = NULL;
> > 
> >      BUG_ON(chosen == NULL);
> >      dt_for_each_child_node(chosen, node)
> >      {
> > +        const char *llc_colors_str = NULL;
> >          struct domain *d;
> >          struct xen_domctl_createdomain d_cfg = {0};
> >          unsigned int flags = 0U;
> > 
> > base-commit: dff462313fe0bfa273c54ffc9bff71f054c365af
> > --
> > 2.43.0
> > 
> > 
>