ia64/xen-unstable

changeset 9274:bbfbb9e09b55

[IA64] remaining privified insns removed

Privified insns replaced by hyperprivops.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Thu Mar 16 12:20:59 2006 -0700 (2006-03-16)
parents cd15ba9aa1cc
children e3aa5b2387ac
files linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S	Thu Mar 16 12:19:08 2006 -0700
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S	Thu Mar 16 12:20:59 2006 -0700
     1.3 @@ -254,7 +254,6 @@ 1:	movl r11=XSI_PSR_IC
     1.4  	st8 [r11]=r10
     1.5  	;;
     1.6  	br.ret.sptk.many rp
     1.7 -	;;
     1.8  END(xen_set_rr)
     1.9  
    1.10  GLOBAL_ENTRY(xen_fc)
    1.11 @@ -264,7 +263,16 @@ GLOBAL_ENTRY(xen_fc)
    1.12  (p7)	fc r32;;
    1.13  (p7)	br.ret.sptk.many rp
    1.14  	;;
    1.15 -	ptc.e r96		// this is a "privified" fc r32
    1.16 +	movl r9=XSI_PSR_IC
    1.17 +	mov r8=r32
    1.18 +	;;
    1.19 +	ld8 r10=[r9]
    1.20 +	;;
    1.21 +	st8 [r9]=r0
    1.22 +	;;
    1.23 +	XEN_HYPER_FC
    1.24 +	;;
    1.25 +	st8 [r9]=r10
    1.26  	;;
    1.27  	br.ret.sptk.many rp
    1.28  END(xen_fc)
    1.29 @@ -276,7 +284,16 @@ GLOBAL_ENTRY(xen_get_cpuid)
    1.30  (p7)	mov r8=cpuid[r32];;
    1.31  (p7)	br.ret.sptk.many rp
    1.32  	;;
    1.33 -	mov r72=rr[r32]		// this is a "privified" mov r8=cpuid[r32]
    1.34 +	movl r9=XSI_PSR_IC
    1.35 +	mov r8=r32
    1.36 +	;;
    1.37 +	ld8 r10=[r9]
    1.38 +	;;
    1.39 +	st8 [r9]=r0
    1.40 +	;;
    1.41 +	XEN_HYPER_GET_CPUID
    1.42 +	;;
    1.43 +	st8 [r9]=r10
    1.44  	;;
    1.45  	br.ret.sptk.many rp
    1.46  END(xen_get_cpuid)
    1.47 @@ -288,7 +305,16 @@ GLOBAL_ENTRY(xen_get_pmd)
    1.48  (p7)	mov r8=pmd[r32];;
    1.49  (p7)	br.ret.sptk.many rp
    1.50  	;;
    1.51 -	mov r72=pmc[r32] 	// this is a "privified" mov r8=pmd[r32]
    1.52 +	movl r9=XSI_PSR_IC
    1.53 +	mov r8=r32
    1.54 +	;;
    1.55 +	ld8 r10=[r9]
    1.56 +	;;
    1.57 +	st8 [r9]=r0
    1.58 +	;;
    1.59 +	XEN_HYPER_GET_PMD
    1.60 +	;;
    1.61 +	st8 [r9]=r10
    1.62  	;;
    1.63  	br.ret.sptk.many rp
    1.64  END(xen_get_pmd)
    1.65 @@ -301,10 +327,20 @@ GLOBAL_ENTRY(xen_get_eflag)
    1.66  (p7)	mov r8=ar24;;
    1.67  (p7)	br.ret.sptk.many rp
    1.68  	;;
    1.69 -	mov ar24=r72		// this is a "privified" mov r8=ar.eflg
    1.70 +	movl r9=XSI_PSR_IC
    1.71 +	mov r8=r32
    1.72 +	;;
    1.73 +	ld8 r10=[r9]
    1.74 +	;;
    1.75 +	st8 [r9]=r0
    1.76 +	;;
    1.77 +	XEN_HYPER_GET_EFLAG
    1.78 +	;;
    1.79 +	st8 [r9]=r10
    1.80  	;;
    1.81  	br.ret.sptk.many rp
    1.82  END(xen_get_eflag)
    1.83 +	
    1.84  // some bits aren't set if pl!=0, see SDM vol1 3.1.8
    1.85  GLOBAL_ENTRY(xen_set_eflag)
    1.86  	movl r8=running_on_xen;;
    1.87 @@ -313,11 +349,17 @@ GLOBAL_ENTRY(xen_set_eflag)
    1.88  (p7)	mov ar24=r32
    1.89  (p7)	br.ret.sptk.many rp
    1.90  	;;
    1.91 -	// FIXME: this remains no-op'd because it generates
    1.92 -	// a privileged register (general exception) trap rather than
    1.93 -	// a privileged operation fault
    1.94 -	//mov ar24=r32
    1.95 +	movl r9=XSI_PSR_IC
    1.96 +	mov r8=r32
    1.97 +	;;
    1.98 +	ld8 r10=[r9]
    1.99 +	;;
   1.100 +	st8 [r9]=r0
   1.101 +	;;
   1.102 +	XEN_HYPER_SET_EFLAG
   1.103 +	;;
   1.104 +	st8 [r9]=r10
   1.105  	;;
   1.106  	br.ret.sptk.many rp
   1.107 -END(xen_get_eflag)
   1.108 +END(xen_set_eflag)
   1.109  #endif
     2.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S	Thu Mar 16 12:19:08 2006 -0700
     2.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S	Thu Mar 16 12:20:59 2006 -0700
     2.3 @@ -723,16 +723,12 @@ ENTRY(dirty_bit)
     2.4  	movl r30=1f				// load continuation point in case of nested fault
     2.5  	;;
     2.6  #ifdef CONFIG_XEN
     2.7 -#if 1
     2.8  	mov r18=r8;
     2.9  	mov r8=r16;
    2.10  	XEN_HYPER_THASH;;
    2.11  	mov r17=r8;
    2.12  	mov r8=r18;;
    2.13  #else
    2.14 -	tak r17=r80				// "privified" thash
    2.15 -#endif
    2.16 -#else
    2.17  	thash r17=r16				// compute virtual address of L3 PTE
    2.18  #endif
    2.19  	mov r29=b0				// save b0 in case of nested fault
    2.20 @@ -812,16 +808,12 @@ ENTRY(iaccess_bit)
    2.21  #endif /* CONFIG_ITANIUM */
    2.22  	;;
    2.23  #ifdef CONFIG_XEN
    2.24 -#if 1
    2.25  	mov r18=r8;
    2.26  	mov r8=r16;
    2.27  	XEN_HYPER_THASH;;
    2.28  	mov r17=r8;
    2.29  	mov r8=r18;;
    2.30  #else
    2.31 -	tak r17=r80				// "privified" thash
    2.32 -#endif
    2.33 -#else
    2.34  	thash r17=r16				// compute virtual address of L3 PTE
    2.35  #endif
    2.36  	mov r29=b0				// save b0 in case of nested fault)
    2.37 @@ -898,16 +890,12 @@ ENTRY(daccess_bit)
    2.38  	movl r30=1f				// load continuation point in case of nested fault
    2.39  	;;
    2.40  #ifdef CONFIG_XEN
    2.41 -#if 1
    2.42  	mov r18=r8;
    2.43  	mov r8=r16;
    2.44  	XEN_HYPER_THASH;;
    2.45  	mov r17=r8;
    2.46  	mov r8=r18;;
    2.47  #else
    2.48 -	tak r17=r80				// "privified" thash
    2.49 -#endif
    2.50 -#else
    2.51  	thash r17=r16				// compute virtual address of L3 PTE
    2.52  #endif
    2.53  	mov r31=pr
     3.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h	Thu Mar 16 12:19:08 2006 -0700
     3.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h	Thu Mar 16 12:20:59 2006 -0700
     3.3 @@ -33,6 +33,11 @@
     3.4  #define	XEN_HYPER_GET_RR		break 0x10
     3.5  #define	XEN_HYPER_SET_RR		break 0x11
     3.6  #define	XEN_HYPER_SET_KR		break 0x12
     3.7 +#define	XEN_HYPER_FC			break 0x13
     3.8 +#define	XEN_HYPER_GET_CPUID		break 0x14
     3.9 +#define	XEN_HYPER_GET_PMD		break 0x15
    3.10 +#define	XEN_HYPER_GET_EFLAG		break 0x16
    3.11 +#define	XEN_HYPER_SET_EFLAG		break 0x17
    3.12  #endif
    3.13  
    3.14  #ifndef __ASSEMBLY__