[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YbIw1nUYJ3KlkjJQ@zn.tnic>
Date: Thu, 9 Dec 2021 17:37:42 +0100
From: Borislav Petkov <bp@...en8.de>
To: Mike Rapoport <rppt@...nel.org>
Cc: Juergen Gross <jgross@...e.com>,
John Dorminy <jdorminy@...hat.com>, tip-bot2@...utronix.de,
anjaneya.chagam@...el.com, dan.j.williams@...el.com,
linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
stable@...r.kernel.org, x86@...nel.org,
Hugh Dickins <hughd@...gle.com>,
"Patrick J. Volkerding" <volkerdi@...il.com>
Subject: Re: [tip: x86/urgent] x86/boot: Pull up cmdline preparation and
early param parsing
On Thu, Dec 09, 2021 at 06:29:27PM +0200, Mike Rapoport wrote:
> On Thu, Dec 09, 2021 at 04:28:48PM +0100, Borislav Petkov wrote:
> > On Thu, Dec 09, 2021 at 04:26:55PM +0100, Juergen Gross wrote:
> > > Sigh. This will break Xen PV. Again. The comment above the call of
> > > early_reserve_memory() tells you why.
> >
> > I know. I was just looking at how to fix that particular thing and was
> > going to find you on IRC to talk to you about it...
>
> The memory reservation in arch/x86/platform/efi/efi.c depends on at least
> two command line parameters, I think it's better put it back later in the
> boot process and move efi_memblock_x86_reserve_range() out of
> early_memory_reserve().
>
> I.e. revert c0f2077baa41 ("x86/boot: Mark prepare_command_line() __init")
> and 8d48bf8206f7 ("x86/boot: Pull up cmdline preparation and early param
> parsing") and add the patch below on top.
>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 49b596db5631..da36b8f8430b 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -713,9 +713,6 @@ static void __init early_reserve_memory(void)
>
> early_reserve_initrd();
>
> - if (efi_enabled(EFI_BOOT))
> - efi_memblock_x86_reserve_range();
> -
> memblock_x86_reserve_range_setup_data();
>
> reserve_ibft_region();
> @@ -890,6 +887,9 @@ void __init setup_arch(char **cmdline_p)
>
> parse_early_param();
>
> + if (efi_enabled(EFI_BOOT)) {
> + efi_memblock_x86_reserve_range();
> +
> #ifdef CONFIG_MEMORY_HOTPLUG
> /*
> * Memory used by the kernel cannot be hot-removed because Linux
>
> --
Jürgen and I were thinking about a different fix but that's probably
ok too. But I've said that already about this mess and there's always
something we haven't thought about.
Whatever we do, it needs to be tested by all folks on Cc who already
reported regressions, i.e., Anjaneya, Hugh, John and Patrick.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists