Author: cperciva
Date: Thu Jan  6 13:09:02 2011
New Revision: 217052
URL: http://svn.freebsd.org/changeset/base/217052

Log:
  MFC r216762: Don't panic when exiting gstat or 'mdconfig -l'

Modified:
  stable/8/sys/i386/xen/pmap.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/i386/xen/pmap.c
==============================================================================
--- stable/8/sys/i386/xen/pmap.c        Thu Jan  6 13:02:29 2011        
(r217051)
+++ stable/8/sys/i386/xen/pmap.c        Thu Jan  6 13:09:02 2011        
(r217052)
@@ -2293,19 +2293,8 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t 
        if (oldpte & PG_G)
                pmap_invalidate_page(kernel_pmap, va);
        pmap->pm_stats.resident_count -= 1;
-       /*
-        * XXX This is not strictly correctly, but somewhere along the line
-        * we are losing the managed bit on some pages. It is unclear to me
-        * why, but I think the most likely explanation is that xen's writable
-        * page table implementation doesn't respect the unused bits.
-        */
-       if ((oldpte & PG_MANAGED) || ((oldpte & PG_V) && (va < 
VM_MAXUSER_ADDRESS))
-               ) {
+       if (oldpte & PG_MANAGED) {
                m = PHYS_TO_VM_PAGE(xpmap_mtop(oldpte) & PG_FRAME);
-
-               if (!(oldpte & PG_MANAGED))
-                       printf("va=0x%x is unmanaged :-( pte=0x%llx\n", va, 
oldpte);
-
                if (oldpte & PG_M) {
                        KASSERT((oldpte & PG_RW),
        ("pmap_remove_pte: modified page not writable: va: %#x, pte: %#jx",
@@ -2315,9 +2304,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t 
                if (oldpte & PG_A)
                        vm_page_flag_set(m, PG_REFERENCED);
                pmap_remove_entry(pmap, m, va);
-       } else if ((va < VM_MAXUSER_ADDRESS) && (oldpte & PG_V))
-               printf("va=0x%x is unmanaged :-( pte=0x%llx\n", va, oldpte);
-
+       }
        return (pmap_unuse_pt(pmap, va, free));
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to