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.

This commit is contained in:
cherry 2012-01-15 16:48:31 +00:00
parent fde1964dc4
commit 51736efbb0
1 changed files with 1 additions and 2 deletions

View File

@ -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