linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Robin Holt <holt@sgi.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	linux-kernel@vger.kernel.org, "Sakkinen,
	Jarkko" <jarkko.sakkinen@intel.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH] phys_efi_set_virtual_address_map needs va, no pa.
Date: Thu, 21 Jun 2012 17:35:37 -0700	[thread overview]
Message-ID: <4FE3BDD9.60105@zytor.com> (raw)
In-Reply-To: <20120621165220.GQ3464@sgi.com>

On 06/21/2012 09:52 AM, Robin Holt wrote:
> 
> I am completely lost as to what should be done.  How do we know
> which identity maps need to be created?  Do we just add them as we are
> scanning the e820/EFI memory maps and include the reserved, etc ranges?
> Do we look at the table handed to us by EFI at the beginning of boot and
> use that as the basis?  Or do we simply wait until the kernel's memory
> initialization is complete and cover all of physical memory from zero
> up to the highest physical address?
> 

Robin, we already create the 1:1 maps.  Right now there is some
weirdness with some of the issues that you mention, but that is
orthogonal to this.

The 1:1 map created for the kernel is created at a specific offset,
__PAGE_OFFSET, and is propagated into every vm context created by the
kernel.  There are two problems:

1. The "initial" (32 bit) or "trampoline" (64 bit) maps aren't on the
list of vm contexts created by the kernel (pgd_list), so they never get
updated after a particular point in the boot.

2. The initial/trampoline maps need these mappings not just at address
__PAGE_OFFSET, but also at address zero (identity mapping), which means
that just adding it to the pgd_list is insufficient.

Note that i386-PAE is unaffected, simply because the contents of the top
(3rd) level is always fixed.

	-hpa


  reply	other threads:[~2012-06-22  0:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20  8:24 [PATCH] phys_efi_set_virtual_address_map needs va, no pa Robin Holt
2012-06-20 12:07 ` Matthew Garrett
2012-06-20 20:41   ` H. Peter Anvin
2012-06-21  0:27     ` Robin Holt
2012-06-21  0:46       ` H. Peter Anvin
2012-06-21 16:52         ` Robin Holt
2012-06-22  0:35           ` H. Peter Anvin [this message]
2012-06-21 19:16         ` Konrad Rzeszutek Wilk

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=4FE3BDD9.60105@zytor.com \
    --to=hpa@zytor.com \
    --cc=holt@sgi.com \
    --cc=hpa@linux.intel.com \
    --cc=jarkko.sakkinen@intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.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 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).