WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] Re: [PATCH]: ptc.ga for SMP-g

Hi Tristan.


+                       /* Purge tc entry.
+                          Can we do this directly ?  Well, this is just a
+                          single atomic write.  */
+                       vcpu_purge_tr_entry(&PSCBX(v,dtlb));
+                       vcpu_purge_tr_entry(&PSCBX(v,itlb));

These aren't SMP-safe because dtlb isn't read atomically. 
>From vcpu_translate()

#define vcpu_match_tr_entry(_trp,_ifa,_rid)             \
    ((_trp->p && (_trp->rid==_rid) && (_ifa >= _trp->vadr) &&   \
    (_ifa < (_trp->vadr + (1L<< _trp->ps)) - 1)))

        trp = &vcpu->arch.dtlb;
        if (/* is_data && */ vcpu_match_tr_entry(trp,address,rid)) {
                <<<<<<<<<<<<If other processor executes
                            vcpu_purge_tr_entry(&PSCBX(v,dtlb)) here,
                            then a disaster will happen >>>>>>>>>>>>>>>>
                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;
        }

In fact it's more subtle because of memory ordering.

thanks.

On Mon, Mar 27, 2006 at 02:15:27PM +0100, Tristan Gingold wrote:
> Le Lundi 27 Mars 2006 15:07, Alex Williamson a écrit :
> > On Mon, 2006-03-27 at 13:53 +0100, Tristan Gingold wrote:
> > > Hi,
> > >
> > > this is a very simple extension of vcpu_ptc_ga to support SMP-g.
> > > The implementation could be optimized.
> >
> > Hi Tristan,
> >
> >    There's no patch attached, please resend.  Thanks,
> >
> >         Alex
> Sorry.
> Here it comes.
> 
> Tristan.
> 


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

-- 
yamahata

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

<Prev in Thread] Current Thread [Next in Thread>