mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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@citrix.com>
This commit is contained in:
1 parent
b9b6a9658d
commit
c22615b9ae
1 file changed
+3
-1
+3
-1
@@ -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();
|
||||
|
||||
|
||||