Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2019 22:54:42 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r353905 - head/sys/amd64/amd64
Message-ID:  <201910222254.x9MMsgo8095644@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Tue Oct 22 22:54:41 2019
New Revision: 353905
URL: https://svnweb.freebsd.org/changeset/base/353905

Log:
  amd64 pmap: fixup invlgen lookup for fictitious mappings
  
  Similarly to r353438, use dummy entry.
  
  Reported and tested by:	Neel Chauhan
  Sponsored by:	The FreeBSD Foundation

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

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Tue Oct 22 22:52:53 2019	(r353904)
+++ head/sys/amd64/amd64/pmap.c	Tue Oct 22 22:54:41 2019	(r353905)
@@ -951,8 +951,16 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, invl_wait_slow, CTLFLA
 static u_long *
 pmap_delayed_invl_genp(vm_page_t m)
 {
+	vm_paddr_t pa;
+	u_long *gen;
 
-	return (&pa_to_pmdp(VM_PAGE_TO_PHYS(m))->pv_invl_gen);
+	pa = VM_PAGE_TO_PHYS(m);
+	if (__predict_false((pa) > pmap_last_pa))
+		gen = &pv_dummy_large.pv_invl_gen;
+	else
+		gen = &(pa_to_pmdp(pa)->pv_invl_gen);
+
+	return (gen);
 }
 #else
 static u_long *



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