Re: [PATCHv7 11/14] x86: Disable kexec if system has unaccepted memory

From: Dave Hansen
Date: Thu Jun 23 2022 - 14:23:54 EST


... adding kexec folks

On 6/14/22 05:02, Kirill A. Shutemov wrote:
> 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.
...
> +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

This looks to be the *only* in-kernel user tweaking kexec_load_disabled.
It doesn't feel great to just be disabling kexec like this. Why not
just fix it properly?

What do the kexec folks think?