ia64/xen-unstable

changeset 16752:40f15062d188

[IA64] vti fault handler clean up: make VMX_DBG_FAULT aware of fault in xen

When fault occurs in xen, r21 doesn't point to vcpu so it needs to be
retrieved from cpu_kr.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Fri Dec 14 13:12:17 2007 -0700 (2007-12-14)
parents ba569af64b44
children 81cee3aa9e90
files xen/arch/ia64/vmx/vmx_ivt.S
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmx_ivt.S	Fri Dec 14 13:09:02 2007 -0700
     1.2 +++ b/xen/arch/ia64/vmx/vmx_ivt.S	Fri Dec 14 13:12:17 2007 -0700
     1.3 @@ -72,12 +72,18 @@
     1.4  #ifdef VTI_DEBUG
     1.5  #define IVT_DEBUG_MASK  (IVT_DEBUG_SIZE * (IVT_DEBUG_MAX - 1))
     1.6  #define VMX_DBG_FAULT(i)                \
     1.7 +    mov r31=pr;                         \
     1.8 +    mov r20=cr.ipsr;;                   \
     1.9 +    tbit.z p6,p0=r20,IA64_PSR_VM_BIT;;  \
    1.10 +(p6)movl r21=THIS_CPU(cpu_kr)+          \
    1.11 +        IA64_KR_CURRENT_OFFSET;;        \
    1.12 +(p6)ld8 r21=[r21];                      \
    1.13 +    mov pr=r31;;                        \
    1.14      add r16=IVT_CUR_OFS,r21;            \
    1.15      add r17=IVT_DBG_OFS,r21;;           \
    1.16      ld8  r18=[r16];;                    \
    1.17      add r17=r18,r17;                    \
    1.18      mov r19=cr.iip;                     \
    1.19 -    mov r20=cr.ipsr;                    \
    1.20      mov r22=cr.ifa;                     \
    1.21      mov r23=i;;                         \
    1.22      st8 [r17]=r19,8;                    \