Skip to content

Setup memory management

Oleksii Kurochko xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5xen/riscv: add stub for share_xen_page_with_guest()xen/arch/riscv/stubs.c+10 -05 replies
2/5xen/riscv: implement maddr_to_virt()xen/arch/riscv/include/asm/mm.h+6 -26 replies
3/5xen/riscv: introduce setup_mm()xen/arch/riscv/include/asm/mm.h xen/arch/riscv/include/asm/setup.h xen/arch/riscv/mm.c +1 more+100 -03 replies
4/5xen/riscv: initialize the VMAP_DEFAULT virtual rangexen/arch/riscv/mm.c xen/arch/riscv/pt.c xen/arch/riscv/setup.c+14 -61 reply
5/5xen/riscv: finalize boot allocator and transition to boot statexen/arch/riscv/setup.c+8 -01 reply

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchJan Beulich
1/5
2/5
3/5
4/5A-b
5/5A-b

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

Read the v1 thread

Cover letter [PATCH v1 0/5] Setup memory management

Finish initializing the memory subsystem by mapping the direct map and frame table.
In the case of RISC-V 64, which has a large virtual address space (the minimum supported MMU mode is Sv39, providing TB of VA space), the direct map and frame table are mapped starting from physical address
0. This simplifies the calculations and thereby improves performance for page_to_mfn(), mfn_to_page(), and maddr_to_virt(), as there is no need to account for {directmap, frametable}_base_pdx.
In addition, initialize the VMAP_DEFAULT region, finalize the boot allocator, and update the system state from early_boot to boot.

Also, after patch 3 ("xen/riscv: introduce setup_mm()") of this patch series, the linkage error mentioned in patch 1 ("xen/riscv: add stub for share_xen_page_with_guest()") began to occur, so patch 1 addresses this issue.

The function maddr_to_virt() is introduced as part of this patch series, as setup_directmap_mappings() uses it indirectly through mfn_to_virt().

Oleksii Kurochko (5):
xen/riscv: add stub for share_xen_page_with_guest() xen/riscv: implement maddr_to_virt()
xen/riscv: introduce setup_mm()
xen/riscv: initialize the VMAP_DEFAULT virtual range xen/riscv: finalize boot allocator and transition to boot state

 xen/arch/riscv/include/asm/mm.h    |  10 ++-
 xen/arch/riscv/include/asm/setup.h |   2 +
 xen/arch/riscv/mm.c                | 104 +++++++++++++++++++++++++++--
 xen/arch/riscv/pt.c                |   6 ++
 xen/arch/riscv/setup.c             |  14 ++++
 xen/arch/riscv/stubs.c             |  10 +++
 6 files changed, 138 insertions(+), 8 deletions(-)
Signature · 1 line
2.47.0