direct-io.hg

changeset 9282:405f0f847c0f

[IA64] in_tpa is now an argument of vcpu_translate

this makes in_tpa SMP-safe.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Thu Mar 09 16:24:31 2006 -0700 (2006-03-09)
parents 3b877779e9a3
children c644eb4049ab
files xen/arch/ia64/xen/process.c xen/arch/ia64/xen/vcpu.c xen/include/asm-ia64/vcpu.h
line diff
     1.1 --- a/xen/arch/ia64/xen/process.c	Thu Mar 09 16:16:20 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/process.c	Thu Mar 09 16:24:31 2006 -0700
     1.3 @@ -280,7 +280,7 @@ void ia64_do_page_fault (unsigned long a
     1.4  		return;
     1.5  	}
     1.6  
     1.7 -	fault = vcpu_translate(current,address,is_data,&pteval,&itir,&iha);
     1.8 +	fault = vcpu_translate(current,address,is_data,0,&pteval,&itir,&iha);
     1.9  	if (fault == IA64_NO_FAULT) {
    1.10  		pteval = translate_domain_pte(pteval,address,itir);
    1.11  		vcpu_itc_no_srlz(current,is_data?2:1,address,pteval,-1UL,(itir>>2)&0x3f);
     2.1 --- a/xen/arch/ia64/xen/vcpu.c	Thu Mar 09 16:16:20 2006 -0700
     2.2 +++ b/xen/arch/ia64/xen/vcpu.c	Thu Mar 09 16:24:31 2006 -0700
     2.3 @@ -6,12 +6,6 @@
     2.4   *
     2.5   */
     2.6  
     2.7 -#if 1
     2.8 -// TEMPORARY PATCH for match_dtlb uses this, can be removed later
     2.9 -// FIXME SMP
    2.10 -int in_tpa = 0;
    2.11 -#endif
    2.12 -
    2.13  #include <linux/sched.h>
    2.14  #include <public/arch-ia64.h>
    2.15  #include <asm/ia64_int.h>
    2.16 @@ -1290,7 +1284,7 @@ unsigned long recover_to_break_fault_cou
    2.17  
    2.18  int warn_region0_address = 0; // FIXME later: tie to a boot parameter?
    2.19  
    2.20 -IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, UINT64 *pteval, UINT64 *itir, UINT64 *iha)
    2.21 +IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, BOOLEAN in_tpa, UINT64 *pteval, UINT64 *itir, UINT64 *iha)
    2.22  {
    2.23  	unsigned long region = address >> 61;
    2.24  	unsigned long pta, pte, rid, rr;
    2.25 @@ -1402,9 +1396,7 @@ IA64FAULT vcpu_tpa(VCPU *vcpu, UINT64 va
    2.26  	UINT64 pteval, itir, mask, iha;
    2.27  	IA64FAULT fault;
    2.28  
    2.29 -	in_tpa = 1;
    2.30 -	fault = vcpu_translate(vcpu, vadr, 1, &pteval, &itir, &iha);
    2.31 -	in_tpa = 0;
    2.32 +	fault = vcpu_translate(vcpu, vadr, TRUE, TRUE, &pteval, &itir, &iha);
    2.33  	if (fault == IA64_NO_FAULT)
    2.34  	{
    2.35  		mask = itir_mask(itir);
     3.1 --- a/xen/include/asm-ia64/vcpu.h	Thu Mar 09 16:16:20 2006 -0700
     3.2 +++ b/xen/include/asm-ia64/vcpu.h	Thu Mar 09 16:24:31 2006 -0700
     3.3 @@ -140,7 +140,9 @@ extern IA64FAULT vcpu_ptc_g(VCPU *vcpu, 
     3.4  extern IA64FAULT vcpu_ptc_ga(VCPU *vcpu, UINT64 vadr, UINT64 addr_range);
     3.5  extern IA64FAULT vcpu_ptr_d(VCPU *vcpu,UINT64 vadr, UINT64 addr_range);
     3.6  extern IA64FAULT vcpu_ptr_i(VCPU *vcpu,UINT64 vadr, UINT64 addr_range);
     3.7 -extern IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, UINT64 *pteval, UINT64 *itir, UINT64 *iha);
     3.8 +extern IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address,
     3.9 +				BOOLEAN is_data, BOOLEAN in_tpa,
    3.10 +				UINT64 *pteval, UINT64 *itir, UINT64 *iha);
    3.11  extern IA64FAULT vcpu_tpa(VCPU *vcpu, UINT64 vadr, UINT64 *padr);
    3.12  extern IA64FAULT vcpu_force_data_miss(VCPU *vcpu, UINT64 ifa);
    3.13  extern IA64FAULT vcpu_fc(VCPU *vcpu, UINT64 vadr);