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

[PATCH V4 00/10] Domain on Static Allocation


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>
  • From: Penny Zheng <penny.zheng@xxxxxxx>
  • Date: Wed, 28 Jul 2021 10:27:47 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) 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=M7/UIJts4MNIYNmIi3gGj53g6WJvY6i2WJS5qMZ0p9g=; b=RJ4ZfWQ69Gp7yKo+++6qExR+60YJmXLvMCSoPc6gwjPwb3CsRyNVm4XqgNfTTLeTZgMQAI+yiyOdIBYIl6thAiX6pU/nJKWoPWxSDUDztlQHat7qYkIoYlg2f8NXrC6NrMPTPBAH16dSnzEv0u+N6GDynfVgZkmMzoV2AspawGB7LFn9qED89YDw6LCbvmdP0jN4glvLyYlMZPynv7wGzPMd/6OU+4KtT+vCoPEAJGAj1/0QYDRR8T8hbIJ5Ki1dg1wzGHdz3ioKZZG/grtiP30W0UZ66W4ZkI71hM1zfHfGhMnxdm8FwZfykEarXjDD5u0RrriAfEcrvDkEZ39cVw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ajGuH38yy89nLbnOwcqrF8K1yyTvx2jStfwQextFN1mzN3FRVadI/0z0zv8YunK7JPZE/o1N+heyjmh1988nxvrpTS5vzcgSUeRX5UH7rDBKxZq6blOwYFrMZAUuEweYvUxxbbxIa8APmb26plmi64frDbodRTdqa2eLHw9ytj5pr/cXoLL2plbc4cCJkPrt0HFSfba+VIGvPhq8NHA8EEvzmX0jhSU1NON5pUjNZ8siGyiSp01wA3086VE1Z+27ZwgC1UoRXTaD2d+Exlzptayt8hASxYoMlIoxffGxWJPL96rD+udhZLKbawxCWXNiZgTEKz6+pqlIJqiNeQOnTg==
  • Cc: <Bertrand.Marquis@xxxxxxx>, <Penny.Zheng@xxxxxxx>, <Wei.Chen@xxxxxxx>, <nd@xxxxxxx>
  • Delivery-date: Wed, 28 Jul 2021 10:28:49 +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](
https://lists.xenproject.org/archives/html/xen-devel/2021-05/msg00882.html)
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 v4:
- move the option CONFIG_STATIC_MEMORY to common code, and with Arm
"select"ing it
- replace round_pg{down,up}() with PFN_DOWN()/PFN_UP()
- in all cases where order-0 pages get passed, prefer using new assign_pages
to pass literal 1
- reconstruct the order of assign_pages parameters
- moving tlb/cache flush outside of the locked region, considering XSA-364
and reducing the amount of work happening with the heap_lock held
- remove MEMF_no_refcount case
- make acquire_staticmem_pages/acquire_domstatic_pages being __init

TODO:
- reboot domain on static allocation
- Implement all memory-ops(hypercalls) regarding domain on static allocation
to balloon in/out memory
- asynchronously scrubbing PGC_reserved pages
- consider domain on static allocation on NUMA-support scenario

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                  |   1 +
 xen/arch/arm/bootfdt.c                |  89 +++++++---
 xen/arch/arm/domain_build.c           | 170 +++++++++++++++++-
 xen/arch/arm/setup.c                  |  71 ++++++--
 xen/arch/x86/pv/dom0_build.c          |   2 +-
 xen/common/Kconfig                    |   3 +
 xen/common/grant_table.c              |   2 +-
 xen/common/memory.c                   |   4 +-
 xen/common/page_alloc.c               | 243 ++++++++++++++++++++------
 xen/include/asm-arm/mm.h              |   3 +
 xen/include/asm-arm/setup.h           |   2 +
 xen/include/xen/mm.h                  |  15 ++
 13 files changed, 542 insertions(+), 103 deletions(-)

-- 
2.25.1




 


Rackspace

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