xen-unstable.hg

changeset 10770:72caf2612e52

[IA64] fix domain_flush_vtlb_all()

It should purge software tlb entry of specified vcpu, not current.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Wed Jul 05 10:03:20 2006 -0600 (2006-07-05)
parents 37c8b562a8f1
children 26dae1c72cd9
files xen/arch/ia64/xen/vcpu.c xen/arch/ia64/xen/vhpt.c xen/include/asm-ia64/tlbflush.h
line diff
     1.1 --- a/xen/arch/ia64/xen/vcpu.c	Wed Jul 05 09:59:40 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/vcpu.c	Wed Jul 05 10:03:20 2006 -0600
     1.3 @@ -2065,7 +2065,7 @@ IA64FAULT vcpu_ptc_e(VCPU *vcpu, UINT64 
     1.4  	// architected loop to purge the entire TLB, should use
     1.5  	//  base = stride1 = stride2 = 0, count0 = count 1 = 1
     1.6  
     1.7 -	vcpu_flush_vtlb_all ();
     1.8 +	vcpu_flush_vtlb_all(current);
     1.9  
    1.10  	return IA64_NO_FAULT;
    1.11  }
     2.1 --- a/xen/arch/ia64/xen/vhpt.c	Wed Jul 05 09:59:40 2006 -0600
     2.2 +++ b/xen/arch/ia64/xen/vhpt.c	Wed Jul 05 10:03:20 2006 -0600
     2.3 @@ -129,10 +129,8 @@ void vhpt_init(void)
     2.4  }
     2.5  
     2.6  
     2.7 -void vcpu_flush_vtlb_all (void)
     2.8 +void vcpu_flush_vtlb_all(struct vcpu *v)
     2.9  {
    2.10 -	struct vcpu *v = current;
    2.11 -
    2.12  	/* First VCPU tlb.  */
    2.13  	vcpu_purge_tr_entry(&PSCBX(v,dtlb));
    2.14  	vcpu_purge_tr_entry(&PSCBX(v,itlb));
    2.15 @@ -148,6 +146,11 @@ void vcpu_flush_vtlb_all (void)
    2.16  	   check this.  */
    2.17  }
    2.18  
    2.19 +static void __vcpu_flush_vtlb_all(void *vcpu)
    2.20 +{
    2.21 +	vcpu_flush_vtlb_all((struct vcpu*)vcpu);
    2.22 +}
    2.23 +
    2.24  void domain_flush_vtlb_all (void)
    2.25  {
    2.26  	int cpu = smp_processor_id ();
    2.27 @@ -158,12 +161,11 @@ void domain_flush_vtlb_all (void)
    2.28  			continue;
    2.29  
    2.30  		if (v->processor == cpu)
    2.31 -			vcpu_flush_vtlb_all ();
    2.32 +			vcpu_flush_vtlb_all(v);
    2.33  		else
    2.34 -			smp_call_function_single
    2.35 -				(v->processor,
    2.36 -				 (void(*)(void *))vcpu_flush_vtlb_all,
    2.37 -				 NULL,1,1);
    2.38 +			smp_call_function_single(v->processor,
    2.39 +						 __vcpu_flush_vtlb_all,
    2.40 +						 v, 1, 1);
    2.41  	}
    2.42  }
    2.43  
     3.1 --- a/xen/include/asm-ia64/tlbflush.h	Wed Jul 05 09:59:40 2006 -0600
     3.2 +++ b/xen/include/asm-ia64/tlbflush.h	Wed Jul 05 10:03:20 2006 -0600
     3.3 @@ -11,7 +11,7 @@
     3.4  */
     3.5  
     3.6  /* Local all flush of vTLB.  */
     3.7 -void vcpu_flush_vtlb_all (void);
     3.8 +void vcpu_flush_vtlb_all(struct vcpu *v);
     3.9  
    3.10  /* Local range flush of machine TLB only (not full VCPU virtual TLB!!!)  */
    3.11  void vcpu_flush_tlb_vhpt_range (u64 vadr, u64 log_range);