[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-ia64-devel] RE: in_tpa is not SMP-safe


  • To: "Tristan Gingold" <Tristan.Gingold@xxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
  • Date: Wed, 8 Mar 2006 09:38:54 -0800
  • Delivery-date: Wed, 08 Mar 2006 17:39:34 +0000
  • List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
  • Thread-index: AcZCBipTX2WfoyKDQ/6t+TRUFG3g2gA0G62Q
  • Thread-topic: in_tpa is not SMP-safe

I was hoping Kevin would respond to this as my memory
on it is dim.  There was a rare but significant problem
that this code was fixing and we went through several
attempts to fix it.  I don't think we ever understood
exactly why this code was necessary because we (both
Kevin and I) thought a different code sequence should
work, but it didn't. 

So, yes, make the change to make it SMP-safe (I prefer
the parameter), but be careful about changing the
"in_tpa" semantics without running a very thorough
test suite. 

> -----Original Message-----
> From: Tristan Gingold [mailto:Tristan.Gingold@xxxxxxxx] 
> Sent: Tuesday, March 07, 2006 9:46 AM
> To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx; Magenheimer, Dan (HP 
> Labs Fort Collins)
> Subject: in_tpa is not SMP-safe
> 
> Hi,
> 
> the use of in_tpa is not SMP-safe:
> 
> [in vcpu.c:]
> #if 1
> // TEMPORARY PATCH for match_dtlb uses this, can be removed later
> // FIXME SMP
> int in_tpa = 0;
> #endif
> 
> [vcpu_translate]
>       if (/* is_data && */ vcpu_match_tr_entry(trp,address,rid)) {
>               if (vcpu->domain==dom0 && !in_tpa) *pteval = 
> trp->page_flags;
>               else *pteval = vcpu->arch.dtlb_pte;
>               *itir = trp->itir;
>               dtlb_translate_count++;
>               return IA64_NO_FAULT;
>       }
> 
> [vcpu_tpa:]
>       in_tpa = 1;
>       fault = vcpu_translate(vcpu, vadr, 1, &pteval, &itir, &iha);
>       in_tpa = 0;
> 
> 
> Should we add a new parameter to vcpu_translate or change the is_data 
> parameter to flags ?
> 
> BTW, I do not really understand it.  Why vcpu->arch.dtlb_pte 
> can be wrong ?
> 
> Tristan.
> 
> 

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.