Re: [RFC PATCH 0/4] kdump: add generic functions to simplify crashkernel crashkernel in architecture

2023-06-18 Thread Baoquan He
On 06/19/23 at 01:59pm, Baoquan He wrote: > In the current arm64, crashkernel=,high support has been finished after > several rounds of posting and careful reviewing. The code in arm64 which > parses crashkernel kernel parameters firstly, then reserve memory can be > a good example for other ARCH t

[RFC PATCH 2/4] kdump: add generic functions to parse crashkernel and do reservation

2023-06-18 Thread Baoquan He
In architecture like x86_64, arm64 and riscv, they have vast virtual address space and usually have huge physical memory RAM. Their crashkernel reservation doesn't have to be limited under 4G RAM, but can be extended to the whole physical memory via crashkernel=,high support. Now add function pars

[RFC PATCH 0/4] kdump: add generic functions to simplify crashkernel crashkernel in architecture

2023-06-18 Thread Baoquan He
In the current arm64, crashkernel=,high support has been finished after several rounds of posting and careful reviewing. The code in arm64 which parses crashkernel kernel parameters firstly, then reserve memory can be a good example for other ARCH to refer to. Whereas in x86_64, the code mixing cr

[RFC PATCH 3/4] arm64: kdump: use generic interfaces to simplify crashkernel reservation code

2023-06-18 Thread Baoquan He
With the help of generic functions parse_crashkernel_generic() and reserve_crashkernel_generic(), crashkernel reservation can be simplified by steps: 1) Provide CRASH_ALIGN, CRASH_ADDR_LOW_MAX, CRASH_ADDR_HIGH_MAX and DEFAULT_CRASH_KERNEL_LOW_SIZE in ; 2) Add arch_reserve_crashkernel() to call

[RFC PATCH 4/4] x86: kdump: use generic interfaces to simplify crashkernel reservation code

2023-06-18 Thread Baoquan He
With the help of generic functions parse_crashkernel_generic() and reserve_crashkernel_generic(), crashkernel reservation can be simplified by steps: 1) Provide CRASH_ALIGN, CRASH_ADDR_LOW_MAX, CRASH_ADDR_HIGH_MAX and DEFAULT_CRASH_KERNEL_LOW_SIZE in ; 2) Add arch_reserve_crashkernel() to call

[RFC PATCH 1/4] kdump: rename parse_crashkernel() to parse_crashkernel_common()

2023-06-18 Thread Baoquan He
Now there are parse_crashkernel_high() and parse_crashkernel_low() parsing crashkernel=,high|low. Function parse_crashkernel() could be misunderstood as a generic interface parsing all possible crashkernel kernel parameters. Hence, rename parse_crashkernel() to parse_crashkernel_common() to differ

[PATCH v11 2/4] powerpc/crash: add crash CPU hotplug support

2023-06-18 Thread Sourabh Jain
Introduce powerpc crash hotplug handler to update the necessary kexec segments in the kernel on CPU/Memory hotplug events. Currently, these updates are done by monitoring CPU/Memory hotplug events in userspace. In the generic infrastructure, a shared crash hotplug handler is triggered for both CPU

[PATCH v11 3/4] crash: forward memory_notify args to arch crash hotplug handler

2023-06-18 Thread Sourabh Jain
On PowerPC, memblock regions is used to prepare the elfcorehdr. This elfcorehdr describes the memory regions of the running kernel to the kdump kernel. However, a challenge arises as the notifier for the memory hotplug crash handler is triggered before the memblock region update takes place. Conseq

[PATCH v11 1/4] powerpc/kexec: turn some static helper functions public

2023-06-18 Thread Sourabh Jain
Move update_cpus_node and get_crash_memory_ranges functions from kexec/file_load_64.c to kexec/core_64.c to make these functions usable by other kexec components. Later in the series, these functions are utilized to do in-kernel update to kexec segments on CPU/Memory hot plug/unplug or online/offl

[PATCH v11 0/4] PowerPC: In-kernel handling of CPU/Memory hotplug/online/offline events for kdump kernel

2023-06-18 Thread Sourabh Jain
The Problem: Post CPU/Memory hot plug/unplug and online/offline events occur, the kdump kernel often retains outdated system information. This presents a significant challenge when attempting to perform a dump collection using an outdated or stale kdump kernel. In such situations, ther

[PATCH v11 4/4] powerpc/crash: add crash memory hotplug support

2023-06-18 Thread Sourabh Jain
Extend PowerPC arch crash hotplug handler to support memory hotplug events. Since elfcorehdr is used to exchange the memory info between the kernels hence it needs to be recreated to reflect the changes due to memory hotplug events. The way memory hotplug events are handled on PowerPC and the noti