Skip to content

Commit aba7e06

Browse files
committed
efi/x86: Ensure that EFI_RUNTIME_MAP is enabled for kexec
CONFIG_EFI_RUNTIME_MAP needs to be enabled in order for kexec to be able to provide the required information about the EFI runtime mappings to the incoming kernel, regardless of whether kexec_load() or kexec_file_load() is being used. Without this information, kexec boot in EFI mode is not possible. The CONFIG_EFI_RUNTIME_MAP option is currently directly configurable if CONFIG_EXPERT is enabled, so that it can be turned on for debugging purposes even if KEXEC is not enabled. However, the upshot of this is that it can also be disabled even when it shouldn't. So tweak the Kconfig declarations to avoid this situation. Reported-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent 762f169 commit aba7e06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1945,6 +1945,7 @@ config EFI
19451945
select UCS2_STRING
19461946
select EFI_RUNTIME_WRAPPERS
19471947
select ARCH_USE_MEMREMAP_PROT
1948+
select EFI_RUNTIME_MAP if KEXEC_CORE
19481949
help
19491950
This enables the kernel to use EFI runtime services that are
19501951
available (such as the EFI variable services).
@@ -2020,7 +2021,6 @@ config EFI_MAX_FAKE_MEM
20202021
config EFI_RUNTIME_MAP
20212022
bool "Export EFI runtime maps to sysfs" if EXPERT
20222023
depends on EFI
2023-
default KEXEC_CORE
20242024
help
20252025
Export EFI runtime memory regions to /sys/firmware/efi/runtime-map.
20262026
That memory map is required by the 2nd kernel to set up EFI virtual

0 commit comments

Comments
 (0)