Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Apr 2017 15:49:55 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316767 - head/sys/amd64/amd64
Message-ID:  <201704131549.v3DFnt9I004050@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Apr 13 15:49:55 2017
New Revision: 316767
URL: https://svnweb.freebsd.org/changeset/base/316767

Log:
  Map DMAP as nx.
  
  Demotions preserve PG_NX, so it is enough to set nx bit for initial
  lowest-level paging entries.
  
  Suggested and reviewed by:	alc
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Thu Apr 13 15:49:32 2017	(r316766)
+++ head/sys/amd64/amd64/pmap.c	Thu Apr 13 15:49:55 2017	(r316767)
@@ -933,14 +933,14 @@ create_pagetables(vm_paddr_t *firstaddr)
 		pd_p[j] = (vm_paddr_t)i << PDRSHIFT;
 		/* Preset PG_M and PG_A because demotion expects it. */
 		pd_p[j] |= X86_PG_RW | X86_PG_V | PG_PS | X86_PG_G |
-		    X86_PG_M | X86_PG_A;
+		    X86_PG_M | X86_PG_A | pg_nx;
 	}
 	pdp_p = (pdp_entry_t *)DMPDPphys;
 	for (i = 0; i < ndm1g; i++) {
 		pdp_p[i] = (vm_paddr_t)i << PDPSHIFT;
 		/* Preset PG_M and PG_A because demotion expects it. */
 		pdp_p[i] |= X86_PG_RW | X86_PG_V | PG_PS | X86_PG_G |
-		    X86_PG_M | X86_PG_A;
+		    X86_PG_M | X86_PG_A | pg_nx;
 	}
 	for (j = 0; i < ndmpdp; i++, j++) {
 		pdp_p[i] = DMPDphys + ptoa(j);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704131549.v3DFnt9I004050>