[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4FE3BDD9.60105@zytor.com>
Date: Thu, 21 Jun 2012 17:35:37 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Robin Holt <holt@....com>
CC: "H. Peter Anvin" <hpa@...ux.intel.com>,
Matthew Garrett <mjg59@...f.ucam.org>,
linux-kernel@...r.kernel.org,
"Sakkinen, Jarkko" <jarkko.sakkinen@...el.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: Re: [PATCH] phys_efi_set_virtual_address_map needs va, no pa.
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists