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

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



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201516628 0
# Node ID 1b013d10c6d1e635de4fa5a499df2e0aff0dfd2d
# Parent  3bf41a61a0347b42419a4047f2fcd40fb41df570
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-unstable changeset:   16897:63275fd1596a2518aa5d8d0649cc90a3c74bfdea
xen-unstable date:        Sat Jan 26 11:29:29 2008 +0000
---
 xen/arch/x86/time.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 3bf41a61a034 -r 1b013d10c6d1 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Mon Jan 28 10:36:47 2008 +0000
+++ b/xen/arch/x86/time.c       Mon Jan 28 10:37:08 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®.