Index: kernel/arch/sparc64/include/mm/tlb.h
===================================================================
--- kernel/arch/sparc64/include/mm/tlb.h	(revision 201abde2f6d30f23f1aab2b46d1a55da556278f1)
+++ kernel/arch/sparc64/include/mm/tlb.h	(revision 4365d108fca11d735aaf46f7098b7f1d5c2cbb52)
@@ -429,7 +429,7 @@
 }
 
-extern void fast_instruction_access_mmu_miss(int n, istate_t *istate);
-extern void fast_data_access_mmu_miss(int n, istate_t *istate);
-extern void fast_data_access_protection(int n, istate_t *istate);
+extern void fast_instruction_access_mmu_miss(unative_t unused, istate_t *istate);
+extern void fast_data_access_mmu_miss(tlb_tag_access_reg_t tag, istate_t *istate);
+extern void fast_data_access_protection(tlb_tag_access_reg_t tag , istate_t *istate);
 
 extern void dtlb_insert_mapping(uintptr_t page, uintptr_t frame, int pagesize, bool locked, bool cacheable);
Index: kernel/arch/sparc64/include/trap/mmu.h
===================================================================
--- kernel/arch/sparc64/include/trap/mmu.h	(revision 201abde2f6d30f23f1aab2b46d1a55da556278f1)
+++ kernel/arch/sparc64/include/trap/mmu.h	(revision 4365d108fca11d735aaf46f7098b7f1d5c2cbb52)
@@ -130,5 +130,19 @@
 .endif
 
+	/*
+	 * Switch from the MM globals.
+	 */
 	wrpr %g0, PSTATE_PRIV_BIT | PSTATE_AG_BIT, %pstate
+
+	/*
+	 * Read the Tag Access register for the higher-level handler.
+	 * This is necessary to survive nested DTLB misses.
+	 */	
+	mov VA_DMMU_TAG_ACCESS, %g2
+	ldxa [%g2] ASI_DMMU, %g2
+
+	/*
+	 * g2 will be passed as an argument to fast_data_access_mmu_miss().
+	 */
 	PREEMPTIBLE_HANDLER fast_data_access_mmu_miss
 .endm
@@ -143,5 +157,19 @@
 .endif
 
+	/*
+	 * Switch from the MM globals.
+	 */
 	wrpr %g0, PSTATE_PRIV_BIT | PSTATE_AG_BIT, %pstate
+
+	/*
+	 * Read the Tag Access register for the higher-level handler.
+	 * This is necessary to survive nested DTLB misses.
+	 */	
+	mov VA_DMMU_TAG_ACCESS, %g2
+	ldxa [%g2] ASI_DMMU, %g2
+
+	/*
+	 * g2 will be passed as an argument to fast_data_access_mmu_miss().
+	 */
 	PREEMPTIBLE_HANDLER fast_data_access_protection
 .endm
