svn commit: r217081 - releng/8.2/sys/i386/xen

Colin Percival cperciva at FreeBSD.org
Thu Jan 6 22:53:56 UTC 2011


Author: cperciva
Date: Thu Jan  6 22:53:55 2011
New Revision: 217081
URL: http://svn.freebsd.org/changeset/base/217081

Log:
  MFS r217052: Fix a panic when gstat exits or when 'mdconfig -l' is run,
  on i386/XEN.
  
  PR:		kern/141328
  Approved by:	re (rwatson)

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

Modified: releng/8.2/sys/i386/xen/pmap.c
==============================================================================
--- releng/8.2/sys/i386/xen/pmap.c	Thu Jan  6 22:52:52 2011	(r217080)
+++ releng/8.2/sys/i386/xen/pmap.c	Thu Jan  6 22:53:55 2011	(r217081)
@@ -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));
 }
 


More information about the svn-src-all mailing list