]> xenbits.xensource.com Git - xen.git/commit
xen/arm: add cache coloring support for Xen image
authorCarlo Nonato <carlo.nonato@minervasys.tech>
Tue, 17 Dec 2024 17:06:37 +0000 (18:06 +0100)
committerMichal Orzel <michal.orzel@amd.com>
Thu, 19 Dec 2024 18:24:31 +0000 (19:24 +0100)
commite7a80636f16eb63299a6ffd6d41958e81c163991
tree8d83c162c69fc0ee4fdf25ce56334549e1bba36d
parentf376ff0e4fc642281c49243c4895e31122db6bd2
xen/arm: add cache coloring support for Xen image

Xen image is relocated to a new colored physical space. Some relocation
functionalities must be brought back:
- the virtual address of the new space is taken from 0c18fb76323b
  ("xen/arm: Remove unused BOOT_RELOC_VIRT_START").
- relocate_xen() and get_xen_paddr() are taken from f60658c6ae47
  ("xen/arm: Stop relocating Xen").

setup_pagetables() must be adapted for coloring and for relocation. Runtime
page tables are used to map the colored space, but they are also linked in
boot tables so that the new space is temporarily available for relocation.
This implies that Xen protection must happen after the copy.

Finally, since the alternative framework needs to remap the Xen text and
inittext sections, this operation must be done in a coloring-aware way.
The function xen_remap_colored() is introduced for that.

Signed-off-by: Carlo Nonato <carlo.nonato@minervasys.tech>
Signed-off-by: Marco Solieri <marco.solieri@minervasys.tech>
Reviewed-by: Jan Beulich <jbeulich@suse.com> # common
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
xen/arch/arm/alternative.c
xen/arch/arm/arm64/mmu/head.S
xen/arch/arm/arm64/mmu/mm.c
xen/arch/arm/include/asm/mmu/layout.h
xen/arch/arm/include/asm/mmu/mm.h
xen/arch/arm/llc-coloring.c
xen/arch/arm/mmu/setup.c
xen/arch/arm/setup.c
xen/common/llc-coloring.c
xen/include/xen/llc-coloring.h