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/
Home Products Support Community News


Re: [Xen-devel] [PATCH] x86: don't write_tsc() non-zero values on CPUs u

To: "Keir Fraser" <keir.xen@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: don't write_tsc() non-zero values on CPUs updating only the lower 32 bits
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 15 Apr 2011 08:08:42 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "winston.l.wang" <winston.l.wang@xxxxxxxxx>
Delivery-date: Fri, 15 Apr 2011 00:08:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C9CCE3EA.165CF%keir.xen@xxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4DA73CBD020000780003BBB0@xxxxxxxxxxxxxxxxxx> <C9CCE3EA.165CF%keir.xen@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> 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.


Xen-devel mailing list

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