--- old/usr/src/uts/sfmmu/vm/hat_sfmmu.c	2015-05-08 18:10:40.843211648 -0400
+++ new/usr/src/uts/sfmmu/vm/hat_sfmmu.c	2015-05-08 18:10:40.850699743 -0400
@@ -81,7 +81,6 @@
 #include <sys/mem_config.h>
 #include <sys/mem_cage.h>
 #include <vm/vm_dep.h>
-#include <vm/xhat_sfmmu.h>
 #include <sys/fpu/fpusystm.h>
 #include <vm/mach_kpm.h>
 #include <sys/callb.h>
@@ -1350,8 +1349,6 @@
 	}
 #endif
 
-	(void) xhat_init();
-
 	uhme_hash_pa = va_to_pa(uhme_hash);
 	khme_hash_pa = va_to_pa(khme_hash);
 
@@ -1539,7 +1536,6 @@
 	sfmmup->sfmmu_free = 0;
 	sfmmup->sfmmu_rmstat = 0;
 	sfmmup->sfmmu_clrbin = sfmmup->sfmmu_clrstart;
-	sfmmup->sfmmu_xhat_provider = NULL;
 	cv_init(&sfmmup->sfmmu_tsb_cv, NULL, CV_DEFAULT, NULL);
 	sfmmup->sfmmu_srdp = NULL;
 	SF_RGNMAP_ZERO(sfmmup->sfmmu_region_map);
