[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86: don't write_tsc() non-zero values on CPUs updating only the lower 32 bits



>>> On 14.04.11 at 18:48, Keir Fraser <keir.xen@xxxxxxxxx> wrote:
> On 14/04/2011 17:28, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
>> The only case not handled was if the TSC
>> overflowed 64 bits during the process - I considered this case
>> hypothetical only.
>> 
>> The final write of tsc+4*delta was basically an attempt to restore
>> the value that would have been there if we didn't fiddle with it.
> 
> But the write is actually tsc + 4*(s32)(tmp-tsc), and tmp has 1U<<32 ORed
> into it (because it was read after your second write to the TSC. Perhaps we
> should just write back the full original tsc and call that good enough?

Again, note the (s32) cast.

Jan


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.