WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH] fix mca hander.

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] fix mca hander.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Wed, 20 Aug 2008 15:39:08 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Tue, 19 Aug 2008 23:36:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
[IA64] fix mca hander.

When reloading dtr[], itr[], overlapping must be avoided.
Add overlap check.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 28d6ce57b1ab xen/arch/ia64/linux-xen/mca_asm.S
--- a/xen/arch/ia64/linux-xen/mca_asm.S Wed Aug 13 13:26:18 2008 +0900
+++ b/xen/arch/ia64/linux-xen/mca_asm.S Wed Aug 13 15:59:09 2008 +0900
@@ -540,6 +540,17 @@
        ;;
        dep r17=0,r17,0,IA64_GRANULE_SHIFT
        ;;
+       
+       // avoid overlapping with stack
+       GET_THIS_PADDR(r2, cpu_kr);;
+       add r2=IA64_KR_CURRENT_STACK_OFFSET,r2
+       ;;
+       ld8 r19=[r2]
+       ;;
+       shl r19=r19,IA64_GRANULE_SHIFT
+       ;;
+       cmp.eq p0,p7=r17,r19
+
        movl r20=PAGE_KERNEL
        ;;
        or r17=r20,r17          // construct PA | page properties
@@ -552,7 +563,7 @@
        ;;
        itr.i itr[r16]=r17
        ;;
-       itr.d dtr[r18]=r17
+(p7)   itr.d dtr[r18]=r17
        ;;
        srlz.i
        ;;
@@ -567,24 +578,37 @@
        cmp.eq p7,p0=r2,r0
        ;;
 (p7)   br.cond.sptk    .overlap_vhpt   // vhpt isn't mapped.
+       
+       dep r16=0,r2,0,IA64_GRANULE_SHIFT
+       ;;
+       dep r17=0,r16,60,4              // physical address of
+                                       // va_vhpt & ~(IA64_GRANULE_SIZE - 1)
 
        // avoid overlapping with stack TR
-       dep r16=0,r2,0,IA64_GRANULE_SHIFT
-       ;;
        GET_THIS_PADDR(r2,cpu_kr);;
-       add r2=IA64_KR_CURRENT_OFFSET,r2
+       add r2=IA64_KR_CURRENT_STACK_OFFSET,r2
        ;;
        ld8 r2=[r2]
        ;;
-       dep r17=0,r2,0,IA64_GRANULE_SHIFT
-       ;; 
-       cmp.eq p7,p0=r16,r17
+       shl r18=r2,IA64_GRANULE_SHIFT
+       ;;
+       cmp.eq p7,p0=r17,r18
 (p7)   br.cond.sptk    .overlap_vhpt
+
+       // avoid overlapping with VPD
+       GET_THIS_PADDR(r2, inserted_vpd);;
+       ld8 r18=[r2]
+       ;;
+       dep r18=0,r18,60,4
+       ;;
+       dep r18=0,r18,0,IA64_GRANULE_SHIFT
+       ;;
+       cmp.eq p7,p0=r17,r18
+(p7)   br.cond.sptk    .overlap_vhpt
+
        movl r20=PAGE_KERNEL
        ;;
        mov r18=IA64_TR_VHPT
-       dep r17=0,r16,60,4              // physical address of
-                                       // va_vhpt & ~(IA64_GRANULE_SIZE - 1)
        mov r19=IA64_GRANULE_SHIFT<<2
        ;;
        or r17=r17,r20                  // construct PA | page properties

Attachment: mca-fix.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] fix mca hander., Isaku Yamahata <=