[PATCH] lzma: Relax memory limit for lzma decompressor

2023-11-24 Thread WANG Rui
The kexec cannot load LZMA compressed vmlinuz.efi on LoongArch. Try LZMA decompression. lzma_decompress_file: read on /tmp/Image4yyfhM of 65536 bytes failed pez_prepare: decompressed size 8563960 pez_prepare: done Cannot load vmlinuz.efi The root cause is that lzma decompressor requires

Re: [PATCH 1/4] kdump: add crashkernel cma suffix

2023-11-24 Thread kernel test robot
Hi Jiri, kernel test robot noticed the following build warnings: [auto build test WARNING on powerpc/next] [also build test WARNING on powerpc/fixes s390/features linus/master v6.7-rc2 next-20231124] [cannot apply to tip/x86/core arm64/for-next/core] [If your patch is applied to the wrong git

[PATCH v2] LoongArch: Load vmlinux.efi to the link address

2023-11-24 Thread WANG Rui
Currently, kexec loads vmlinux.efi to address 0 instead of the link address. This causes kexec to fail to boot the new vmlinux.efi on qemu. pei_loongarch_load: kernel_segment: pei_loongarch_load: kernel_entry: 013f1000 pei_loongarch_load: image_size: 01

Re: [PATCH 2/3] drivers/base/cpu: crash data showing should depends on KEXEC_CORE

2023-11-24 Thread Baoquan He
On 11/24/23 at 08:44am, Andrew Morton wrote: > On Thu, 23 Nov 2023 19:15:43 +0800 Baoquan He wrote: > > > > > CONFIG_KEXEC is used to enable kexec_load interface, the > > > > crash_notes/crash_notes_size/crash_hotplug showing depends on > > > > CONFIG_KEXEC is incorrect. It should depend on KEXEC

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-11-24 Thread Tao Liu
Hi Jiri, On Sat, Nov 25, 2023 at 3:55 AM Jiri Bohac wrote: > > Hi, > > this series implements a new way to reserve additional crash kernel > memory using CMA. > > Currently, all the memory for the crash kernel is not usable by > the 1st (production) kernel. It is also unmapped so that it can't >

[PATCH 3/4] kdump, x86: implement crashkernel CMA reservation

2023-11-24 Thread Jiri Bohac
Implement the crashkernel CMA reservation for x86: - enable parsing of the cma suffix by parse_crashkernel() - reserve memory with reserve_crashkernel_cma() - add the CMA-reserved ranges to the e820 map for the crash kernel - exclude the CMA-reserved ranges from vmcore Signed-off-by: Jiri Bohac

[PATCH 4/4] kdump, documentation: describe craskernel CMA reservation

2023-11-24 Thread Jiri Bohac
Describe the new crashkernel ",cma" suffix in Documentation/ --- Documentation/admin-guide/kdump/kdump.rst | 10 ++ Documentation/admin-guide/kernel-parameters.txt | 7 +++ 2 files changed, 17 insertions(+) diff --git a/Documentation/admin-guide/kdump/kdump.rst b/Documentatio

[PATCH 2/4] kdump: implement reserve_crashkernel_cma

2023-11-24 Thread Jiri Bohac
reserve_crashkernel_cma() reserves CMA ranges for the crash kernel. If allocating the requested size fails, try to reserve in smaller pieces. Store the reserved ranges in the crashk_cma_ranges array and the number of ranges in crashk_cma_cnt. Signed-off-by: Jiri Bohac --- include/linux/crash_

[PATCH 1/4] kdump: add crashkernel cma suffix

2023-11-24 Thread Jiri Bohac
Add a new optional ",cma" suffix to the crashkernel= command line option. Add a new cma_size parameter to parse_crashkernel(). When not NULL, call __parse_crashkernel to parse the CMA reservation size from "crashkernel=size,cma" and store it in cma_size. Set cma_size to NULL in all calls to pars

[PATCH 0/4] kdump: crashkernel reservation from CMA

2023-11-24 Thread Jiri Bohac
Hi, this series implements a new way to reserve additional crash kernel memory using CMA. Currently, all the memory for the crash kernel is not usable by the 1st (production) kernel. It is also unmapped so that it can't be corrupted by the fault that will eventually trigger the crash. This makes

Re: [PATCH 2/3] drivers/base/cpu: crash data showing should depends on KEXEC_CORE

2023-11-24 Thread Andrew Morton
On Thu, 23 Nov 2023 19:15:43 +0800 Baoquan He wrote: > > > CONFIG_KEXEC is used to enable kexec_load interface, the > > > crash_notes/crash_notes_size/crash_hotplug showing depends on > > > CONFIG_KEXEC is incorrect. It should depend on KEXEC_CORE instead. > > > > > > Fix it now. > > > > Can we

[PATCH] LoongArch: Load vmlinux.efi to the link address

2023-11-24 Thread WANG Rui
Currently, kexec loads vmlinux.efi to address 0 instead of the link address. This causes kexec to fail to boot the new vmlinux.efi on qemu. pei_loongarch_load: kernel_segment: pei_loongarch_load: kernel_entry: 015dc000 pei_loongarch_load: image_size: 01

[PATCH] LoongArch: Fix an issue with relocatable vmlinux

2023-11-24 Thread WANG Rui
Normally vmlinux for LoongArch is of ET_EXEC type, while if built with CONFIG_RELOCATABLE (this is PIE) and Clang, it will be of ET_DYN type. Meanwhile, physical address field of segments in vmlinux has actually the same value as virtual address field. Similar to arm64, this patch allows to uncond

Re: [PATCH v2 2/7] kexec_file: print out debugging message if required

2023-11-24 Thread Baoquan He
On 11/23/23 at 11:16pm, Joe Perches wrote: > On Fri, 2023-11-24 at 11:36 +0800, Baoquan He wrote: > > Replace pr_debug() with the newly added kexec_dprintk() in kexec_file > > loading related codes. > > trivia for pr_debug -> kexec_dprintk conversions for > the entire patch set: OK, will check al