From: Keir Fraser Subject: Re: [PATCH] strictly increasing hvm guest time Date: Wed, 02 Jul 2008 17:07:34 +0100 Message-ID: References: <20080702100358937.00000003744@djm-pc> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080702100358937.00000003744@djm-pc> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "dan.magenheimer@oracle.com" , "Xen-Devel (E-mail)" Cc: Dave Winchell List-Id: xen-devel@lists.xenproject.org On 2/7/08 17:03, "Dan Magenheimer" wrote: > This simple one-line patch changes hvm guest time from > monotonically non-decreasing to monotonically strictly- > increasing. As a result, two consecutive reads of the > (virtual) hpet will never return the same value, thus > avoiding the appearance that time has stopped (which may > occur if there is skew between physical processor TSCs). It does seem a little hack-ish, if we don't know of any issues arising from the current code, and we expect cross-cpu deltas to be pretty small. Also guests will often convert HPET reads to well-known units (e.g., microseconds, milliseconds) before using them, in which case even a delta of one may not result in differing converted time values. -- Keir