Skip to content

mm/memory_hotplug: full support for add_memory_driver_managed() with CONFIG_ARCH_KEEP_MEMBLOCK

David Hildenbrand kexec linux-ia64 linux-m68k linux-mips linux-mm linux-s390 linux-snps-arc lkml 2 versions – Applied

Status from this message: [merged] mm-memory_hotplug-indicate-memblock_driver_managed-with-ioresource_sysram_driver_managed.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 4 repliesApplied 5/5
  2. v14 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- "memblock: improve MEMBLOCK_HOTPLUG documentation" -- Added
- "memblock: add MEMBLOCK_DRIVER_MANAGED to mimic IORESOURCE_SYSRAM_DRIVER_MANAGED"
-- Improve documentation of MEMBLOCK_DRIVER_MANAGED
- Refine patch descriptions

Patches in v2 All 5 applied

#Subject and filesSizeRepliesApplied
1/5mm/memory_hotplug: handle memblock_add_node() failures in add_memory_resource()mm/memory_hotplug.c+6 -20 repliesApplied
2/5memblock: improve MEMBLOCK_HOTPLUG documentationinclude/linux/memblock.h+5 -11 replyApplied
3/5memblock: allow to specify flags with memblock_add_node()arch/arc/mm/init.c arch/ia64/mm/contig.c arch/ia64/mm/init.c +9 more+26 -172 repliesApplied
4/5memblock: add MEMBLOCK_DRIVER_MANAGED to mimic IORESOURCE_SYSRAM_DRIVER_MANAGEDinclude/linux/memblock.h kernel/kexec_file.c mm/memblock.c+23 -21 replyApplied
5/5mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with IORESOURCE_SYSRAM_DRIVER_MANAGEDmm/memory_hotplug.c+4 -10 repliesApplied

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchGeert UytterhoevenHeiko CarstensMike Rapoport
1/5
2/5R-b
3/5A-b A-b R-b
4/5R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/5] mm/memory_hotplug: full support for add_memory_driver_managed() with CONFIG_ARCH_KEEP_MEMBLOCK

Architectures that require CONFIG_ARCH_KEEP_MEMBLOCK=y, such as arm64, don't cleanly support add_memory_driver_managed() yet. Most prominently, kexec_file can still end up placing kexec images on such driver-managed memory, resulting in undesired behavior, for example, having kexec images located on memory not part of the firmware-provided memory map.

Teaching kexec to not place images on driver-managed memory is especially relevant for virtio-mem. Details can be found in commit 7b7b27214bba ("mm/memory_hotplug: introduce add_memory_driver_managed()").

Extend memblock with a new flag and set it from memory hotplug code when applicable. This is required to fully support virtio-mem on arm64, making also kexec_file behave like on x86-64.

v1 -> v2:
- "memblock: improve MEMBLOCK_HOTPLUG documentation" -- Added
- "memblock: add MEMBLOCK_DRIVER_MANAGED to mimic IORESOURCE_SYSRAM_DRIVER_MANAGED"
-- Improve documentation of MEMBLOCK_DRIVER_MANAGED
- Refine patch descriptions

Cc Andrew Morton <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Jianyong Wu <[email protected]>
Cc Aneesh Kumar K.V <[email protected]>
Cc Vineet Gupta <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Jiaxun Yang <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Eric Biederman <[email protected]>
Cc Arnd Bergmann <[email protected]>

David Hildenbrand (5):
mm/memory_hotplug: handle memblock_add_node() failures in
add_memory_resource()
memblock: improve MEMBLOCK_HOTPLUG documentation
memblock: allow to specify flags with memblock_add_node()
memblock: add MEMBLOCK_DRIVER_MANAGED to mimic
IORESOURCE_SYSRAM_DRIVER_MANAGED
mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with
IORESOURCE_SYSRAM_DRIVER_MANAGED

 arch/arc/mm/init.c               |  4 ++--
 arch/ia64/mm/contig.c            |  2 +-
 arch/ia64/mm/init.c              |  2 +-
 arch/m68k/mm/mcfmmu.c            |  3 ++-
 arch/m68k/mm/motorola.c          |  6 ++++--
 arch/mips/loongson64/init.c      |  4 +++-
 arch/mips/sgi-ip27/ip27-memory.c |  3 ++-
 arch/s390/kernel/setup.c         |  3 ++-
 include/linux/memblock.h         | 25 +++++++++++++++++++++----
 include/linux/mm.h               |  2 +-
 kernel/kexec_file.c              |  5 +++++
 mm/memblock.c                    | 13 +++++++++----
 mm/memory_hotplug.c              | 11 +++++++++--
 13 files changed, 62 insertions(+), 21 deletions(-)

base-commit: 9e1ff307c779ce1f0f810c7ecce3d95bbae40896

Signature · 1 line
2.31.1