Hi,
On 04/03/2022 17:46, Marco Solieri wrote:
From: Luca Miccio <[email protected]>
A new allocator enforcing a cache-coloring configuration is going to be
introduced. We thus need to distinguish the memory pages assigned to,
and managed by, such colored allocator from the ordinary buddy
allocator's ones. Add a color flag to the page structure.
Signed-off-by: Luca Miccio <[email protected]>
Signed-off-by: Marco Solieri <[email protected]>
---
xen/arch/arm/include/asm/mm.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/arch/arm/include/asm/mm.h b/xen/arch/arm/include/asm/mm.h
index 487be7cf59..9ac1767595 100644
--- a/xen/arch/arm/include/asm/mm.h
+++ b/xen/arch/arm/include/asm/mm.h
@@ -88,6 +88,10 @@ struct page_info
*/
u32 tlbflush_timestamp;
};
+
+ /* Is page managed by the cache-colored allocator? */
+ bool colored;
struct page_info is going to be used quite a lot. In fact, there is one
per RAM page. So we need to avoid growing the structure.
For Arm64, there is a 4 bytes padding here. But for arm32, there are
none. So the size will increase by another 8 bytes.
In this case, I would use a bit in count_info.
Cheers,
--
Julien Grall