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][PATCH] handle speculative vhpt walk

To: "Isaku Yamahata" <yamahata@xxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel][PATCH] handle speculative vhpt walk
From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Date: Thu, 10 May 2007 11:37:38 +0800
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 09 May 2007 20:35:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070510031943.GC7771%yamahata@xxxxxxxxxxxxx>
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: AceSshFwdSLyP2yXSTGY47wc35LcXwAAl9HQ
Thread-topic: [Xen-ia64-devel][PATCH] handle speculative vhpt walk
The new one



>-----Original Message-----
>From: Isaku Yamahata [mailto:yamahata@xxxxxxxxxxxxx]
>Sent: 2007年5月10日 11:20
>To: Xu, Anthony
>Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [Xen-ia64-devel][PATCH] handle speculative vhpt walk
>
>On Thu, May 10, 2007 at 11:12:46AM +0800, Xu, Anthony wrote:
>
>> >> diff -r eabda101b0c5 xen/arch/ia64/xen/vhpt.c
>> >> --- a/xen/arch/ia64/xen/vhpt.c    Tue May 08 13:12:52 2007 -0600
>> >> +++ b/xen/arch/ia64/xen/vhpt.c    Wed May 09 14:27:16 2007 +0800
>> >> @@ -78,10 +78,13 @@ void vhpt_insert (unsigned long vadr, un
>> >>   struct vhpt_lf_entry *vlfe = (struct vhpt_lf_entry
>*)ia64_thash(vadr);
>> >>   unsigned long tag = ia64_ttag (vadr);
>> >>
>> >> - /* No need to first disable the entry, since VHPT is per LP
>> >> -    and VHPT is TR mapped.  */
>> >> + /* Even though VHPT is per VCPU, still need to first disable the entry,
>> >> +  * because the processor may support speculative VHPT walk.  */
>> >> + vlfe->ti_tag = INVALID_TI_TAG;
>> >> + wmb();
>> >>   vlfe->itir = logps;
>> >>   vlfe->page_flags = pte | _PAGE_P;
>> >> + wmb();
>> >>   vlfe->ti_tag = tag;
>> >>  }
>> >>
>> >>
>> >
>> >ditto.
>> >    vlfe->ti_tag = INVALID_TI_TAG;
>> >    *(volatile unsigned long*)&vlfe->itir = logps;
>> >    *(volatile unsigned long*)&vlfe->page_flags = pte | _PAGE_P;
>> >    *(volatile unsigned long*)&vlfe->ti_tag = tag;
>>
>> Another choice is,
>>      vlfe->ti_tag = INVALID_TI_TAG;
>>      wmb();
>>      vlfe->itir = logps;
>>      vlfe->page_flags = pte | _PAGE_P;
>>      *(volatile unsigned long*)&vlfe->ti_tag = tag;
>>
>>
>> Do you know which one is the fastest?
>
>Unfortunately no. You may know better than me, I guess.
>
>--
>yamahata

Attachment: handle_speculative_vhpt_walk2.patch
Description: handle_speculative_vhpt_walk2.patch

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