Skip to content

xen/arm: validate hwdom first bank boot placement

Mykola Kvach xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest0 of 2 patches 2 repliesIn review
  2. v22 patches 8 repliesSuperseded

Changes in v3 from the cover letter

- Add Oleksii's Release-Acked-by tag.
- Patch 1: update the reverse xg_dom_arm.c placement comment and mention the MB(2) mechanical cleanup in the commit message.
- Patch 2: rename the arch hook to arch_hwdom_first_bank_can_fit_modules(), document its contract, and drop the redundant placement checks noted during review.
- Fix the duplicated "device-tree:" subject prefix in patch 2.

Patches in v3 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchMichal Orzel
SeriesR-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH for-4.22 v3 0/2] xen/arm: validate hwdom first bank boot placement

From: Mykola Kvach <[email protected]>

With LLC coloring enabled, the hardware domain memory is allocated by allocate_hwdom_memory() instead of relying on the fixed direct-map layout. Since de99f3263555 ("device-tree: Improve hwdom memory allocation for DMA"), the allocator prefers lower host regions, but the first-bank filter still only enforces the old 128MB heuristic.

A low candidate bank can satisfy that heuristic while still being unsuitable for the Arm kernel/DTB/initrd placement rules. Split the Arm placement logic into reusable helpers first, then validate the candidate hardware-domain bank 0 against those helpers before allocating it.

Link to CI tests:
https://gitlab.com/xen-project/people/mykola_kvach/xen/-/pipelines/2583876433

Changes in v3:
- Add Oleksii's Release-Acked-by tag.
- Patch 1: update the reverse xg_dom_arm.c placement comment and mention the MB(2) mechanical cleanup in the commit message.
- Patch 2: rename the arch hook to arch_hwdom_first_bank_can_fit_modules(), document its contract, and drop the redundant placement checks noted during review.
- Fix the duplicated "device-tree:" subject prefix in patch 2.

Changes in v2:
- Split the previous single patch into a behavior-preserving Arm placement refactoring and a separate hardware-domain first-bank fix.
- Rename find_module_placement() and place_modules() to use DTB/initrd terminology.
- Pass ramend to find_dtb_initrd_placement().
- Update the stale tools/libs/guest/xg_dom_arm.c reference.

Link to v1:
https://patchew.org/Xen/4f862bb2dc323914b8120b0f16af7516140cf42b.1780065103.git.mykola._5Fkvach@epam.com/

Mykola Kvach (2):
xen/arm: split DTB/initrd placement helpers
device-tree: validate hwdom bank 0 boot placement

 tools/libs/guest/xg_dom_arm.c           |   2 +-
 xen/arch/arm/acpi/domain_build.c        |   2 -
 xen/arch/arm/domain_build.c             |   8 +
 xen/arch/arm/include/asm/domain_build.h |   4 +
 xen/arch/arm/include/asm/kernel.h       |  10 ++
 xen/arch/arm/kernel.c                   | 186 ++++++++++++++++++------
 xen/common/device-tree/domain-build.c   |  31 ++--
 xen/include/xen/fdt-kernel.h            |  14 ++
 8 files changed, 196 insertions(+), 61 deletions(-)
Signature · 1 line
2.43.0