ia64/xen-unstable

changeset 16816:ff90abf572f2

[IA64] Fix thash long format crash

Do not overwrite r25 (and restore r24) for C fallback of vmx_asm_thash.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
author Alex Williamson <alex.williamson@hp.com>
date Fri Jan 18 14:11:20 2008 -0700 (2008-01-18)
parents 759a9fb42645
children 564fa97594a6
files xen/arch/ia64/vmx/optvfault.S
line diff
     1.1 --- a/xen/arch/ia64/vmx/optvfault.S	Fri Jan 18 14:09:04 2008 -0700
     1.2 +++ b/xen/arch/ia64/vmx/optvfault.S	Fri Jan 18 14:11:20 2008 -0700
     1.3 @@ -17,6 +17,7 @@
     1.4  #include <asm/vmx_vpd.h>
     1.5  #include <asm/vmx_pal_vsa.h>
     1.6  #include <asm/asm-offsets.h>
     1.7 +#include <asm/virt_event.h>
     1.8  #include <asm-ia64/vmx_mm_def.h>
     1.9  #include <asm-ia64/vmx_phy_mode.h>
    1.10  
    1.11 @@ -467,24 +468,26 @@ GLOBAL_ENTRY(vmx_asm_thash)
    1.12      ;;                                                     
    1.13  vmx_asm_thash_back1:
    1.14      shr.u r23=r19,61		// get RR number
    1.15 -    adds r25=VCPU_VRR0_OFS,r21	// get vcpu->arch.arch_vmx.vrr[0]'s addr
    1.16 +    adds r28=VCPU_VRR0_OFS,r21	// get vcpu->arch.arch_vmx.vrr[0]'s addr
    1.17      adds r16=IA64_VPD_VPTA_OFFSET,r16	// get virtual pta 
    1.18      ;;
    1.19 -    shladd r27=r23,3,r25	// get vcpu->arch.arch_vmx.vrr[r23]'s addr
    1.20 +    shladd r27=r23,3,r28	// get vcpu->arch.arch_vmx.vrr[r23]'s addr
    1.21      ld8 r17=[r16]		// get virtual PTA
    1.22      mov r26=1
    1.23      ;;
    1.24      extr.u r29=r17,2,6		// get pta.size
    1.25 -    ld8 r25=[r27]		// get vcpu->arch.arch_vmx.vrr[r23]'s value
    1.26 +    ld8 r28=[r27]		// get vcpu->arch.arch_vmx.vrr[r23]'s value
    1.27      ;;
    1.28      // Fall-back to C if VF (long format) is set
    1.29      tbit.nz p6,p0=r17,8
    1.30      mov b0=r24
    1.31 -    (p6) br.cond.dpnt.many vmx_virtualization_fault_back
    1.32 -    extr.u r25=r25,2,6		// get rr.ps
    1.33 +    ;;
    1.34 +(p6) mov r24=EVENT_THASH
    1.35 +(p6) br.cond.dpnt.many vmx_virtualization_fault_back
    1.36 +    extr.u r28=r28,2,6		// get rr.ps
    1.37      shl r22=r26,r29		// 1UL << pta.size
    1.38      ;;
    1.39 -    shr.u r23=r19,r25		// vaddr >> rr.ps
    1.40 +    shr.u r23=r19,r28		// vaddr >> rr.ps
    1.41      adds r26=3,r29		// pta.size + 3 
    1.42      shl r27=r17,3		// pta << 3 
    1.43      ;;