Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 amd64/Xen doesn't require special treatment...
details: https://anonhg.NetBSD.org/src/rev/2bb6a700dc1d
branches: trunk
changeset: 773415:2bb6a700dc1d
user: cherry <cherry%NetBSD.org@localhost>
date: Wed Feb 01 18:55:32 2012 +0000
description:
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.
diffstat:
sys/arch/x86/x86/pmap.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diffs (36 lines):
diff -r 67912c14fd1e -r 2bb6a700dc1d sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c Wed Feb 01 17:53:54 2012 +0000
+++ b/sys/arch/x86/x86/pmap.c Wed Feb 01 18:55:32 2012 +0000
@@ -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 @@
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
}
/*
Home |
Main Index |
Thread Index |
Old Index