This could also be placed in alt_itlb_miss as the code
branches there. The code does seem to work when placed
in alt_itlb_miss. However I prefer the more minimal change.

Curiously, adding this code to dtlb_miss (or alt_dtlb_miss)
causes booting to fail.

Cc: Isaku Yamahata <[EMAIL PROTECTED]>
Cc: Tristan Gingold <[EMAIL PROTECTED]>
Cc: Alex Williamson <[EMAIL PROTECTED]>
Cc: Aron Griffis <[EMAIL PROTECTED]>
Signed-off-by: Simon Horman <[EMAIL PROTECTED]>

Index: 20071119-ia64/xen/arch/ia64/xen/ivt.S
===================================================================
--- 20071119-ia64.orig/xen/arch/ia64/xen/ivt.S  2007-11-25 22:44:12.000000000 
-0700
+++ 20071119-ia64/xen/arch/ia64/xen/ivt.S       2007-11-25 22:44:20.000000000 
-0700
@@ -135,14 +135,22 @@
        cmp.eq p8,p0=0x18,r17           // 0xc...
        cmp.eq p9,p0=0x1c,r17           // 0xe...
        ;;
-       cmp.eq.and p8,p0=r25,r23        // rr[6] == XEN_EFI_RID
-       cmp.eq.and p9,p0=r25,r24        // rr[7] == XEN_EFI_RID
-       ;;
-(p8)   br.cond.spnt late_alt_itlb_miss
-(p9)   br.cond.spnt late_alt_itlb_miss
+       cmp.ne.and p8,p0=r25,r23        // rr[6] == XEN_EFI_RID
+       cmp.ne.and p9,p0=r25,r24        // rr[7] == XEN_EFI_RID
        ;;
+(p8)   br.cond.spnt fast_tlb_miss_reflect
+(p9)   br.cond.spnt fast_tlb_miss_reflect
 
-       br.cond.spnt fast_tlb_miss_reflect
+       // 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

-- 

-- 
Horms


_______________________________________________
Xen-ia64-devel mailing list
[email protected]
http://lists.xensource.com/xen-ia64-devel

Reply via email to