ia64/xen-unstable

changeset 16581:be02461e9810

[IA64] Fix TLB purge and reload for xen heap in MCA handler

Xen might panic when the TLB related MCA occurred because Xen
virtual address space moved to 0xf400000004000000.

The following patch fixes it.

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
author Alex Williamson <alex.williamson@hp.com>
date Wed Dec 12 10:47:54 2007 -0700 (2007-12-12)
parents 124f7a7f5f84
children d90dbf72049c
files xen/arch/ia64/linux-xen/mca_asm.S
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/mca_asm.S	Tue Dec 11 10:22:37 2007 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/mca_asm.S	Wed Dec 12 10:47:54 2007 -0700
     1.3 @@ -283,6 +283,19 @@ 4:
     1.4  	;;
     1.5  	srlz.d
     1.6  	;;
     1.7 +#ifdef XEN
     1.8 +	/* xen heap is identity mapped */
     1.9 +	mov r19=ip
    1.10 +	;; 
    1.11 +	dep r17=0,r19,0,KERNEL_TR_PAGE_SHIFT
    1.12 +	;; 
    1.13 +	dep r17=-1,r17,60,4
    1.14 +	;; 
    1.15 +	ptr.d r17,r18
    1.16 +	;;
    1.17 +	srlz.d
    1.18 +	;; 
    1.19 +#endif
    1.20  	// 2. Purge DTR for PERCPU data.
    1.21  	movl r16=PERCPU_ADDR
    1.22  	mov r18=PERCPU_PAGE_SHIFT<<2
    1.23 @@ -418,6 +431,18 @@ ia64_reload_tr:
    1.24  	srlz.i
    1.25  	srlz.d
    1.26  	;;
    1.27 +#ifdef XEN
    1.28 +	/* xen heap is identity mapped */
    1.29 +	mov r16=IA64_TR_XEN_HEAP_REGS  
    1.30 +	dep r17=-1,r17,60,4
    1.31 +	;; 
    1.32 +	mov cr.ifa=r17
    1.33 +	;;
    1.34 +	itr.d dtr[r16]=r18
    1.35 +	;;
    1.36 +	srlz.d
    1.37 +	;; 
    1.38 +#endif
    1.39  	// 2. Reload DTR register for PERCPU data.
    1.40  	GET_THIS_PADDR(r2, ia64_mca_per_cpu_pte)
    1.41  	;;