From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: #599161: Xen debug patch for the "clock shifts by 50 minutes" bug. Date: Thu, 08 Nov 2012 14:04:52 +0000 Message-ID: References: <509BC76602000078000A73C7@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <509BC76602000078000A73C7@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Philippe.Simonet@swisscom.com, 599161@bugs.debian.org, xen-devel@lists.xen.org, mrsanna1@gmail.com, Ian Campbell List-Id: xen-devel@lists.xenproject.org On 08/11/2012 13:53, "Jan Beulich" wrote: >>> Is it? My understanding was that plt_stamp64 is just a software >>> extension to the more narrow HW counter, and hence the low >>> plt_mask bits would always be expected to be identical. >> >> No, plt_stamp is simply the HW counter time at which plt_stamp64 was last >> brought up to date. Hence plt_stamp64 is updated as: >> plt_stamp64 += (new_stamp - old_stamp) & plt_mask; > > I concur Well, no, you don't really. You're about to point out the flaw in my reasoning... > : Given that what old_stamp is here was new_stamp for > the last update, we should simply have > > stamp64 = s0 + (s1 - s0) + (s2 - s1) + ... > > (of course with the mask applied on each addend), which (for the > low bits) is the same as just new_stamp. Very good point. Silly me. Then the observed value of plt_stamp64 makes perfect sense. -- Keir