[PW_SID:1097531] riscv: kexec_file: Constrain segment placement to direct map#1978
[PW_SID:1097531] riscv: kexec_file: Constrain segment placement to direct map#1978linux-riscv-bot wants to merge 1 commit into
Conversation
When kexec_file_load places segments with buf_max=ULONG_MAX and top_down=true, they land at the highest available physical addresses. On RISC-V the size of the linear mapping is determined by the active VM mode: SV39 caps the direct map at roughly 128GB, while SV48/SV57 extend the range substantially further. When the installed physical memory exceeds the direct map size of the active mode, top-down placement puts DTB/initrd at physical addresses outside the linearly mapped region. The kexec'd kernel cannot reach them during early boot, triggering a page fault at memcmp in start_kernel. Fix by constraining buf_max to PFN_PHYS(max_low_pfn), which reflects the runtime direct map boundary for the active VM mode (SV39/SV48/ SV57). This keeps all kexec segments within the linearly mapped region while preserving the upstream top_down allocation strategy. Signed-off-by: Han Gao <gaohan@iscas.ac.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
|
Patch 1: "riscv: kexec_file: Constrain segment placement to direct map" |
PR for series 1097531 applied to workflow__riscv__fixes
Name: riscv: kexec_file: Constrain segment placement to direct map
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1097531
Version: 1