Module Name: src
Committed By: cherry
Date: Wed Feb 1 18:55:33 UTC 2012
Modified Files:
src/sys/arch/x86/x86: pmap.c
Log Message:
amd64/Xen doesn't require special treatment for pmap_is_curpmap(),
since cpu_load_pmap() ensures that the linear map is in place for the
kernel. This emulates normal shared kernel mappings, except for the
recursive mapping of the PDP_BASE, which will point to the per-cpu
pdir, which will be a copy of the pmap_kernel()->pm_pdir; instead of
the user pmap->pm_pdir.
To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/arch/x86/x86/pmap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.162 src/sys/arch/x86/x86/pmap.c:1.163
--- src/sys/arch/x86/x86/pmap.c:1.162 Mon Jan 30 17:56:27 2012
+++ src/sys/arch/x86/x86/pmap.c Wed Feb 1 18:55:32 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.162 2012/01/30 17:56:27 cherry Exp $ */
+/* $NetBSD: pmap.c,v 1.163 2012/02/01 18:55:32 cherry Exp $ */
/*-
* Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.162 2012/01/30 17:56:27 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.163 2012/02/01 18:55:32 cherry Exp $");
#include "opt_user_ldt.h"
#include "opt_lockdebug.h"
@@ -675,17 +675,8 @@ pv_pte_next(struct pmap_page *pp, struct
bool
pmap_is_curpmap(struct pmap *pmap)
{
-#if defined(XEN) && defined(__x86_64__)
- /*
- * Only kernel pmap is physically loaded.
- * User PGD may be active, but TLB will be flushed
- * with HYPERVISOR_iret anyway, so let's say no
- */
- return(pmap == pmap_kernel());
-#else /* XEN && __x86_64__*/
return((pmap == pmap_kernel()) ||
(pmap == curcpu()->ci_pmap));
-#endif
}
/*