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-devel

Re: [Xen-devel] [PATCH 1/2] Migrate tsc values during migration

To: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1/2] Migrate tsc values during migration
From: Dave Winchell <dwinchell@xxxxxxxxxxxxxxx>
Date: Fri, 06 Jun 2008 10:49:45 -0400
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
Delivery-date: Fri, 06 Jun 2008 07:49:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <FE7BBCFBB500984A9A7922EBC95F516E01451C6E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4847FF6F.4090506@xxxxxxxxxxxxxxx> <FE7BBCFBB500984A9A7922EBC95F516E01451C6E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)
Dexuan,

Thanks for catching this. How about this (taken from msr.h)?

#if defined(__i386__)
#define rdtscll(val) \
__asm__ __volatile__("rdtsc" : "=A" (val))
#elif defined(__x86_64__)
#define rdtscll(val) do { \
unsigned int a,d; \
asm volatile("rdtsc" : "=a" (a), "=d" (d)); \
(val) = ((unsigned long)a) | (((unsigned long)d)<<32); \
} while(0)
#endif

thanks,
Dave

Cui, Dexuan wrote:

>>diff -r f1508348ffab tools/libxc/xc_domain_restore.c
>>...
>>+#define rdtscll(val) do { \
>>+     unsigned int a,d; \
>>+     asm volatile("rdtsc" : "=a" (a), "=d" (d)); \
>>+     (val) = ((unsigned long)a) | (((unsigned long)d)<<32); \
>>+} while(0)
>>+
>> /* max mfn of the current host machine */
>> static unsigned long max_mfn; 
>>...
>>    
>>
>
>The "rdtscll" definition is buggy for  __i386__  since sizeof "int" and "long" 
>usually are 4 there. 
>
>-- Dexuan
>
>
>-----Original Message-----
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
>[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Ben Guthro
>Sent: 2008年6月5日 23:00
>To: xen-devel; Dave Winchell
>Subject: [Xen-devel] [PATCH 1/2] Migrate tsc values during migration
>
>Migrate the last TSC values for more accurate timekeeping during live 
>migration
>
>Signed-off-by: Dave Winchell <dwinchell@xxxxxxxxxxxxxxx>
>Signed-off-by: Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
>  
>


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

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