[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <479948A1.7010607@zytor.com>
Date: Thu, 24 Jan 2008 18:25:37 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
CC: Pavel Machek <pavel@....cz>, "Rafael J. Wysocki" <rjw@...k.pl>,
Jeremy Fitzhardinge <jeremy@...p.org>,
Ian Campbell <ijc@...lion.org.uk>, Ingo Molnar <mingo@...e.hu>,
Mika Penttilä <mika.penttila@...umbus.fi>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] x86: Construct 32 bit boot time page tables in native
format.
Eric W. Biederman wrote:
>
> We already do this on the 64bit side. We reuse the kernel and the
> identity parts from the core kernel page tables but it is actually
> a distinct page table.
>
> x86_64 has not had the identity mappings mapped in any of the
> normal page tables since the relocatable kernel support was merged
> a while ago.
>
> Only on the 32bit side does this still remain an issue. I don't know
> if what we can do optimization wise there. Emulating the 64bit code
> and having a dedicated top level pgd (as part of the trampoline)
> and then a mapping into it the kernel identity mapping and the kernel
> mapping (which are the same on 32bit) should work fairly easily.
>
> It is just a handful of pgd entries, and then in the actual kernel
> entry code we reload %cr3 with the appropriate kernel page table
> and we should be fine. No need for an explicit zap there at all.
>
That's pretty much what I figure. The one issue is that on non-PAE
32-bit (or if we actually have to deal with unsharable PMDs on PAE
kernels) then the PGD (PMD) kernel mappings at least formally should
really be put in sync. This could be done either by the same code which
keeps the PGDs of various processes in sync already or on demand; I
believe my personal preference would be to have all that in the same
place, since we have to do it anyway, and this is nothing different
except for the offset.
-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