@@ -1919,7 +1915,6 @@
 {
 	ASSERT(AS_WRITE_HELD(sfmmup->sfmmu_as, &sfmmup->sfmmu_as->a_lock));
 	ASSERT(sfmmup != ksfmmup);
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
 
 	sfmmup->sfmmu_free = 1;
 	if (sfmmup->sfmmu_scdp != NULL) {
@@ -1934,7 +1929,6 @@
 {
 	int i;
 
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
 	ASSERT(sfmmup->sfmmu_free == 1);
 	ASSERT(sfmmup->sfmmu_ttecnt[TTE8K] == 0);
 	ASSERT(sfmmup->sfmmu_ttecnt[TTE64K] == 0);
@@ -1976,153 +1970,6 @@
 }
 
 /*
- * Set up any translation structures, for the specified address space,
- * that are needed or preferred when the process is being swapped in.
- */
-/* ARGSUSED */
-void
-hat_swapin(struct hat *hat)
-{
-	ASSERT(hat->sfmmu_xhat_provider == NULL);
-}
-
-/*
- * Free all of the translation resources, for the specified address space,
- * that can be freed while the process is swapped out. Called from as_swapout.
- * Also, free up the ctx that this process was using.
- */
-void
-hat_swapout(struct hat *sfmmup)
-{
-	struct hmehash_bucket *hmebp;
-	struct hme_blk *hmeblkp;
-	struct hme_blk *pr_hblk = NULL;
-	struct hme_blk *nx_hblk;
-	int i;
-	struct hme_blk *list = NULL;
-	hatlock_t *hatlockp;
-	struct tsb_info *tsbinfop;
-	struct free_tsb {
-		struct free_tsb *next;
-		struct tsb_info *tsbinfop;
-	};			/* free list of TSBs */
-	struct free_tsb *freelist, *last, *next;
-
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
-	SFMMU_STAT(sf_swapout);
-
-	/*
-	 * There is no way to go from an as to all its translations in sfmmu.
-	 * Here is one of the times when we take the big hit and traverse
-	 * the hash looking for hme_blks to free up.  Not only do we free up
-	 * this as hme_blks but all those that are free.  We are obviously
-	 * swapping because we need memory so let's free up as much
-	 * as we can.
-	 *
-	 * Note that we don't flush TLB/TSB here -- it's not necessary
-	 * because:
-	 *  1) we free the ctx we're using and throw away the TSB(s);
-	 *  2) processes aren't runnable while being swapped out.
-	 */
-	ASSERT(sfmmup != KHATID);
-	for (i = 0; i <= UHMEHASH_SZ; i++) {
-		hmebp = &uhme_hash[i];
-		SFMMU_HASH_LOCK(hmebp);
-		hmeblkp = hmebp->hmeblkp;
-		pr_hblk = NULL;
-		while (hmeblkp) {
-
-			ASSERT(!hmeblkp->hblk_xhat_bit);
-
-			if ((hmeblkp->hblk_tag.htag_id == sfmmup) &&
-			    !hmeblkp->hblk_shw_bit && !hmeblkp->hblk_lckcnt) {
-				ASSERT(!hmeblkp->hblk_shared);
-				(void) sfmmu_hblk_unload(sfmmup, hmeblkp,
-				    (caddr_t)get_hblk_base(hmeblkp),
-				    get_hblk_endaddr(hmeblkp),
-				    NULL, HAT_UNLOAD);
-			}
-			nx_hblk = hmeblkp->hblk_next;
-			if (!hmeblkp->hblk_vcnt && !hmeblkp->hblk_hmecnt) {
-				ASSERT(!hmeblkp->hblk_lckcnt);
-				sfmmu_hblk_hash_rm(hmebp, hmeblkp, pr_hblk,
-				    &list, 0);
-			} else {
-				pr_hblk = hmeblkp;
-			}
-			hmeblkp = nx_hblk;
-		}
-		SFMMU_HASH_UNLOCK(hmebp);
-	}
-
-	sfmmu_hblks_list_purge(&list, 0);
-
-	/*
-	 * Now free up the ctx so that others can reuse it.
-	 */
-	hatlockp = sfmmu_hat_enter(sfmmup);
-
-	sfmmu_invalidate_ctx(sfmmup);
-
-	/*
-	 * Free TSBs, but not tsbinfos, and set SWAPPED flag.
-	 * If TSBs were never swapped in, just return.
-	 * This implies that we don't support partial swapping
-	 * of TSBs -- either all are swapped out, or none are.
-	 *
-	 * We must hold the HAT lock here to prevent racing with another
-	 * thread trying to unmap TTEs from the TSB or running the post-
-	 * relocator after relocating the TSB's memory.  Unfortunately, we
-	 * can't free memory while holding the HAT lock or we could
-	 * deadlock, so we build a list of TSBs to be freed after marking
-	 * the tsbinfos as swapped out and free them after dropping the
-	 * lock.
-	 */
-	if (SFMMU_FLAGS_ISSET(sfmmup, HAT_SWAPPED)) {
-		sfmmu_hat_exit(hatlockp);
-		return;
-	}
-
-	SFMMU_FLAGS_SET(sfmmup, HAT_SWAPPED);
-	last = freelist = NULL;
-	for (tsbinfop = sfmmup->sfmmu_tsb; tsbinfop != NULL;
-	    tsbinfop = tsbinfop->tsb_next) {
-		ASSERT((tsbinfop->tsb_flags & TSB_SWAPPED) == 0);
-
-		/*
-		 * Cast the TSB into a struct free_tsb and put it on the free
-		 * list.
-		 */
-		if (freelist == NULL) {
-			last = freelist = (struct free_tsb *)tsbinfop->tsb_va;
-		} else {
-			last->next = (struct free_tsb *)tsbinfop->tsb_va;
-			last = last->next;
-		}
-		last->next = NULL;
-		last->tsbinfop = tsbinfop;
-		tsbinfop->tsb_flags |= TSB_SWAPPED;
-		/*
-		 * Zero out the TTE to clear the valid bit.
-		 * Note we can't use a value like 0xbad because we want to
-		 * ensure diagnostic bits are NEVER set on TTEs that might
-		 * be loaded.  The intent is to catch any invalid access
-		 * to the swapped TSB, such as a thread running with a valid
-		 * context without first calling sfmmu_tsb_swapin() to
-		 * allocate TSB memory.
-		 */
-		tsbinfop->tsb_tte.ll = 0;
-	}
-
-	/* Now we can drop the lock and free the TSB memory. */
-	sfmmu_hat_exit(hatlockp);
-	for (; freelist != NULL; freelist = next) {
-		next = freelist->next;
-		sfmmu_tsb_free(freelist->tsbinfop);
-	}
-}
-
-/*
  * Duplicate the translations of an as into another newas
  */
 /* ARGSUSED */
@@ -2135,7 +1982,6 @@
 	int i;
 	extern uint_t get_color_start(struct as *);
 
-	ASSERT(hat->sfmmu_xhat_provider == NULL);
 	ASSERT((flag == 0) || (flag == HAT_DUP_ALL) || (flag == HAT_DUP_COW) ||
 	    (flag == HAT_DUP_SRD));
 	ASSERT(hat != ksfmmup);
@@ -2205,8 +2051,7 @@
 	uint_t attr, uint_t flags, hat_region_cookie_t rcookie)
 {
 	uint_t rid;
-	if (rcookie == HAT_INVALID_REGION_COOKIE ||
-	    hat->sfmmu_xhat_provider != NULL) {
+	if (rcookie == HAT_INVALID_REGION_COOKIE) {
 		hat_do_memload(hat, addr, pp, attr, flags,
 		    SFMMU_INVALID_SHMERID);
 		return;
@@ -2240,13 +2085,6 @@
 		    (void *)pp);
 	}
 
-	if (hat->sfmmu_xhat_provider) {
-		/* no regions for xhats */
-		ASSERT(!SFMMU_IS_SHMERID_VALID(rid));
-		XHAT_MEMLOAD(hat, addr, pp, attr, flags);
-		return;
-	}
-
 	ASSERT((hat == ksfmmup) ||
 	    AS_LOCK_HELD(hat->sfmmu_as, &hat->sfmmu_as->a_lock));
 
@@ -2296,11 +2134,6 @@
 
 	ASSERT(hat != NULL);
 
-	if (hat->sfmmu_xhat_provider) {
-		XHAT_DEVLOAD(hat, addr, len, pfn, attr, flags);
-		return;
-	}
-
 	ASSERT(!(flags & ~SFMMU_LOAD_ALLFLAG));
 	ASSERT(!(attr & ~SFMMU_LOAD_ALLATTR));
 	ASSERT((hat == ksfmmup) ||
@@ -2447,8 +2280,7 @@
 	hat_region_cookie_t rcookie)
 {
 	uint_t rid;
-	if (rcookie == HAT_INVALID_REGION_COOKIE ||
-	    hat->sfmmu_xhat_provider != NULL) {
+	if (rcookie == HAT_INVALID_REGION_COOKIE) {
 		hat_do_memload_array(hat, addr, len, pps, attr, flags,
 		    SFMMU_INVALID_SHMERID);
 		return;
@@ -2483,12 +2315,6 @@
 	ASSERT(!((uintptr_t)addr & MMU_PAGEOFFSET));
 	SFMMU_VALIDATE_HMERID(hat, rid, addr, len);
 
-	if (hat->sfmmu_xhat_provider) {
-		ASSERT(!SFMMU_IS_SHMERID_VALID(rid));
-		XHAT_MEMLOAD_ARRAY(hat, addr, len, pps, attr, flags);
-		return;
-	}
-
 	if (hat->sfmmu_rmstat)
 		hat_resvstat(len, hat->sfmmu_as, addr);
 
@@ -3971,7 +3797,6 @@
 	caddr_t endaddr;
 
 	ASSERT(sfmmup != NULL);
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
 
 	ASSERT((sfmmup == ksfmmup) ||
 	    AS_LOCK_HELD(sfmmup->sfmmu_as, &sfmmup->sfmmu_as->a_lock));
@@ -4056,7 +3881,6 @@
 	}
 
 	ASSERT(sfmmup != NULL);
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
 	ASSERT(sfmmup != ksfmmup);
 
 	srdp = sfmmup->sfmmu_srdp;
@@ -4768,7 +4592,6 @@
 	tte_t tte;
 
 	ASSERT(sfmmup != NULL);
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
 
 	ASSERT((sfmmup == ksfmmup) ||
 	    AS_LOCK_HELD(sfmmup->sfmmu_as, &sfmmup->sfmmu_as->a_lock));
@@ -4793,8 +4616,6 @@
 {
 	tte_t tte;
 
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
-
 	if (sfmmup == ksfmmup) {
 		if (sfmmu_vatopfn(addr, sfmmup, &tte) == PFN_INVALID) {
 			return (-1);
@@ -4814,8 +4635,6 @@
 {
 	tte_t tte;
 
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
-
 	if (sfmmup == ksfmmup) {
 		if (sfmmu_vatopfn(addr, sfmmup, &tte) == PFN_INVALID) {
 			tte.ll = 0;
@@ -4839,19 +4658,7 @@
 void
 hat_setattr(struct hat *hat, caddr_t addr, size_t len, uint_t attr)
 {
-	if (hat->sfmmu_xhat_provider) {
-		XHAT_SETATTR(hat, addr, len, attr);
-		return;
-	} else {
-		/*
-		 * This must be a CPU HAT. If the address space has
-		 * XHATs attached, change attributes for all of them,
-		 * just in case
-		 */
-		ASSERT(hat->sfmmu_as != NULL);
-		if (hat->sfmmu_as->a_xhat != NULL)
-			xhat_setattr_all(hat->sfmmu_as, addr, len, attr);
-	}
+	ASSERT(hat->sfmmu_as != NULL);
 
 	sfmmu_chgattr(hat, addr, len, attr, SFMMU_SETATTR);
 }
@@ -4863,19 +4670,7 @@
 void
 hat_chgattr(struct hat *hat, caddr_t addr, size_t len, uint_t attr)
 {
-	if (hat->sfmmu_xhat_provider) {
-		XHAT_CHGATTR(hat, addr, len, attr);
-		return;
-	} else {
-		/*
-		 * This must be a CPU HAT. If the address space has
-		 * XHATs attached, change attributes for all of them,
-		 * just in case
-		 */
-		ASSERT(hat->sfmmu_as != NULL);
-		if (hat->sfmmu_as->a_xhat != NULL)
-			xhat_chgattr_all(hat->sfmmu_as, addr, len, attr);
-	}
+	ASSERT(hat->sfmmu_as != NULL);
 
 	sfmmu_chgattr(hat, addr, len, attr, SFMMU_CHGATTR);
 }
@@ -4886,19 +4681,7 @@
 void
 hat_clrattr(struct hat *hat, caddr_t addr, size_t len, uint_t attr)
 {
-	if (hat->sfmmu_xhat_provider) {
-		XHAT_CLRATTR(hat, addr, len, attr);
-		return;
-	} else {
-		/*
-		 * This must be a CPU HAT. If the address space has
-		 * XHATs attached, change attributes for all of them,
-		 * just in case
-		 */
-		ASSERT(hat->sfmmu_as != NULL);
-		if (hat->sfmmu_as->a_xhat != NULL)
-			xhat_clrattr_all(hat->sfmmu_as, addr, len, attr);
-	}
+	ASSERT(hat->sfmmu_as != NULL);
 
 	sfmmu_chgattr(hat, addr, len, attr, SFMMU_CLRATTR);
 }
@@ -5251,19 +5034,7 @@
 	ASSERT((len & MMU_PAGEOFFSET) == 0);
 	ASSERT(((uintptr_t)addr & MMU_PAGEOFFSET) == 0);
 
-	if (sfmmup->sfmmu_xhat_provider) {
-		XHAT_CHGPROT(sfmmup, addr, len, vprot);
-		return;
-	} else {
-		/*
-		 * This must be a CPU HAT. If the address space has
-		 * XHATs attached, change attributes for all of them,
-		 * just in case
-		 */
-		ASSERT(sfmmup->sfmmu_as != NULL);
-		if (sfmmup->sfmmu_as->a_xhat != NULL)
-			xhat_chgprot_all(sfmmup->sfmmu_as, addr, len, vprot);
-	}
+	ASSERT(sfmmup->sfmmu_as != NULL);
 
 	CPUSET_ZERO(cpuset);
 
@@ -5698,20 +5469,7 @@
 	int issegkmap = ISSEGKMAP(sfmmup, addr);
 	demap_range_t dmr, *dmrp;
 
-	if (sfmmup->sfmmu_xhat_provider) {
-		XHAT_UNLOAD_CALLBACK(sfmmup, addr, len, flags, callback);
-		return;
-	} else {
-		/*
-		 * This must be a CPU HAT. If the address space has
-		 * XHATs attached, unload the mappings for all of them,
-		 * just in case
-		 */
-		ASSERT(sfmmup->sfmmu_as != NULL);
-		if (sfmmup->sfmmu_as->a_xhat != NULL)
-			xhat_unload_callback_all(sfmmup->sfmmu_as, addr,
-			    len, flags, callback);
-	}
+	ASSERT(sfmmup->sfmmu_as != NULL);
 
 	ASSERT((sfmmup == ksfmmup) || (flags & HAT_UNLOAD_OTHER) || \
 	    AS_LOCK_HELD(sfmmup->sfmmu_as, &sfmmup->sfmmu_as->a_lock));
@@ -5988,10 +5746,6 @@
 void
 hat_unload(struct hat *sfmmup, caddr_t addr, size_t len, uint_t flags)
 {
-	if (sfmmup->sfmmu_xhat_provider) {
-		XHAT_UNLOAD(sfmmup, addr, len, flags);
-		return;
-	}
 	hat_unload_callback(sfmmup, addr, len, flags, NULL);
 }
 
@@ -6331,7 +6085,6 @@
 	caddr_t endaddr;
 	cpuset_t cpuset;
 
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
 	ASSERT((sfmmup == ksfmmup) ||
 	    AS_LOCK_HELD(sfmmup->sfmmu_as, &sfmmup->sfmmu_as->a_lock));
 	ASSERT((len & MMU_PAGEOFFSET) == 0);
@@ -7138,14 +6891,11 @@
 #endif
 	cpuset_t cpuset, tset;
 	int index, cons;
-	int xhme_blks;
 	int pa_hments;
 
 	ASSERT(PAGE_EXCL(pp));
 
-retry_xhat:
 	tmphme = NULL;
-	xhme_blks = 0;
 	pa_hments = 0;
 	CPUSET_ZERO(cpuset);
 
@@ -7177,16 +6927,6 @@
 		}
 
 		hmeblkp = sfmmu_hmetohblk(sfhme);
-		if (hmeblkp->hblk_xhat_bit) {
-			struct xhat_hme_blk *xblk =
-			    (struct xhat_hme_blk *)hmeblkp;
-
-			(void) XHAT_PAGEUNLOAD(xblk->xhat_hme_blk_hat,
-			    pp, forceflag, XBLK2PROVBLK(xblk));
-
-			xhme_blks = 1;
-			continue;
-		}
 
 		/*
 		 * If there are kernel mappings don't unload them, they will
@@ -7223,7 +6963,7 @@
 	 * we were called from hat_page_relocate() in which case we
 	 * leave the locked mappings which will be suspended later.
 	 */
-	ASSERT(!PP_ISMAPPED(origpp) || xhme_blks || pa_hments ||
+	ASSERT(!PP_ISMAPPED(origpp) || pa_hments ||
 	    (forceflag == SFMMU_KERNEL_RELOC));
 
 #ifdef VAC
@@ -7258,22 +6998,11 @@
 			}
 		}
 
-		ASSERT(!PP_ISMAPPED(origpp) || xhme_blks);
+		ASSERT(!PP_ISMAPPED(origpp));
 	}
 
 	sfmmu_mlist_exit(pml);
 
-	/*
-	 * XHAT may not have finished unloading pages
-	 * because some other thread was waiting for
-	 * mlist lock and XHAT_PAGEUNLOAD let it do
-	 * the job.
-	 */
-	if (xhme_blks) {
-		pp = origpp;
-		goto retry_xhat;
-	}
-
 	return (0);
 }
 
@@ -7554,8 +7283,6 @@
 		 * reach the range we are seeking, just ignore it.
 		 */
 		hmeblkp = sfmmu_hmetohblk(sfhme);
-		if (hmeblkp->hblk_xhat_bit)
-			continue;
 
 		if (hme_size(sfhme) < cons)
 			continue;
@@ -7715,12 +7442,6 @@
 	sfmmu_copytte(&sfhme->hme_tte, &tte);
 	if (TTE_IS_VALID(&tte) && TTE_IS_WRITABLE(&tte)) {
 		hmeblkp = sfmmu_hmetohblk(sfhme);
-
-		/*
-		 * xhat mappings should never be to a VMODSORT page.
-		 */
-		ASSERT(hmeblkp->hblk_xhat_bit == 0);
-
 		sfmmup = hblktosfmmu(hmeblkp);
 		addr = tte_to_vaddr(hmeblkp, tte);
 
@@ -7985,8 +7706,6 @@
 	 * the as lock.
 	 */
 
-	ASSERT(hat->sfmmu_xhat_provider == NULL);
-
 	if (hat == ksfmmup) {
 		if (IS_KMEM_VA_LARGEPAGE(addr)) {
 			ASSERT(segkmem_lpszc > 0);
@@ -8170,7 +7889,6 @@
 hat_map(struct hat *hat, caddr_t addr, size_t len, uint_t flags)
 {
 	ASSERT(hat != NULL);
-	ASSERT(hat->sfmmu_xhat_provider == NULL);
 }
 
 /*
@@ -8263,14 +7981,6 @@
 		}
 
 		hmeblkp = sfmmu_hmetohblk(sfhme);
-		if (hmeblkp->hblk_xhat_bit) {
-			cnt++;
-			if (cnt > sh_thresh) {
-				sfmmu_mlist_exit(pml);
-				return (1);
-			}
-			continue;
-		}
 		if (hme_size(sfhme) != sz) {
 			continue;
 		}
@@ -8385,10 +8095,6 @@
 			if (hme_size(sfhme) != sz) {
 				continue;
 			}
-			if (hmeblkp->hblk_xhat_bit) {
-				cmn_err(CE_PANIC,
-				    "hat_page_demote: xhat hmeblk");
-			}
 			tset = sfmmu_pageunload(rootpp, sfhme, sz);
 			CPUSET_OR(cpuset, tset);
 		}
@@ -8516,8 +8222,6 @@
 	if (hat == NULL)
 		return (0);
 
-	ASSERT(hat->sfmmu_xhat_provider == NULL);
-
 	for (i = 0; i < mmu_page_sizes; i++)
 		assize += ((pgcnt_t)hat->sfmmu_ttecnt[i] +
 		    (pgcnt_t)hat->sfmmu_scdrttecnt[i]) * TTEBYTES(i);
@@ -8537,8 +8241,6 @@
 {
 	hatlock_t	*hatlockp;
 
-	ASSERT(hat->sfmmu_xhat_provider == NULL);
-
 	hatlockp = sfmmu_hat_enter(hat);
 	hat->sfmmu_rmstat++;
 	sfmmu_hat_exit(hatlockp);
@@ -8550,8 +8252,6 @@
 {
 	hatlock_t	*hatlockp;
 
-	ASSERT(hat->sfmmu_xhat_provider == NULL);
-
 	hatlockp = sfmmu_hat_enter(hat);
 	hat->sfmmu_rmstat--;
 	sfmmu_hat_exit(hatlockp);
@@ -8653,8 +8353,6 @@
 	if (!ISM_ALIGNED(ismshift, len))
 		return (EINVAL);
 
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
-
 	/*
 	 * Allocate ism_ment for the ism_hat's mapping list, and an
 	 * ism map blk in case we need one.  We must do our
@@ -8866,19 +8564,7 @@
 	ASSERT(sfmmup != NULL);
 	ASSERT(sfmmup != ksfmmup);
 
-	if (sfmmup->sfmmu_xhat_provider) {
-		XHAT_UNSHARE(sfmmup, addr, len);
-		return;
-	} else {
-		/*
-		 * This must be a CPU HAT. If the address space has
-		 * XHATs attached, inform all XHATs that ISM segment
-		 * is going away
-		 */
-		ASSERT(sfmmup->sfmmu_as != NULL);
-		if (sfmmup->sfmmu_as->a_xhat != NULL)
-			xhat_unshare_all(sfmmup->sfmmu_as, addr, len);
-	}
+	ASSERT(sfmmup->sfmmu_as != NULL);
 
 	/*
 	 * Make sure that during the entire time ISM mappings are removed,
@@ -9332,8 +9018,6 @@
 		if (IS_PAHME(sfhmep))
 			continue;
 		hmeblkp = sfmmu_hmetohblk(sfhmep);
-		if (hmeblkp->hblk_xhat_bit)
-			continue;
 		tmphat = hblktosfmmu(hmeblkp);
 		sfmmu_copytte(&sfhmep->hme_tte, &tte);
 		ASSERT(TTE_IS_VALID(&tte));
@@ -9360,8 +9044,6 @@
 		if (IS_PAHME(sfhmep))
 			continue;
 		hmeblkp = sfmmu_hmetohblk(sfhmep);
-		if (hmeblkp->hblk_xhat_bit)
-			continue;
 		ASSERT(!hmeblkp->hblk_shared);
 		(void) sfmmu_pageunload(pp, sfhmep, TTE8K);
 	}
@@ -9509,8 +9191,6 @@
 			if (IS_PAHME(sfhme))
 				continue;
 			hmeblkp = sfmmu_hmetohblk(sfhme);
-			if (hmeblkp->hblk_xhat_bit)
-				continue;
 
 			sfmmu_copytte(&sfhme->hme_tte, &tte);
 			ASSERT(TTE_IS_VALID(&tte));
@@ -9658,9 +9338,6 @@
 			continue;
 		hmeblkp = sfmmu_hmetohblk(sfhme);
 
-		if (hmeblkp->hblk_xhat_bit)
-			continue;
-
 		sfmmu_copytte(&sfhme->hme_tte, &tte);
 		ASSERT(TTE_IS_VALID(&tte));
 		vaddr = tte_to_vaddr(hmeblkp, tte);
@@ -9996,7 +9673,7 @@
 
 /*
  * Replace the specified TSB with a new TSB.  This function gets called when
- * we grow, shrink or swapin a TSB.  When swapping in a TSB (TSB_SWAPIN), the
+ * we grow, or shrink a TSB.  When swapping in a TSB (TSB_SWAPIN), the
  * TSB_FORCEALLOC flag may be used to force allocation of a minimum-sized TSB
  * (8K).
  *
@@ -13408,7 +13085,6 @@
 hat_softlock(struct hat *hat, caddr_t addr, size_t *lenp, page_t **ppp,
     uint_t flags)
 {
-	ASSERT(hat->sfmmu_xhat_provider == NULL);
 	return (FC_NOSUPPORT);
 }
 
@@ -13443,8 +13119,6 @@
 		if (IS_PAHME(sfhmep))
 			continue;
 		hmeblkp = sfmmu_hmetohblk(sfhmep);
-		if (hmeblkp->hblk_xhat_bit)
-			continue;
 		if (hme_size(sfhmep) == ttesz) {
 			/*
 			 * another mapping of the same size. don't clear index.
@@ -14029,7 +13703,6 @@
 		return (HAT_INVALID_REGION_COOKIE);
 	}
 
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
 	ASSERT(sfmmup != ksfmmup);
 	ASSERT(AS_WRITE_HELD(sfmmup->sfmmu_as, &sfmmup->sfmmu_as->a_lock));
 	ASSERT(srdp->srd_refcnt > 0);
@@ -14336,12 +14009,6 @@
 	ASSERT(!(rgnp->rgn_flags & SFMMU_REGION_FREE));
 	ASSERT(AS_LOCK_HELD(sfmmup->sfmmu_as, &sfmmup->sfmmu_as->a_lock));
 
-	ASSERT(sfmmup->sfmmu_xhat_provider == NULL);
-	if (r_type == SFMMU_REGION_HME && sfmmup->sfmmu_as->a_xhat != NULL) {
-		xhat_unload_callback_all(sfmmup->sfmmu_as, rgnp->rgn_saddr,
-		    rgnp->rgn_size, 0, NULL);
-	}
-
 	if (sfmmup->sfmmu_free) {
 		ulong_t rttecnt;
 		r_pgszc = rgnp->rgn_pgszc;
