Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/include for xen on amd64 PDP_BASE points to t...



details:   https://anonhg.NetBSD.org/src/rev/e8944338108a
branches:  trunk
changeset: 772771:e8944338108a
user:      cherry <cherry%NetBSD.org@localhost>
date:      Sun Jan 15 16:48:31 2012 +0000

description:
for xen on amd64 PDP_BASE points to the per-cpu ci->ci_kpm_pdir copy of *pmap_kernel()*'s L4 pdir, which is an alias for ci->ci_kpm_pdir. This is unlike PAE, where PDP_BASE points to the per-pmap 
pm_pdir consisting of 4 pages, the last of which is the "shadow". This "shadow" is not used directly in an active pmap, since it duplicates the kernel space and, for PAE, xen dissallows multiple cpus 
pointing to the same L3[3] page. Therefore, we use a per-cpu copy of the pmap_kernel() pdir's L3[3] page, ci->ci_pae_l3_pdir[3], while L3[0-2] point to the original pmap's pm_pdir[0 - 2]. Thus the 
"shadow" pdir only exists on i386 PAE. Note that on PAE, the recursive PDIR_SLOT_PTE is not per-cpu, and therefore cannot be made to point to per-cpu pdirs via (L4_BASE + PDIR_SLOT_PTE), unlike xen 
x86_64 where this is exactly the case.

diffstat:

 sys/arch/amd64/include/pmap.h |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 8393433596ea -r e8944338108a sys/arch/amd64/include/pmap.h
--- a/sys/arch/amd64/include/pmap.h     Sun Jan 15 15:05:06 2012 +0000
+++ b/sys/arch/amd64/include/pmap.h     Sun Jan 15 16:48:31 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.29 2012/01/09 13:04:13 cherry Exp $ */
+/*     $NetBSD: pmap.h,v 1.30 2012/01/15 16:48:31 cherry Exp $ */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -193,7 +193,6 @@
 
 #define PDP_PDE                (L4_BASE + PDIR_SLOT_PTE)
 #define APDP_PDE       (&curcpu()->ci_kpm_pdir[PDIR_SLOT_APTE])
-#define APDP_PDE_SHADOW        (L4_BASE + PDIR_SLOT_APTE)
 
 #define PDP_BASE       L4_BASE
 #define APDP_BASE      AL4_BASE



Home | Main Index | Thread Index | Old Index