|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH 1/2] Migrate tsc values during migration
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
|
|
|
|
|