[PATCH RFCv2 00/15] xen/arm: mm: Remove open-coding mappings

Julien Grall posted 15 patches 3 weeks, 1 day ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20210425201318.15447-1-julien@xen.org
xen/arch/arm/Makefile        |   1 +
xen/arch/arm/mm.c            | 362 +++++++++++++++++------------------
xen/arch/arm/p2m.c           |  16 +-
xen/arch/arm/pmap.c          | 101 ++++++++++
xen/arch/arm/setup.c         |  10 +-
xen/include/asm-arm/config.h |   6 +
xen/include/asm-arm/lpae.h   |  83 ++++----
xen/include/asm-arm/page.h   |   4 +
xen/include/asm-arm/pmap.h   |  10 +
9 files changed, 356 insertions(+), 237 deletions(-)
create mode 100644 xen/arch/arm/pmap.c
create mode 100644 xen/include/asm-arm/pmap.h

[PATCH RFCv2 00/15] xen/arm: mm: Remove open-coding mappings

Posted by Julien Grall 3 weeks, 1 day ago
From: Julien Grall <jgrall@amazon.com>

Hi all,

This series was originally sent as "xen/arm: mm: Add limited support
for superpages" [1] and finally has grown enough to remove most of
the open-coding mappings in the boot code.

This will help to:
    1) Get better compliance with the Arm memory model
    2) Pave the way to support other page size (64KB, 16KB)

This is not fully finished (only boot tested on Arm64) but I sent it
early to get more testing and also unblock some of the on-going work
to support static memory allocation for dom0less (see [2]).

There are still a few TODOs:
    - Add support for setting the contiguous bits
    - Remove 1GB alignment in setup_xenheap_mappings()
    - Decide whether we want to provide a common PMAP

Cheers,

[1] <20201119190751.22345-1-julien@xen.org>
[2] <PA4PR08MB6253F49C13ED56811BA5B64E92479@PA4PR08MB6253.eurprd08.prod.outlook.com>

Julien Grall (14):
  xen/arm: lpae: Rename LPAE_ENTRIES_MASK_GS to LPAE_ENTRY_MASK_GS
  xen/arm: lpae: Use the generic helpers to defined the Xen PT helpers
  xen/arm: p2m: Replace level_{orders, masks} arrays with LEVEL_{ORDER,
    MASK}
  xen/arm: mm: Allow other mapping size in xen_pt_update_entry()
  xen/arm: mm: Avoid flushing the TLBs when mapping are inserted
  xen/arm: mm: Don't open-code Xen PT update in remove_early_mappings()
  xen/arm: mm: Re-implement early_fdt_map() using map_pages_to_xen()
  xen/arm32: mm: Check if the virtual address is shared before updating
    it
  xen/arm32: mm: Re-implement setup_xenheap_mappings() using
    map_pages_to_xen()
  xen/arm: mm: Allocate xen page tables in domheap rather than xenheap
  xen/arm: mm: Allow page-table allocation from the boot allocator
  xen/arm: mm: Use the PMAP helpers in xen_{,un}map_table()
  xen/arm: mm: Rework setup_xenheap_mappings()
  xen/arm: mm: Re-implement setup_frame_table_mappings() with
    map_pages_to_xen()

Wei Liu (1):
  xen/arm: add Persistent Map (PMAP) infrastructure

 xen/arch/arm/Makefile        |   1 +
 xen/arch/arm/mm.c            | 362 +++++++++++++++++------------------
 xen/arch/arm/p2m.c           |  16 +-
 xen/arch/arm/pmap.c          | 101 ++++++++++
 xen/arch/arm/setup.c         |  10 +-
 xen/include/asm-arm/config.h |   6 +
 xen/include/asm-arm/lpae.h   |  83 ++++----
 xen/include/asm-arm/page.h   |   4 +
 xen/include/asm-arm/pmap.h   |  10 +
 9 files changed, 356 insertions(+), 237 deletions(-)
 create mode 100644 xen/arch/arm/pmap.c
 create mode 100644 xen/include/asm-arm/pmap.h

-- 
2.17.1