From: Keir Fraser Subject: Re: s_time going backwards on same processor? Date: Wed, 23 Jul 2008 08:06:02 +0100 Message-ID: References: <20080722155859484.00000001992@djm-pc> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080722155859484.00000001992@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 22/7/08 22:58, "Dan Magenheimer" wrote: > I *do* know that get_s_time() on different processors > can have this behavior and I know it is possible for > hvm_get_guest_time() to go backwards (timer_mode=0), > but I thought s_time was monotonically non-decreasing > on any given processor and that read_platform_stime() > is also monotonically non-decreasing. > > Does dom0 maybe have direct hardware access to the hardware > platform timer that xen system time is dependent on? No matter what happens to the underlying platform timer, it should be impossible for Xen system time to go backwards on any given processor. The calibration function never sets the TSC and system timestamps for the next time record any earlier than current TSC value and current computed system time value. Hence it should be impossible for system time to be computed as earlier than that time record. -- Keir