linux-stable/arch/x86
Baoquan He 32fbe52465 crash: use macro to add crashk_res into iomem early for specific arch
There are regression reports[1][2] that crashkernel region on x86_64 can't
be added into iomem tree sometime.  This causes the later failure of kdump
loading.

This happened after commit 4a693ce65b ("kdump: defer the insertion of
crashkernel resources") was merged.

Even though, these reported issues are proved to be related to other
component, they are just exposed after above commmit applied, I still
would like to keep crashk_res and crashk_low_res being added into iomem
early as before because the early adding has been always there on x86_64
and working very well.  For safety of kdump, Let's change it back.

Here, add a macro HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY to limit that
only ARCH defining the macro can have the early adding
crashk_res/_low_res into iomem. Then define
HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY on x86 to enable it.

Note: In reserve_crashkernel_low(), there's a remnant of crashk_low_res
handling which was mistakenly added back in commit 85fcde402d ("kexec:
split crashkernel reservation code out from crash_core.c").

[1]
[PATCH V2] x86/kexec: do not update E820 kexec table for setup_data
https://lore.kernel.org/all/Zfv8iCL6CT2JqLIC@darkstar.users.ipa.redhat.com/T/#u

[2]
Question about Address Range Validation in Crash Kernel Allocation
https://lore.kernel.org/all/4eeac1f733584855965a2ea62fa4da58@huawei.com/T/#u

Link: https://lkml.kernel.org/r/ZgDYemRQ2jxjLkq+@MiWiFi-R3L-srv
Fixes: 4a693ce65b ("kdump: defer the insertion of crashkernel resources")
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Huacai Chen <chenhuacai@loongson.cn>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Bohac <jbohac@suse.cz>
Cc: Li Huafei <lihuafei1@huawei.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-03-26 11:14:12 -07:00
..
boot EFI fixes for v6.9 #2 2024-03-24 13:54:06 -07:00
coco
configs x86/config: Fix warning for 'make ARCH=x86_64 tinyconfig' 2024-03-21 10:09:41 +01:00
crypto
entry Kbuild updates for v6.9 2024-03-21 14:41:00 -07:00
events perf/x86/amd/core: Avoid register reset when CPU is dead 2024-03-13 11:01:30 +01:00
hyperv hyperv-next for v6.9 2024-03-21 10:01:02 -07:00
ia32
include crash: use macro to add crashk_res into iomem early for specific arch 2024-03-26 11:14:12 -07:00
kernel A set of x86 fixes: 2024-03-24 11:13:56 -07:00
kvm Kbuild updates for v6.9 2024-03-21 14:41:00 -07:00
lib Merge branch 'linus' into x86/boot, to resolve conflict 2024-03-12 09:55:57 +01:00
math-emu
mm - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
net Networking changes for 6.9. 2024-03-12 17:44:08 -07:00
pci
platform xen: branch for v6.9-rc1 2024-03-19 08:48:09 -07:00
power - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
purgatory
ras
realmode
tools
um
video
virt
xen Kbuild updates for v6.9 2024-03-21 14:41:00 -07:00
.gitignore
Kbuild
Kconfig Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug
Makefile - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
Makefile.postlink
Makefile.um
Makefile_32.cpu