ia64/xen-unstable

changeset 13119:d9cc772c6bde

[IA64] Enable fast hyperprivop for ssm.i and rfi

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author awilliam@xenbuild2.aw
date Thu Jan 04 16:14:22 2007 -0700 (2007-01-04)
parents eb40e07b867f
children b1c00767c6ae
files xen/arch/ia64/asm-offsets.c xen/arch/ia64/xen/hyperprivop.S
line diff
     1.1 --- a/xen/arch/ia64/asm-offsets.c	Thu Jan 04 16:10:25 2007 -0700
     1.2 +++ b/xen/arch/ia64/asm-offsets.c	Thu Jan 04 16:14:22 2007 -0700
     1.3 @@ -60,6 +60,7 @@ void foo(void)
     1.4  	DEFINE(IA64_VCPU_META_SAVED_RR0_OFFSET, offsetof (struct vcpu, arch.metaphysical_saved_rr0));
     1.5  	DEFINE(IA64_VCPU_BREAKIMM_OFFSET, offsetof (struct vcpu, arch.breakimm));
     1.6  	DEFINE(IA64_VCPU_IVA_OFFSET, offsetof (struct vcpu, arch.iva));
     1.7 +	DEFINE(IA64_VCPU_EVENT_CALLBACK_IP_OFFSET, offsetof (struct vcpu, arch.event_callback_ip));
     1.8  	DEFINE(IA64_VCPU_IRR0_OFFSET, offsetof (struct vcpu, arch.irr[0]));
     1.9  	DEFINE(IA64_VCPU_IRR3_OFFSET, offsetof (struct vcpu, arch.irr[3]));
    1.10  	DEFINE(IA64_VCPU_INSVC3_OFFSET, offsetof (struct vcpu, arch.insvc[3]));
     2.1 --- a/xen/arch/ia64/xen/hyperprivop.S	Thu Jan 04 16:10:25 2007 -0700
     2.2 +++ b/xen/arch/ia64/xen/hyperprivop.S	Thu Jan 04 16:14:22 2007 -0700
     2.3 @@ -37,10 +37,10 @@
     2.4  # define FAST_BREAK
     2.5  # undef FAST_ACCESS_REFLECT 	//XXX TODO fast_access_reflect
     2.6                              	//    doesn't support dom0 vp yet.
     2.7 -//# define FAST_RFI
     2.8 +# define FAST_RFI
     2.9  // TODO: Since we use callback to deliver interrupt, 
    2.10  //       FAST_SSM_I needs to be rewritten.
    2.11 -//# define FAST_SSM_I
    2.12 +# define FAST_SSM_I
    2.13  # define FAST_PTC_GA
    2.14  # undef RFI_TO_INTERRUPT // not working yet
    2.15  #endif
    2.16 @@ -282,13 +282,11 @@ ENTRY(hyper_ssm_i)
    2.17  	adds r21=XSI_PRECOVER_IFS_OFS-XSI_PSR_IC_OFS,r18 ;;
    2.18  	st8 [r21]=r20 ;;
    2.19  	// leave cr.ifs alone for later rfi
    2.20 -	// set iip to go to domain IVA break instruction vector
    2.21 +	// set iip to go to event callback handler
    2.22  	movl r22=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;;
    2.23  	ld8 r22=[r22];;
    2.24 -	adds r22=IA64_VCPU_IVA_OFFSET,r22;;
    2.25 -	ld8 r23=[r22];;
    2.26 -	movl r24=0x3000;;
    2.27 -	add r24=r24,r23;;
    2.28 +	adds r22=IA64_VCPU_EVENT_CALLBACK_IP_OFFSET,r22;;
    2.29 +	ld8 r24=[r22];;
    2.30  	mov cr.iip=r24;;
    2.31  	// OK, now all set to go except for switch to virtual bank0
    2.32  	mov r30=r2
    2.33 @@ -1027,8 +1025,12 @@ ENTRY(hyper_rfi)
    2.34  	adds r20=XSI_IPSR_OFS-XSI_PSR_IC_OFS,r18 ;;
    2.35  	ld8 r21=[r20];;		// r21 = vcr.ipsr
    2.36  	extr.u r22=r21,IA64_PSR_I_BIT,1 ;;
    2.37 -	mov r30=r22	
    2.38 +	mov r30=r22;;
    2.39  	// r30 determines whether we might deliver an immediate extint
    2.40 +#ifndef RFI_TO_INTERRUPT // see beginning of file
    2.41 +	cmp.ne p6,p0=r30,r0
    2.42 +(p6)	br.cond.spnt.few dispatch_break_fault ;;
    2.43 +#endif
    2.44  1:
    2.45  	adds r20=XSI_IPSR_OFS-XSI_PSR_IC_OFS,r18 ;;
    2.46  	ld8 r21=[r20];;		// r21 = vcr.ipsr
    2.47 @@ -1063,10 +1065,6 @@ 1:
    2.48  	cmp.ltu p0,p7=r22,r23 ;;	// if !(iip<low) &&
    2.49  (p7)	cmp.geu p0,p7=r22,r24 ;;	//    !(iip>=high)
    2.50  (p7)	br.spnt.few dispatch_break_fault ;;
    2.51 -#ifndef RFI_TO_INTERRUPT // see beginning of file
    2.52 -	cmp.ne p6,p0=r30,r0
    2.53 -(p6)	br.cond.spnt.few dispatch_break_fault ;;
    2.54 -#endif
    2.55  
    2.56  1:	// OK now, let's do an rfi.
    2.57  #ifdef FAST_HYPERPRIVOP_CNT