Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [bouyer-xeni386] src/sys/arch

Module Name:    src
Committed By:   bouyer
Date:           Tue Jan 15 22:15:59 UTC 2008

Modified Files:
        src/sys/arch/i386/include [bouyer-xeni386]: pmap.h
        src/sys/arch/x86/x86 [bouyer-xeni386]: pmap.c
        src/sys/arch/xen/x86 [bouyer-xeni386]: x86_xpmap.c

Log Message:
Snapshot of work in progress: an Xen i386PAE kernel boots and start init
on a amd64 dom0, but panics when init forks.
This code needs a lot of cleanup, and the pmap handling is minimal to
allow init to start. It's a proof of concept of how PAE on Xen can work.

For PAE guest, the Xen MMU handling differs in some significant way
from the i386 or amd64 Xen.
The L3 page has only 4 entries, the last one mapping 0xc0000000->0xffffffff
(which happens to be our kenrel VM range, that's cool). The L2 page
pointed to by this last entry is handled specially by Xen because it
contains some Xen private mapping, including a recursive mapping. So this
page can only be pointed to by exactly one L3 entry, and nothing else
(it can't be part of a recursive mapping for example). In addition, it
would waste too much VA space to do recursive mapping at the L3 level.

We do pmap switching at the L# level, instead of doing it though %cr3.
%cr3 is static, as is L3[3] which contains only kenrel mappings.
pmap_load() does pmap switching though the first 3 entries for L3.

PTE mapping is done though 4 contigous L2 entries; the last one pointing
to a shadow of L3[3]. This way we can consider we have a 2-level VM system,
but with the L2 being 4 pages in size instead of one. The plx_i()
macros can be used with it to access the PTE without changes.

This can be reused as is for native PAE support (without the L3[3] shadow
which wouldn't be needed here)

To generate a diff of this commit:
cvs rdiff -r1.97.6.3 -r1.97.6.4 src/sys/arch/i386/include/pmap.h
cvs rdiff -r1.13.2.10 -r1.13.2.11 src/sys/arch/x86/x86/pmap.c
cvs rdiff -r1.3.12.9 -r1.3.12.10 src/sys/arch/xen/x86/x86_xpmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index