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-changelog

[Xen-changelog] [xen-unstable] [IA64] Fix ia64_reload_tr in mca_asm.S

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Fix ia64_reload_tr in mca_asm.S
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 01:10:58 -0800
Delivery-date: Wed, 23 Jan 2008 01:14:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1200596743 25200
# Node ID e8d933b33f4bc99dbd0c99cb94650a2be58bdb7a
# Parent  fd56e24b07c8f2435ea2875c7fd60932bcc5bc46
[IA64] Fix ia64_reload_tr in mca_asm.S

- DTR for stack comparison should be done with xen heap.
- cpu_kr current offset contains (physicall address >> IA64_GRANULE_SHIFT)
  so the comparison was done with the wrong value.
- When mapping VHPT area, overlapping should be avoided.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/linux-xen/mca_asm.S |   40 ++++++++++++++++++++++++++++++++++----
 1 files changed, 36 insertions(+), 4 deletions(-)

diff -r fd56e24b07c8 -r e8d933b33f4b xen/arch/ia64/linux-xen/mca_asm.S
--- a/xen/arch/ia64/linux-xen/mca_asm.S Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/arch/ia64/linux-xen/mca_asm.S Thu Jan 17 12:05:43 2008 -0700
@@ -479,14 +479,26 @@ ia64_reload_tr:
        ;;
        // 4. Reload DTR for stack.
 #ifdef XEN
-       // avoid overlapping with kernel TR
-       movl r17=KERNEL_START
+       // avoid overlapping with xenheap TR
+       mov r17=ip
+       ;;
+       tpa r17=r17
+       ;;
+       dep r17=0,r17,0,KERNEL_TR_PAGE_SHIFT
+       ;;
+       shr.u r17=r17,IA64_GRANULE_SHIFT
+       ;; 
        GET_THIS_PADDR(r2,cpu_kr);;
        add r2=IA64_KR_CURRENT_OFFSET,r2;;
        ld8 r16=[r2];;
        ;;
-       dep  r16=0,r16,0,KERNEL_TR_PAGE_SHIFT
-       ;;
+#if KERNEL_TR_PAGE_SHIFT < IA64_GRANULE_SHIFT
+# error "KERNEL_TR_PAGE_SHIFT < IA64_GRANULE_SHIFT shouldn't happen"
+#endif
+#if KERNEL_TR_PAGE_SHIFT > IA64_GRANULE_SHIFT
+       dep  r16=0,r16,0,KERNEL_TR_PAGE_SHIFT-IA64_GRANULE_SHIFT
+       ;;
+#endif
        cmp.eq p7,p0=r17,r16
 (p7)   br.cond.sptk    .reload_vhpt
        
@@ -522,6 +534,25 @@ ia64_reload_tr:
        // 5. VHPT
 #if VHPT_ENABLED
        GET_VA_VCPU_VHPT_MADDR(r2,r3);;
+       dep r3=0,r2,0,KERNEL_TR_PAGE_SHIFT
+       ;;
+       shr.u r3=r3,IA64_GRANULE_SHIFT
+       ;;
+       cmp.eq p7,p0=r3,r17
+(p7)   br.cond.sptk    .overlap_vhpt
+       ;;
+
+       // avoid overlapping with stack TR
+       shr.u r17=r2,IA64_GRANULE_SHIFT
+       GET_THIS_PADDR(r3, cpu_kr);;
+       add r3=IA64_KR_CURRENT_STACK_OFFSET,r3
+       ;;
+       ld8 r3=[r3]
+       ;;
+       cmp.eq p7,p0=r3,r17
+(p7)   br.cond.sptk    .overlap_vhpt
+       ;;
+
        dep r16=0,r2,0,IA64_GRANULE_SHIFT
        movl r20=PAGE_KERNEL
        ;;
@@ -538,6 +569,7 @@ ia64_reload_tr:
        ;;
        srlz.d
        ;;
+.overlap_vhpt:
 #endif
 #endif
        br.sptk.many done_tlb_purge_and_reload

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Fix ia64_reload_tr in mca_asm.S, Xen patchbot-unstable <=