]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dax/hmem, e820, resource: Defer Soft Reserved insertion until hmem is ready
authorDan Williams <dan.j.williams@intel.com>
Thu, 20 Nov 2025 03:19:17 +0000 (03:19 +0000)
committerDave Jiang <dave.jiang@intel.com>
Fri, 16 Jan 2026 16:02:36 +0000 (09:02 -0700)
commitbc62f5b308cbdedf29132fe96e9d591e526527e1
tree56c7ebfbe7d47906e747b4cc601cb17b3f7feb38
parent29317f8dc6ed601ec54575689c2cd55cc470bcce
dax/hmem, e820, resource: Defer Soft Reserved insertion until hmem is ready

Insert Soft Reserved memory into a dedicated soft_reserve_resource tree
instead of the iomem_resource tree at boot. Delay publishing these ranges
into the iomem hierarchy until ownership is resolved and the HMEM path
is ready to consume them.

Publishing Soft Reserved ranges into iomem too early conflicts with CXL
hotplug and prevents region assembly when those ranges overlap CXL
windows.

Follow up patches will reinsert Soft Reserved ranges into iomem after CXL
window publication is complete and HMEM is ready to claim the memory. This
provides a cleaner handoff between EFI-defined memory ranges and CXL
resource management without trimming or deleting resources later.

In the meantime "Soft Reserved" resources will no longer appear in
/proc/iomem, only their results. I.e. with "memmap=4G%4G+0xefffffff"

Before:
100000000-1ffffffff : Soft Reserved
  100000000-1ffffffff : dax1.0
    100000000-1ffffffff : System RAM (kmem)

After:
100000000-1ffffffff : dax1.0
  100000000-1ffffffff : System RAM (kmem)

The expectation is that this does not lead to a user visible regression
because the dax1.0 device is created in both instances.

Co-developed-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
[Smita: incorporate feedback from x86 maintainer review]
Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Link: https://patch.msgid.link/20251120031925.87762-2-Smita.KoralahalliChannabasappa@amd.com
[djbw: cleanups and clarifications]
Link: https://lore.kernel.org/69443f707b025_1cee10022@dwillia2-mobl4.notmuch
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
arch/x86/kernel/e820.c
drivers/dax/hmem/device.c
drivers/dax/hmem/hmem.c
include/linux/ioport.h
kernel/resource.c