@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
+#include <linux/kexec.h>
#include <linux/memblock.h>
#include <linux/mm.h>
#include <linux/pfn.h>
@@ -114,6 +115,15 @@ static int __init unaccepted_init(void)
if (!boot_params.unaccepted_memory)
return 0;
+#ifdef CONFIG_KEXEC_CORE
+ /*
+ * TODO: Information on memory acceptance status has to be communicated
+ * between kernel.
+ */
+ pr_warn("Disable kexec: not yet supported on systems with unaccepted memory\n");
+ kexec_load_disabled = 1;
+#endif
+
bitmap_size = e820__end_of_ram_pfn() * PAGE_SIZE / PMD_SIZE;
unaccepted_memory = __va(boot_params.unaccepted_memory);
On kexec, the target kernel has to know what memory has been accepted. Information in EFI map is out of date and cannot be used. boot_params.unaccepted_memory can be used to pass the bitmap between two kernels on kexec, but the use-case is not yet implemented. Disable kexec on machines with unaccepted memory for now. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> --- arch/x86/mm/unaccepted_memory.c | 10 ++++++++++ 1 file changed, 10 insertions(+)