[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4BD1F37A.6040801@goop.org>
Date: Fri, 23 Apr 2010 12:22:34 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Avi Kivity <avi@...hat.com>
CC: Zachary Amsden <zamsden@...hat.com>,
Glauber Costa <glommer@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Marcelo Tosatti <mtosatti@...hat.com>
Subject: Re: [PATCH 1/5] Add a global synchronization point for pvclock
On 04/23/2010 02:34 AM, Avi Kivity wrote:
>>
>> diff -rup a/time-warp-test.c b/time-warp-test.c
>> --- a/time-warp-test.c 2010-04-15 16:30:13.955981607 -1000
>> +++ b/time-warp-test.c 2010-04-15 16:35:37.777982377 -1000
>> @@ -91,7 +91,7 @@ static inline unsigned long long __rdtsc
>> {
>> DECLARE_ARGS(val, low, high);
>>
>> - asm volatile("cpuid; rdtsc" : EAX_EDX_RET(val, low, high));
>> + asm volatile("cpuid; rdtsc" : EAX_EDX_RET(val, low, high) ::
>> "ebx", "ecx");
>>
>>
>
>
> Plus, replace cpuid by lfence/mfence. cpuid will trap.
I presume the clobbers are needed for cpuid; if you use [lm]fence then
they shouldn't be needed, right?
J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists