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] Some things to be considered for ptc.ga emulation

To: "Tristan Gingold" <Tristan.Gingold@xxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] Some things to be considered for ptc.ga emulation
From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Date: Fri, 7 Apr 2006 16:07:15 +0800
Delivery-date: Fri, 07 Apr 2006 01:11:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcZZSy80DtYdeanNRbWyotJ7CNWh0gAzYqsA
Thread-topic: [Xen-ia64-devel] Some things to be considered for ptc.ga emulation
> Tristan Gingold
>Sent: 2006?4?6? 15:28
>+void vhpt_flush_address_remote(int cpu,
>+                             unsigned long vadr, unsigned long addr_range)
>+{
>+      while ((long)addr_range > 0) {
>+              /* Get the VHPT entry.  */
>+              unsigned int off = ia64_thash(vadr) - VHPT_ADDR;
>+              volatile struct vhpt_lf_entry *v;
>+              v =__va(per_cpu(vhpt_paddr, cpu) + off);
>+              v->ti_tag = INVALID_TI_TAG;
>               addr_range -= PAGE_SIZE;
>               vadr += PAGE_SIZE;
>       }

I have a concern about this,
This method seems be Ok if only modifying v->ti_tag, which is an atomic
operation on bus.
The possible optimization maybe check tag before setting it to invalid,
(this is unreasonable to purge a irrelevant tlb mapping)
There is a time between checking tag and setting it to invalid, this may
cause race condition.

Thanks,
Anthony

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