Skip to content

Introduce reserved heap

Henry Wang xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 19 repliesIn review
  2. v12 patches 50 repliesSuperseded

Changes in v2 from the cover letter

- Rename the device tree property to xen,static-heap to avoid confusion.
- Change of commit msg and doc wording, correct typo in commit msg.
- Add an empty line in make_memory_node() memory type check to improve readability.
- Use enum membank_type to make the memory type cleaner.
- New commits for make process_chosen_node() return int and rename xenheap_* to directmap_*.
- Move the global bool reserved_heap to bootinfo.
- Replace the open open-coding address ~0 by INVALID_PADDR.
- Do not use reverted logic in heap_pages calculation.
- Remove unused Arm32 reserved_heap_start variable.
- Decouple the arm32 reserved heap too small size check with region end check.
- Reuse the arm32 original xenheap finding logic with the new helper to make sure xenheap on arm32 is contiguous.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4docs, xen/arm: Introduce reserved heap memorydocs/misc/arm/device-tree/booting.txt xen/arch/arm/bootfdt.c xen/arch/arm/domain_build.c +2 more+84 -910 replies
2/4xen/arm: bootfdt: Make process_chosen_node() return intxen/arch/arm/bootfdt.c+17 -143 replies
3/4xen/arm: Handle reserved heap pages in boot and heap allocatorxen/arch/arm/bootfdt.c xen/arch/arm/include/asm/setup.h xen/arch/arm/setup.c+104 -156 replies
4/4xen/arm: mm: Rename xenheap_* variable to directmap_*xen/arch/arm/include/asm/config.h xen/arch/arm/include/asm/mm.h xen/arch/arm/mm.c +1 more+38 -370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] Introduce reserved heap

The reserved heap, or statically configured heap, refers to parts of RAM reserved in the beginning for heap. Like the static memory allocation, such reserved heap regions are reserved by configuration in the device tree using physical address ranges.

This feature is useful to run Xen on Arm MPU systems, where only a finite number of memory protection regions are available. The limited number of protection regions places requirement on planning the use of MPU protection regions and one or more MPU protection regions needs to be reserved only for heap.

The first patch introduces the reserved heap and the device tree parsing code. The second patch enhances the error handling in processing the dts chosen node. The third patch adds the implementation of the reserved heap pages handling in boot and heap allocator for Arm. The fourth patch renames xenheap_* to directmap_* for better readablity.

Changes from v1 to v2:
- Rename the device tree property to xen,static-heap to avoid confusion.
- Change of commit msg and doc wording, correct typo in commit msg.
- Add an empty line in make_memory_node() memory type check to improve readability.
- Use enum membank_type to make the memory type cleaner.
- New commits for make process_chosen_node() return int and rename xenheap_* to directmap_*.
- Move the global bool reserved_heap to bootinfo.
- Replace the open open-coding address ~0 by INVALID_PADDR.
- Do not use reverted logic in heap_pages calculation.
- Remove unused Arm32 reserved_heap_start variable.
- Decouple the arm32 reserved heap too small size check with region end check.
- Reuse the arm32 original xenheap finding logic with the new helper to make sure xenheap on arm32 is contiguous.

Henry Wang (4):
docs, xen/arm: Introduce reserved heap memory xen/arm: bootfdt: Make process_chosen_node() return int xen/arm: Handle reserved heap pages in boot and heap allocator xen/arm: mm: Rename xenheap_* variable to directmap_*

 docs/misc/arm/device-tree/booting.txt |  45 ++++++++
 xen/arch/arm/bootfdt.c                |  54 +++++++---
 xen/arch/arm/domain_build.c           |   8 +-
 xen/arch/arm/include/asm/config.h     |   2 +-
 xen/arch/arm/include/asm/mm.h         |  22 ++--
 xen/arch/arm/include/asm/setup.h      |   8 +-
 xen/arch/arm/mm.c                     |  24 ++---
 xen/arch/arm/setup.c                  | 145 ++++++++++++++++++++------
 8 files changed, 238 insertions(+), 70 deletions(-)
Signature · 1 line
2.17.1