All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	linux-efi <linux-efi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	the arch/x86 maintainers <x86@kernel.org>,
	Borislav Petkov <bp@alien8.de>, Andy Lutomirski <luto@kernel.org>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	Bhupesh Sharma <bhsharma@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86/efi: Don't unmap EFI boot services code/data regions for EFI_OLD_MEMMAP and EFI_MIXED_MODE
Date: Tue, 25 Dec 2018 10:51:07 +0100	[thread overview]
Message-ID: <20181225095107.GA100072@gmail.com> (raw)
In-Reply-To: <FFF73D592F13FD46B8700F0A279B802F4860813C@ORSMSX114.amr.corp.intel.com>


* Prakhya, Sai Praneeth <sai.praneeth.prakhya@intel.com> wrote:

> > > > +     /*
> > > > +      * To Do: Remove this check after adding functionality to unmap EFI
> > boot
> > > > +      * services code/data regions from direct mapping area because
> > > > +      * "efi=old_map" maps EFI regions in swapper_pg_dir.
> > > > +      */
> > > > +     if (efi_enabled(EFI_OLD_MEMMAP))
> > > > +             return;
> > > > +
> > > > +     /*
> > > > +      * EFI mixed mode has all RAM mapped to access arguments while
> > making
> > > > +      * EFI runtime calls, hence don't unmap EFI boot services code/data
> > > > +      * regions.
> > > > +      */
> > > > +     if (!efi_is_native() && IS_ENABLED(CONFIG_EFI_MIXED))
> > 
> > AFAIK efi_is_native() can only return false is CONFIG_EFI_MIXED is set, so this
> > expression can be simplified.
> 
> Makes sense.
> efi_is_native() returns true for 32-bit machines running 32-bit firmware.

Forgot to mention that I performed this simplification in the commit I 
applied:

+       /*
+        * To Do: Remove this check after adding functionality to unmap EFI boot
+        * services code/data regions from direct mapping area because
+        * "efi=old_map" maps EFI regions in swapper_pg_dir.
+        */
+       if (efi_enabled(EFI_OLD_MEMMAP))
+               return;
+
+       /*
+        * EFI mixed mode has all RAM mapped to access arguments while making
+        * EFI runtime calls, hence don't unmap EFI boot services code/data
+        * regions.
+        */
+       if (!efi_is_native())
+               return;

Thanks,

	Ingo

  parent reply	other threads:[~2018-12-25  9:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-22  2:22 [PATCH] x86/efi: Don't unmap EFI boot services code/data regions for EFI_OLD_MEMMAP and EFI_MIXED_MODE Sai Praneeth Prakhya
2018-12-22 10:54 ` Ingo Molnar
2018-12-22 11:04   ` Ard Biesheuvel
2018-12-24  9:38     ` Ard Biesheuvel
2018-12-28 21:27       ` Prakhya, Sai Praneeth
     [not found]     ` <FFF73D592F13FD46B8700F0A279B802F4860813C@ORSMSX114.amr.corp.intel.com>
2018-12-25  9:51       ` Ingo Molnar [this message]
2018-12-22 19:05   ` Prakhya, Sai Praneeth
2018-12-22 21:03 ` [tip:efi/core] " tip-bot for Sai Praneeth Prakhya

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20181225095107.GA100072@gmail.com \
    --to=mingo@kernel.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bhsharma@redhat.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sai.praneeth.prakhya@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.