From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86: don't write_tsc() non-zero values on CPUs updating only the lower 32 bits Date: Fri, 15 Apr 2011 08:37:23 +0100 Message-ID: References: <4DA80B1A020000780003C875@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4DA80B1A020000780003C875@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: "xen-devel@lists.xensource.com" , "winston.l.wang" List-Id: xen-devel@lists.xenproject.org On 15/04/2011 08:08, "Jan Beulich" wrote: >> 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. Oh yes. Still the 4x is weird, and on this path (!TSC_RELIABLE, TSC is fully writable) we will sync all AP TSCs as they come up anyway. So writing back the original TSC value is good enough, as far as this matters at all (which it probably doesn't). -- Keir