Index: 20071119-ia64/xen/arch/ia64/xen/ivt.S
===================================================================
--- 20071119-ia64.orig/xen/arch/ia64/xen/ivt.S	2007-11-19 23:44:02.000000000 -0700
+++ 20071119-ia64/xen/arch/ia64/xen/ivt.S	2007-11-19 23:44:14.000000000 -0700
@@ -115,14 +115,24 @@
 	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
 	;;
-	extr.u r17=r16,59,5
+	br.cond.spnt branch_on_xen_memory
 	;;
-	/* 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
+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
 	;;
+	mov cr.itir=r20
+	;;
+	br.cond.sptk late_alt_itlb_miss
 END(itlb_miss)
 
 	.org ia64_ivt+0x0800
