Index: 20071119-ia64/xen/arch/ia64/xen/ivt.S
===================================================================
--- 20071119-ia64.orig/xen/arch/ia64/xen/ivt.S	2007-11-25 22:03:47.000000000 -0700
+++ 20071119-ia64/xen/arch/ia64/xen/ivt.S	2007-11-25 22:05:34.000000000 -0700
@@ -65,7 +65,7 @@
 # define PSR_DEFAULT_BITS	0
 #endif
 
-#if 0
+#if 1
   /*
    * This lets you track the last eight faults that occurred on the CPU.
    * Make sure ar.k2 isn't needed for something else before enabling this...
@@ -196,24 +196,14 @@
 	DBG_FAULT(1)
 	mov r16 = cr.ifa
 	mov r31 = pr
-	/* If address belongs to VMM, go to alt tlb handler */
-	movl r26=itlb_miss_identity_map
-	movl r27=fast_tlb_miss_reflect
-	;;
-	br.cond.spnt branch_on_xen_memory
-	;;
-itlb_miss_identity_map:
-	/* EFI PAGE size is IA64_GRANULE_SIZE
-	 * itir's key should be 0, as should the reserved space
-	 * thus we can just set itir = (IA64_GRANULE_SHIFT << 2)
-	 */
-	movl r20=IA64_GRANULE_SHIFT
 	;;
-	shl r20=r20,2
+	extr.u r17=r16,59,5
 	;;
-	mov cr.itir=r20
+	/* If address belongs to VMM, go to alt tlb handler */
+	cmp.eq p6,p0=0x1e,r17
+(p6)	br.cond.spnt	late_alt_itlb_miss
+	br.cond.sptk fast_tlb_miss_reflect
 	;;
-	br.cond.sptk late_alt_itlb_miss
 END(itlb_miss)
 
 	.org ia64_ivt+0x0800
@@ -223,10 +213,14 @@
 	DBG_FAULT(2)
 	mov r16=cr.ifa			// get virtual address
 	mov r31=pr
-	movl r26=late_alt_dtlb_miss
-	movl r27=fast_tlb_miss_reflect
 	;;
-	br.cond.spnt branch_on_xen_memory
+	extr.u r17=r16,59,5
+	;;
+	/* If address belongs to VMM, go to alt tlb handler */
+	cmp.eq p6,p0=0x1e,r17
+(p6)	br.cond.spnt	late_alt_dtlb_miss
+	br.cond.sptk fast_tlb_miss_reflect
+	;;
 END(dtlb_miss)
 
 	.org ia64_ivt+0x0c00
