ia64/xen-unstable

changeset 4191:3716203b6dac

bitkeeper revision 1.1236.25.30 (42392b62_QSjJbibUtqM_Vcuoe0h9A)

Merge djm@kirby.fc.hp.com://home/djm/src/xen/xeno-unstable-ia64.bk
into sportsman.spdomain:/home/djm/xeno-unstable-ia64.bk
author djm@sportsman.spdomain
date Thu Mar 17 07:01:54 2005 +0000 (2005-03-17)
parents 58f33dec606f c7589ea2a4c0
children 2f89618be8d4
files xen/arch/ia64/vcpu.c xen/include/asm-ia64/config.h
line diff
     1.1 --- a/xen/arch/ia64/vcpu.c	Thu Mar 17 05:07:03 2005 +0000
     1.2 +++ b/xen/arch/ia64/vcpu.c	Thu Mar 17 07:01:54 2005 +0000
     1.3 @@ -511,6 +511,13 @@ void vcpu_pend_interrupt(VCPU *vcpu, UIN
     1.4  	set_bit(vector,PSCB(vcpu,irr));
     1.5  }
     1.6  
     1.7 +void early_tick(VCPU *vcpu)
     1.8 +{
     1.9 +	UINT64 *p = &PSCB(vcpu,irr[3]);
    1.10 +	printf("vcpu_check_pending: about to deliver early tick\n");
    1.11 +	printf("&irr[0]=%p, irr[0]=0x%lx\n",p,*p);
    1.12 +}
    1.13 +
    1.14  #define	IA64_TPR_MMI	0x10000
    1.15  #define	IA64_TPR_MIC	0x000f0
    1.16  
    1.17 @@ -563,6 +570,14 @@ UINT64 vcpu_check_pending_interrupts(VCP
    1.18  	}
    1.19  
    1.20  //printf("returned to caller\n");
    1.21 +#if 0
    1.22 +if (vector == (PSCB(vcpu,itv) & 0xff)) {
    1.23 +	UINT64 now = ia64_get_itc();
    1.24 +	UINT64 itm = PSCB(vcpu,domain_itm);
    1.25 +	if (now < itm) early_tick(vcpu);
    1.26 +	
    1.27 +}
    1.28 +#endif
    1.29  	return vector;
    1.30  }
    1.31  
    1.32 @@ -815,14 +830,21 @@ BOOLEAN vcpu_timer_disabled(VCPU *vcpu)
    1.33  	return(!itv || !!(itv & 0x10000));
    1.34  }
    1.35  
    1.36 +BOOLEAN vcpu_timer_inservice(VCPU *vcpu)
    1.37 +{
    1.38 +	UINT64 itv = PSCB(vcpu,itv);
    1.39 +	return (test_bit(itv, PSCB(vcpu,insvc)));
    1.40 +}
    1.41 +
    1.42  BOOLEAN vcpu_timer_expired(VCPU *vcpu)
    1.43  {
    1.44  	unsigned long domain_itm = PSCB(vcpu,domain_itm);
    1.45  	unsigned long now = ia64_get_itc();
    1.46   
    1.47 -	if (domain_itm && (now > domain_itm) &&
    1.48 -		!vcpu_timer_disabled(vcpu)) return TRUE;
    1.49 -	return FALSE;
    1.50 +	if (!domain_itm) return FALSE;
    1.51 +	if (now < domain_itm) return FALSE;
    1.52 +	if (vcpu_timer_disabled(vcpu)) return FALSE;
    1.53 +	return TRUE;
    1.54  }
    1.55  
    1.56  void vcpu_safe_set_itm(unsigned long val)
    1.57 @@ -956,6 +978,7 @@ void vcpu_pend_timer(VCPU *vcpu)
    1.58  	UINT64 itv = PSCB(vcpu,itv) & 0xff;
    1.59  
    1.60  	if (vcpu_timer_disabled(vcpu)) return;
    1.61 +	if (vcpu_timer_inservice(vcpu)) return;
    1.62  #if 1
    1.63  	// attempt to flag "timer tick before its due" source
    1.64  	{
    1.65 @@ -1071,6 +1094,7 @@ while(1);
    1.66  
    1.67  IA64FAULT vcpu_cover(VCPU *vcpu)
    1.68  {
    1.69 +	// TODO: Only allowed for current vcpu
    1.70  	REGS *regs = vcpu_regs(vcpu);
    1.71  
    1.72  	if (!PSCB(vcpu,interrupt_collection_enabled)) {
    1.73 @@ -1229,6 +1253,7 @@ IA64FAULT vcpu_get_pmd(VCPU *vcpu, UINT6
    1.74  
    1.75  IA64FAULT vcpu_bsw0(VCPU *vcpu)
    1.76  {
    1.77 +	// TODO: Only allowed for current vcpu
    1.78  	REGS *regs = vcpu_regs(vcpu);
    1.79  	unsigned long *r = &regs->r16;
    1.80  	unsigned long *b0 = &PSCB(vcpu,bank0_regs[0]);
    1.81 @@ -1244,6 +1269,7 @@ IA64FAULT vcpu_bsw0(VCPU *vcpu)
    1.82  
    1.83  IA64FAULT vcpu_bsw1(VCPU *vcpu)
    1.84  {
    1.85 +	// TODO: Only allowed for current vcpu
    1.86  	REGS *regs = vcpu_regs(vcpu);
    1.87  	unsigned long *r = &regs->r16;
    1.88  	unsigned long *b0 = &PSCB(vcpu,bank0_regs[0]);
    1.89 @@ -1535,6 +1561,7 @@ IA64FAULT vcpu_ptc_l(VCPU *vcpu, UINT64 
    1.90  // on the physical address, which is guaranteed to flush the same cache line
    1.91  IA64FAULT vcpu_fc(VCPU *vcpu, UINT64 vadr)
    1.92  {
    1.93 +	// TODO: Only allowed for current vcpu
    1.94  	UINT64 mpaddr, ps;
    1.95  	IA64FAULT fault;
    1.96  	unsigned long match_dtlb(VCPU *, unsigned long, unsigned long *, unsigned long *);
     2.1 --- a/xen/include/asm-ia64/config.h	Thu Mar 17 05:07:03 2005 +0000
     2.2 +++ b/xen/include/asm-ia64/config.h	Thu Mar 17 07:01:54 2005 +0000
     2.3 @@ -1,6 +1,6 @@
     2.4  // control flags for turning on/off features under test
     2.5  #undef CLONE_DOMAIN0
     2.6 -//#define CLONE_DOMAIN0 1
     2.7 +//#define CLONE_DOMAIN0 5
     2.8  
     2.9  // manufactured from component pieces
    2.10