direct-io.hg

changeset 5529:3cc88ea3498a

bitkeeper revision 1.1713.2.16 (42b85de87qTaJfB_LqIZvXhK7xSqJg)

More hyperprivop stuff, fix set_rr, new get_rr
Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com>
author djm@kirby.fc.hp.com
date Tue Jun 21 18:35:20 2005 +0000 (2005-06-21)
parents 05d595a0f3cf
children fd4a89825472
files xen/arch/ia64/hyperprivop.S
line diff
     1.1 --- a/xen/arch/ia64/hyperprivop.S	Tue Jun 21 16:14:17 2005 +0000
     1.2 +++ b/xen/arch/ia64/hyperprivop.S	Tue Jun 21 18:35:20 2005 +0000
     1.3 @@ -105,6 +105,10 @@ 1:	// when we get to here r20=~=interrup
     1.4  	cmp.eq p7,p6=XEN_HYPER_SET_RR,r17
     1.5  (p7)	br.sptk.many hyper_set_rr;;
     1.6  
     1.7 +	// HYPERPRIVOP_GET_RR?
     1.8 +	cmp.eq p7,p6=XEN_HYPER_GET_RR,r17
     1.9 +(p7)	br.sptk.many hyper_get_rr;;
    1.10 +
    1.11  	// if not one of the above, give up for now and do it the slow way
    1.12  	br.sptk.many dispatch_break_fault ;;
    1.13  
    1.14 @@ -820,10 +824,36 @@ 1:	mov r24=cr.ipsr
    1.15  	;;
    1.16  END(hyper_set_itm)
    1.17  
    1.18 +ENTRY(hyper_get_rr)
    1.19 +#ifdef FAST_HYPERPRIVOP_CNT
    1.20 +	movl r20=fast_hyperpriv_cnt+(8*XEN_HYPER_GET_RR);;
    1.21 +	ld8 r21=[r20];;
    1.22 +	adds r21=1,r21;;
    1.23 +	st8 [r20]=r21;;
    1.24 +#endif
    1.25 +	extr.u r25=r8,61,3;;
    1.26 +	adds r20=XSI_RR0_OFS-XSI_PSR_IC_OFS,r18 ;;
    1.27 +	shl r25=r25,3;;
    1.28 +	add r20=r20,r25;;
    1.29 +	ld8 r8=[r20];;
    1.30 +1:	mov r24=cr.ipsr
    1.31 +	mov r25=cr.iip;;
    1.32 +	extr.u r26=r24,41,2 ;;
    1.33 +	cmp.eq p6,p7=2,r26 ;;
    1.34 +(p6)	mov r26=0
    1.35 +(p6)	adds r25=16,r25
    1.36 +(p7)	adds r26=1,r26
    1.37 +	;;
    1.38 +	dep r24=r26,r24,41,2
    1.39 +	;;
    1.40 +	mov cr.ipsr=r24
    1.41 +	mov cr.iip=r25
    1.42 +	mov pr=r31,-1 ;;
    1.43 +	rfi
    1.44 +	;;
    1.45 +END(hyper_get_rr)
    1.46 +
    1.47  ENTRY(hyper_set_rr)
    1.48 -#if 1
    1.49 -	br.sptk.many dispatch_break_fault ;;
    1.50 -#endif
    1.51  	extr.u r25=r8,61,3;;
    1.52  	cmp.leu p7,p0=7,r25	// punt on setting rr7
    1.53  (p7)	br.spnt.many dispatch_break_fault ;;
    1.54 @@ -839,7 +869,7 @@ ENTRY(hyper_set_rr)
    1.55  	ld4 r22=[r21];;
    1.56  	adds r21=IA64_VCPU_ENDING_RID_OFFSET,r20;;
    1.57  	ld4 r23=[r21];;
    1.58 -	adds r24=IA64_VCPU_META_SAVED_RR0_OFFSET,r22;;
    1.59 +	adds r24=IA64_VCPU_META_SAVED_RR0_OFFSET,r20;;
    1.60  	add r22=r26,r22;;
    1.61  	cmp.geu p6,p0=r22,r23	// if r9.rid + starting_rid >= ending_rid
    1.62  (p6)	br.cond.sptk.many 1f;	// this is an error, but just ignore/return