Skip to contentSkip to conversation

libnvdimm/e820: Add a new parameter to configure many regions per e820 entry

PATCH Superseded Michal Clapinski 1 participant 1 message Apr 17, 2025

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libnvdimm/e820: Add a new parameter to configure many regions per e820 entry

Currently, the user has to specify each memory region to be used with nvdimm via the memmap parameter. Due to the character limit of the command line, this makes it impossible to have a lot of pmem devices. This new parameter solves this issue by allowing users to divide one e820 entry into many nvdimm regions.

This change is needed for the hypervisor live update. VMs' memory will be backed by those emulated pmem devices. To support various VM shapes I want to create devdax devices at 1GB granularity similar to hugetlb.

It's also possible to expand this parameter in the future, e.g. to specify the type of the device (fsdax/devdax).

---
 .../admin-guide/kernel-parameters.txt         |   7 +
 drivers/nvdimm/e820.c                         | 149 +++++++++++++++++-
 2 files changed, 153 insertions(+), 3 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +7 -0
index fb8752b42ec85..63af03eb850ed 100644
@@ -3849,6 +3849,13 @@
 
 	n2=		[NET] SDL Inc. RISCom/N2 synchronous serial card
 
+	nd_e820.pmem=ss[KMG],nn[KMG]
+			Divide one e820 entry specified by memmap=x!ss
+			(that is starting at ss) into pmem devices of size nn.
+			There can be only one pmem parameter per one e820
+			entry. The size of the e820 entry has to be divisible
+			by the device size.
+
 	netdev=		[NET] Network devices parameters
 			Format: <irq>,<io>,<mem_start>,<mem_end>,<name>
 			Note that mem_start is often overloaded to mean
drivers/nvdimm/e820.c +146 -3

182 lines not on this page · raw message

Signature · 1 line
2.49.0.777.g153de2bbd5-goog