WARNING - OLD ARCHIVES

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

xen-devel

[Xen-devel] Re: s_time going backwards on same processor?

To: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: s_time going backwards on same processor?
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 23 Jul 2008 08:06:02 +0100
Cc: Dave Winchell <dwinchell@xxxxxxxxxxxxxxx>
Delivery-date: Wed, 23 Jul 2008 00:06:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080722155859484.00000001992@djm-pc>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcjsRiBvfsM2jSzrTdKQFwbDzvcjiQATHBz4
Thread-topic: s_time going backwards on same processor?
User-agent: Microsoft-Entourage/11.4.0.080122
On 22/7/08 22:58, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> 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



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel