From: Sourabh Jain <sourabhjain@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com, mpe@ellerman.id.au
Cc: npiggin@gmail.com, chleroy@kernel.org, ritesh.list@gmail.com,
shivangu@linux.ibm.com, hbathini@linux.ibm.com,
mahesh@linux.ibm.com, adityag@linux.ibm.com,
venkat88@linux.ibm.com, Sourabh Jain <sourabhjain@linux.ibm.com>
Subject: [PATCH v2 0/4] powerpc/kdump: Support high crashkernel reservation
Date: Wed, 8 Jul 2026 20:03:53 +0530 [thread overview]
Message-ID: <20260708143357.673251-1-sourabhjain@linux.ibm.com> (raw)
Add support for reserving crashkernel memory in higher address ranges
using the crashkernel=xxM,high command-line option.
With this feature, most of the crashkernel memory for kdump is reserved
in high memory regions, while only a small portion (64 MB) is reserved
in low memory for RTAS usage. This helps free up low memory for other
components that require allocations in that region.
For example, if crashkernel=2G,high is specified, the kernel reserves
2 GB of crashkernel memory near the end of system RAM and an additional
64 MB of low memory (below 1 GB) for RTAS to function properly.
Currently, this feature is supported only on PPC64 systems with:
64-bit RTAS support
Radix MMU enabled
HASH MMU is currently not supported because kexec segments are loaded
into higher memory by default when using high crashkernel reservation,
and HASH MMU does not support booting kernels loaded at higher memory
addresses.
To support this feature:
- CPU feature discovery is moved before crashkernel reservation so the
MMU type is known before selecting crashkernel regions. (Patch 01/04)
- RTAS argument handling, allowing RTAS to correctly return to kernel
addresses above 4 GB. (Patch 02/04)
This patch series leverages the new firmware capability property
("ibm,rtas-64-capable") to enable 64-bit RTAS support and significantly
changes RTAS call handling. Feedback is requested, particularly on the
overall approach and implementation of the 64-bit RTAS support.
- The approach used for enabling 64-bit RTAS support
- The handling and conversion of RTAS arguments for 64-bit RTAS calls
- The RTAS call flow and MSR handling in 64-bit mode
The new DT property "ibm,rtas-64-capable" is currently not described in
PAPR.
Changes since v1:
https://lore.kernel.org/all/20251027151338.819957-1-sourabhjain@linux.ibm.com/
- Detect 64-bit RTAS capability using "ibm,rtas-64-capable" instead of
relying on instantiate-rtas-64 failure handling
- Add proper 64-bit RTAS argument structure conversion and return value
handling
- Add dedicated 64-bit RTAS entry path
- Read the actual "linux,rtas-64" DT property value instead of checking
only property presence
- Simplify rtas_64 initialization and tracking
Sourabh Jain (4):
powerpc/mmu: do MMU type discovery before crashkernel reservation
powerpc: move to 64-bit RTAS
powerpc/kdump: consider high crashkernel memory if enabled
powerpc/kdump: add support for high crashkernel reservation
arch/powerpc/include/asm/book3s/64/mmu.h | 1 +
arch/powerpc/include/asm/crash_reserve.h | 6 +++
arch/powerpc/include/asm/kexec.h | 1 +
arch/powerpc/include/asm/mmu.h | 1 +
arch/powerpc/include/asm/rtas-types.h | 8 ++++
arch/powerpc/include/asm/rtas.h | 11 ++++++
arch/powerpc/kernel/prom.c | 28 +++++++-------
arch/powerpc/kernel/prom_init.c | 20 ++++++++--
arch/powerpc/kernel/rtas.c | 48 ++++++++++++++++++++++--
arch/powerpc/kernel/rtas_entry.S | 17 ++++++++-
arch/powerpc/kexec/core.c | 45 ++++++++++++++++------
arch/powerpc/kexec/elf_64.c | 10 +++--
arch/powerpc/kexec/file_load_64.c | 5 ++-
arch/powerpc/kexec/ranges.c | 24 ++++++++++--
arch/powerpc/mm/init_64.c | 27 ++++++++-----
15 files changed, 202 insertions(+), 50 deletions(-)
--
2.52.0
next reply other threads:[~2026-07-08 14:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 14:33 Sourabh Jain [this message]
2026-07-08 14:33 ` [PATCH v2 1/4] powerpc/mmu: do MMU type discovery before crashkernel reservation Sourabh Jain
2026-07-10 2:44 ` Ritesh Harjani
2026-07-13 13:12 ` Sourabh Jain
2026-07-08 14:33 ` [PATCH v2 2/4] powerpc: move to 64-bit RTAS Sourabh Jain
2026-07-08 14:33 ` [PATCH v2 3/4] powerpc/kdump: consider high crashkernel memory if enabled Sourabh Jain
2026-07-08 14:33 ` [PATCH v2 4/4] powerpc/kdump: add support for high crashkernel reservation Sourabh Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260708143357.673251-1-sourabhjain@linux.ibm.com \
--to=sourabhjain@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=chleroy@kernel.org \
--cc=hbathini@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=shivangu@linux.ibm.com \
--cc=venkat88@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox