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 *
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to