[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWS6oc1494Y9BgxUPzeF+HbUMAQNU8ofnkuZZ8rbJ_z+g@mail.gmail.com>
Date: Thu, 21 Jul 2016 14:08:12 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Ingo Molnar <mingo@...nel.org>
Cc: Matt Fleming <mfleming@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Mario Limonciello <mario_limonciello@...l.com>,
Kees Cook <keescook@...omium.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Matthew Garrett <mjg59@...f.ucam.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
X86 ML <x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area
reservation code
On Thu, Jul 21, 2016 at 9:18 AM, Ingo Molnar <mingo@...nel.org> wrote:
>
> * Andy Lutomirski <luto@...capital.net> wrote:
>
>> It would be very easy to implement this if we could handle overlapping memblocks
>> precisely or set a lower limit on the memblock allocator. Then we could block
>> off everything below 1MB or 2MB very early and then unblock it or temporarily
>> change the lower limit and ask for a single page for the trampoline after that.
>
> So my suggestion was/is to _permanently_ allocate the SMP trampoline page, and
> leave it also reserved.
>
> 'Reserving' a memory area is really just a kernel internal matter. We can still
> use it. No need to unreserve/allocate/re-reserve ... unless I'm missing something.
>
I don't think you're missing anything particularly deep. I'm just
talking about an implementation issue. We need to make sure that the
page we pick for the trampoline isn't reserved in the memory map or by
some other quirk (including the EBDA). The kernel currently uses
memblock for this, which means that we should probably play nicely
with the memblock code.
To fix my laptop, though, I think we either need to change the EBDA
reservation (i.e. be willing to pick a page above the EBDA but below
the BIOS) or rework the code so that it can use a BOOT_SERVICES_DATA
page.
--Andy
Powered by blists - more mailing lists