[PATCH v3 0/2] libnvdimm/e820: Add a new parameter to configure many regions per e820 entry

From: Michal Clapinski
Date: Thu Jun 12 2025 - 07:42:47 EST


This includes:
1. Splitting one e820 entry into many regions.
2. Conversion to devdax during boot.

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.
Also detecting those devices as devdax during boot speeds up the whole
process. Conversion in userspace would be much slower which is
unacceptable while trying to minimize

v3:
- Added a second commit.
- Reworked string parsing.
- I was asked to rename the parameter to 'split' but I'm not sure it
fits anymore with the conversion functionality, so I didn't do that
yet. LMK.
v2: Fixed a crash when pmem parameter is omitted.

Michal Clapinski (2):
libnvdimm/e820: Add a new parameter to split e820 entry into many
regions
libnvdimm: add nd_e820.pmem automatic devdax conversion

.../admin-guide/kernel-parameters.txt | 10 +
drivers/dax/pmem.c | 2 +-
drivers/nvdimm/dax_devs.c | 5 +-
drivers/nvdimm/e820.c | 211 +++++++++++++++++-
drivers/nvdimm/nd.h | 6 +
drivers/nvdimm/pfn_devs.c | 158 +++++++++----
include/linux/libnvdimm.h | 3 +
7 files changed, 346 insertions(+), 49 deletions(-)

--
2.50.0.rc1.591.g9c95f17f64-goog