[lkml]   [2012]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v6 00/27] x86, boot, 64bit: Add support for loading ramdisk and bzImage above 4G
On Thu, Dec 13, 2012 at 03:47:36PM -0800, H. Peter Anvin wrote:
> There are obviously good bits to this patchset, but I'm really
> starting to think the "pseudo-linear mode" via a trap handler --
> meaning we can access all of memory without any extra effort --
> makes more sense. In fact, that way we could just build the full
> page tables without worrying about incremental bootstrap, depending
> on if that is a complexity win or not.
> Either way, this is for native only: the Xen domain builder or other
> similar entry paths should be setting up page tables that cover all
> of memory; I'm hoping Konrad and Stefano can confirm this.

We do setup __ka space for everything everything we need to a fault.

Prior to 3.5 we could have blown over to the MODULES_SPACE if the guest
was booted with more than 128GB. That is now fixed so most of the
space _after_ the ramdisk in the __ka space can be blown away
and we use __va. We do this "cleanup" in xen_pagetable_init stage.

Which works as a long as cleanup_highmap only cleans up to
max_pfn_mapped (which in Xen case covers up to the RAMdisk).

The layout of __ka space is as follow:

an array called P2M for which we use __ka address until xen_pagetable_init
at which point we blow away any __ka entries for it.
start_info (we swap over to use __va before generic code is run).
the initial page-tables (for which the kernel uses __va address). we blow
away the __ka entries when xen_pagetable_init is called.

This __ka cleanup business was done for 64-bit only as the 32-bit
code scared me.

Hm, why that function is called xen_pagetable_init seems a bit silly.
> The only reason to go with another approach I can think of is if it
> makes 32/64-bit unification cleaner.
> -hpa
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to
> More majordomo info at
> Please read the FAQ at

 \ /
  Last update: 2012-12-22 00:21    [W:0.138 / U:1.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site