[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH V3 00/10] Domain on Static Allocation

  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>
  • From: Penny Zheng <penny.zheng@xxxxxxx>
  • Date: Thu, 15 Jul 2021 05:18:09 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Edzc1ERAnnH92n0EA/COjnS7/1YJjgFDhgKYTVRzhVs=; b=iOogvVG295qq/Mj2jF6F7kaXtWSJRsN9Y5CD189+//iPI4xwJ/kh6NQfFiNtnxo+YCpn2H+PG0tiXXONGbv4nTRt3Bq8lyH0U0PyJGsD7Y9g/UyeVCbwLw5DfEay/MrDZyTpJU5g4Jsifewg32B/ZGucbld7FwPLMUPEo4QDC/1eg3V+CL0j6OfAsEWaLDD0TWO+CM0zjKx+HIWG47OsW5ijM2lzu5tE3jjOhepxXs4MuM/43MREOX7MjF951RHvDkZ//cv+sth81VqEH8DUGluP/DnMesCRA+mt8QK5Rr0PhEBlwgjCaxTfbmVFR2DdGPmUGhftVV9MzMbrvMnOAQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TzQrByR2v6s7jKwYBJHLJvHJMqdu8QATmlg2ainZ6JmzW7RVn3lYO97GMW4QwaPILeNamrV8t3MZMBtNNT8KdCU3ApqShuO9Y1XKhXRHKIeynZj6ZroHi/Lhn55hoYV4WnozXNWvjnYS26qBGgCMj8ddophThOCfxDSj2b/tdODO5x0fSBD1N4MhAfLEgUKqBzAVLq43T7HhcuTu8VFzPQcjf38yvqYRAymB3Zk6OtQqaBARmjY2Hn4QU2T0BsFWnX9XyqxmWEl8RIdrtJvelUdQrrSxkyCn5nZ431XutpC2jQeV7gNzJpAMuNt3vaEfy5GMr4G2DReCr/BYGYwKpw==
  • Cc: <Bertrand.Marquis@xxxxxxx>, <Penny.Zheng@xxxxxxx>, <Wei.Chen@xxxxxxx>, <jbeulich@xxxxxxxx>, <nd@xxxxxxx>
  • Delivery-date: Thu, 15 Jul 2021 05:18:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

Static Allocation refers to system or sub-system(domains) for which memory
areas are pre-defined by configuration using physical address ranges.
Those pre-defined memory, -- Static Memory, as parts of RAM reserved in the
beginning, shall never go to heap allocator or boot allocator for any use.

Domain on Static Allocation is supported through device tree property
`xen,static-mem` specifying reserved RAM banks as this domain's guest RAM.
The size of address-cells/size-cells must be defined in
"#xen,static-mem-address-cells" and "#xen,static-mem-size-cells".

This Patch Serie only talks about Domain on Static Allocation.

Looking into related [design link](
for more details.

The whole design is about Static Allocation and 1:1 direct-map, and this
Patch Serie only covers parts of it, which are Domain on Static Allocation.
Other features will be delievered through different patch series.
changes in v3:
- use "xen,static-mem" property to be compatible with System Sevice Tree
in the future
- introduce new helper device_tree_get_meminfo
- extract common codes for dealing with reserved memory stored in
- rename from "free_page" to "mark_page_free"
- remove non-trivial page_to_mfn conversion in "mark_page_free" due to
pdx compression, and let the MFN passed in
- let all switch-cases shared in "mark_page_free"
- put init_staticmem_pages in setup_mm
- rename assign_pages_nr to assign_pages
- alter the order of assign_pages parameters to help backporting
- change name from alloc_staticmem_pages/alloc_domstatic_pages to
acquire_staticmem_pages and acquire_domstatic_pages.
- remove hunks' #ifdef-ary by introducing PGC_reserved = 0
- remove DMA restriction
- "memory" property shall be mandatory
- rename allocate_static_bank_memory to append_static_memory_to_bank
- infer the next GFN from the bank information in append_static_memory_to_bank
- simplify the code of double loop in allocate_static_memory

Penny Zheng (10):
  xen/arm: introduce domain on Static Allocation
  xen/arm: introduce new helper device_tree_get_meminfo
  xen/arm: handle static memory in dt_unreserved_regions
  xen: introduce mark_page_free
  xen/arm: static memory initialization
  xen/arm: introduce PGC_reserved
  xen: re-define assign_pages and introduce assign_page
  xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages
  xen/arm: check "xen,static-mem" property during domain construction
  xen/arm: introduce allocate_static_memory

 docs/misc/arm/device-tree/booting.txt |  40 +++++
 xen/arch/arm/Kconfig                  |   3 +
 xen/arch/arm/bootfdt.c                |  89 +++++++---
 xen/arch/arm/domain_build.c           | 170 +++++++++++++++++-
 xen/arch/arm/setup.c                  |  73 ++++++--
 xen/arch/x86/pv/dom0_build.c          |   2 +-
 xen/common/grant_table.c              |   2 +-
 xen/common/memory.c                   |   4 +-
 xen/common/page_alloc.c               | 245 ++++++++++++++++++++------
 xen/include/asm-arm/mm.h              |   3 +
 xen/include/asm-arm/setup.h           |   2 +
 xen/include/xen/mm.h                  |  15 ++
 12 files changed, 546 insertions(+), 102 deletions(-)




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.