[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: When Xen is notified that CPU frequency has changed, do not trust



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201346969 0
# Node ID 63275fd1596a2518aa5d8d0649cc90a3c74bfdea
# Parent  7327e1c2a42ced6b1b473e0e738b12e141fb0584
x86: When Xen is notified that CPU frequency has changed, do not trust
the current TSC-extrapolated time when we re-sync.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/time.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 7327e1c2a42c -r 63275fd1596a xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Sat Jan 26 11:25:48 2008 +0000
+++ b/xen/arch/x86/time.c       Sat Jan 26 11:29:29 2008 +0000
@@ -732,8 +732,10 @@ int cpu_frequency_change(u64 freq)
     local_irq_disable();
     rdtscll(curr_tsc);
     t->local_tsc_stamp = curr_tsc;
-    t->stime_local_stamp = get_s_time();
     t->stime_master_stamp = read_platform_stime();
+    /* TSC-extrapolated time may be bogus after frequency change. */
+    /*t->stime_local_stamp = get_s_time();*/
+    t->stime_local_stamp = t->stime_master_stamp;
     set_time_scale(&t->tsc_scale, freq);
     local_irq_enable();
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.