Re: [RFC v1 1/8] crash: fix minor typo/bug in debug message

2021-11-23 Thread Baoquan He
On 11/18/21 at 12:49pm, Eric DeVolder wrote: > The pr_debug() intends to display the memsz member, but the > parameter is actually the bufsz member (which is already > displayed). Correct this to display memsz value. > > Signed-off-by: Eric DeVolder > --- > arch/x86/kernel/crash.c | 2 +- > 1 fi

[PATCH v16 05/11] x86: kdump: move reserve_crashkernel[_low]() into crash_core.c

2021-11-23 Thread Zhen Lei
From: Chen Zhou Make the functions reserve_crashkernel[_low]() as generic. Arm64 will use these to reimplement crashkernel=X. Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/include/asm/elf.h | 3 + arch/x86/include/asm/kexec.h | 28 +- arch/x86/kernel/setup.c | 1

[PATCH v16 06/11] arm64: kdump: introduce some macros for crash kernel reservation

2021-11-23 Thread Zhen Lei
From: Chen Zhou Introduce macro CRASH_ALIGN for alignment, macro CRASH_ADDR_LOW_MAX for upper bound of low crash memory, macro CRASH_ADDR_HIGH_MAX for upper bound of high crash memory, use macros instead. Besides, keep consistent with x86, use CRASH_ALIGN as the lower bound of crash kernel reser

[PATCH v16 09/11] of: fdt: Aggregate the processing of "linux, usable-memory-range"

2021-11-23 Thread Zhen Lei
Currently, we parse the "linux,usable-memory-range" property in early_init_dt_scan_chosen(), to obtain the specified memory range of the crash kernel. We then reserve the required memory after early_init_dt_scan_memory() has identified all available physical memory. Because the two pieces of code a

[PATCH v16 10/11] of: fdt: Add memory for devices by DT property "linux, usable-memory-range"

2021-11-23 Thread Zhen Lei
From: Chen Zhou When reserving crashkernel in high memory, some low memory is reserved for crash dump kernel devices and never mapped by the first kernel. This memory range is advertised to crash dump kernel via DT property under /chosen, linux,usable-memory-range = We reused the DT pro

[PATCH v16 07/11] arm64: kdump: reimplement crashkernel=X

2021-11-23 Thread Zhen Lei
From: Chen Zhou There are following issues in arm64 kdump: 1. We use crashkernel=X to reserve crashkernel below 4G, which will fail when there is no enough low memory. 2. If reserving crashkernel above 4G, in this case, crash dump kernel will boot failure because there is no low memory available

[PATCH v16 11/11] kdump: update Documentation about crashkernel

2021-11-23 Thread Zhen Lei
From: Chen Zhou For arm64, the behavior of crashkernel=X has been changed, which tries low allocation in DMA zone and fall back to high allocation if it fails. We can also use "crashkernel=X,high" to select a high region above DMA zone, which also tries to allocate at least 256M low memory in DM

[PATCH v16 08/11] x86, arm64: Add ARCH_WANT_RESERVE_CRASH_KERNEL config

2021-11-23 Thread Zhen Lei
From: Chen Zhou We make the functions reserve_crashkernel[_low]() as generic for x86 and arm64. Since reserve_crashkernel[_low]() implementations are quite similar on other architectures as well, we can have more users of this later. So have CONFIG_ARCH_WANT_RESERVE_CRASH_KERNEL in arch/Kconfig

[PATCH v16 04/11] x86: kdump: move xen_pv_domain() check and insert_resource() to setup_arch()

2021-11-23 Thread Zhen Lei
From: Chen Zhou We will make the functions reserve_crashkernel() as generic, the xen_pv_domain() check in reserve_crashkernel() is relevant only to x86, the same as insert_resource() in reserve_crashkernel[_low](). So move xen_pv_domain() check and insert_resource() to setup_arch() to keep them i

[PATCH v16 02/11] x86: kdump: make the lower bound of crash kernel reservation consistent

2021-11-23 Thread Zhen Lei
From: Chen Zhou The lower bounds of crash kernel reservation and crash kernel low reservation are different, use the consistent value CRASH_ALIGN. Suggested-by: Dave Young Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/kernel/setup.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH v16 00/11] support reserving crashkernel above 4G on arm64 kdump

2021-11-23 Thread Zhen Lei
There are following issues in arm64 kdump: 1. We use crashkernel=X to reserve crashkernel below 4G, which will fail when there is no enough low memory. 2. If reserving crashkernel above 4G, in this case, crash dump kernel will boot failure because there is no low memory available for allocation. T

[PATCH v16 03/11] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-11-23 Thread Zhen Lei
From: Chen Zhou To make the functions reserve_crashkernel() as generic, replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. Signed-off-by: Chen Zhou Tested-by: John Donnelly Acked-by: Baoquan He --- arch/x86/kernel/setup.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(

[PATCH v16 01/11] x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN

2021-11-23 Thread Zhen Lei
From: Chen Zhou Move CRASH_ALIGN to header asm/kexec.h for later use. Suggested-by: Dave Young Suggested-by: Baoquan He Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/include/asm/kexec.h | 3 +++ arch/x86/kernel/setup.c | 3 --- 2 files changed, 3 insertions(+), 3 delet

Re: [PATCH] MAINTAINERS: update kdump maintainers

2021-11-23 Thread Baoquan He
Hi Dave, On 11/23/21 at 02:30pm, Dave Young wrote: > Remove myself from kdump maintainers as I have no enough time to > maintain it now. But I can review patches on demand though. > > Signed-off-by: Dave Young > --- > MAINTAINERS |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > I