archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <>
To: Linus Torvalds <>
Cc: Borislav Petkov <>, x86-ml <>,
	lkml <>
Subject: Re: [GIT PULL] x86/urgent for v5.13-rc5
Date: Sun, 6 Jun 2021 23:58:29 +0300	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sun, Jun 06, 2021 at 12:38:32PM -0700, Linus Torvalds wrote:
> On Sun, Jun 6, 2021 at 12:55 AM Borislav Petkov <> wrote:
> >
> > - Do away with all the wankery of reserving X amount of memory in
> > the first megabyte to prevent BIOS corrupting it and simply and
> > unconditionally reserve the whole first megabyte.
> This seems a bit draconic.
> How does this work at all under Windows? There must be some windows
> knowledge about what the BIOS updates that we're not aware of.

A while ago hpa said:

	As far as I know, Windows 7 actually reserves all memory below
	1 MiB to avoid BIOS bugs.

> I've pulled it, but it does seem like something odd is going on.
> And that
>     Fixes: a799c2bd29d1 ("x86/setup: Consolidate early memory reservations")
> makes me go "Umm.." too. What did a799c2bd29d1 actually break? It
> looks like it was meant to be a no-op consolidation - if somebody
> bisected to it, I think that is a sign that there's something odd
> there.
I also hoped that a799c2bd29d1 would be a no-op consolidation, but I
overlooked that if a user sets CONFIG_X86_RESERVE_LOW or reservelow to 640K
instead of the default 64K, we end up reserving all the memory below 1M
before we allocate the real mode trampoline. This gets even more hairy
because of other things that may also need to reserve the entire first
megabyte, like crash kernel or workaround for Sandy Bridge integrated
graphics bugs.

I believe that reserving everything below 1M after the real mode trampoline
is allocated reduces amount of hidden dependencies and makes things simpler

Sincerely yours,

  reply	other threads:[~2021-06-06 21:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06  7:55 Borislav Petkov
2021-06-06 19:38 ` Linus Torvalds
2021-06-06 20:58   ` Mike Rapoport [this message]
2021-06-06 21:23     ` Linus Torvalds
2021-06-06 22:07       ` Borislav Petkov
2021-06-06 23:05         ` Sasha Levin
2021-06-07 18:46           ` James Morris
2021-06-08 17:53             ` Michael Kelley
2021-06-08 18:33               ` Borislav Petkov
2021-06-08 19:22                 ` Linus Torvalds
2021-06-08 20:01                   ` Borislav Petkov
2021-06-08 20:03                     ` Linus Torvalds
2021-06-08 20:30                       ` [PATCH] x86/setup: Document that Windows reserves the first MiB Borislav Petkov
2021-06-09  8:54                         ` Mike Rapoport
2021-06-06 20:14 ` [GIT PULL] x86/urgent for v5.13-rc5 pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [GIT PULL] x86/urgent for v5.13-rc5' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).