[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] Fix ia64_reload_tr in mca_asm.S
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |