[PATCH 31/36] Disable coloring if static memory support is selected

Marco Solieri posted 36 patches 3 years, 11 months ago
There is a newer version of this series
[PATCH 31/36] Disable coloring if static memory support is selected
Posted by Marco Solieri 3 years, 11 months ago
From: Luca Miccio <lucmiccio@gmail.com>

Static memory assumes to have physically contiguous memory mapped to
domains. This assumption cannot be made when coloring is enabled.
These two features have to be mutually exclusive.

Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
---
 xen/arch/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index f0f999d172..8f8be9d754 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -100,6 +100,7 @@ config HARDEN_BRANCH_PREDICTOR
 config COLORING
 	bool "L2 cache coloring"
 	default n
+	depends on !STATIC_MEMORY
 	depends on ARM_64
 
 config TEE
-- 
2.30.2
Re: [PATCH 31/36] Disable coloring if static memory support is selected
Posted by Julien Grall 3 years, 11 months ago
Hi Marco,

On 04/03/2022 17:46, Marco Solieri wrote:
> From: Luca Miccio <lucmiccio@gmail.com>
> 
> Static memory assumes to have physically contiguous memory mapped to
> domains. This assumption cannot be made when coloring is enabled.
> These two features have to be mutually exclusive.

I understand that at runtime, you want them to be mutually exclusive.
But I am not sure to understand why this needs to be mutually exclusive 
at compile time.

In fact, I think it would be nice if we have a same binary Xen that can 
be used with/without coloring. Could you outline any reasons that would 
make this goal difficult to achieve?

Cheers,

-- 
Julien Grall