a89d75605e
on Xen 576001df-x86-time-use-local-stamp-in-TSC-calibration-fast-path.patch 5769106e-x86-generate-assembler-equates-for-synthesized.patch 57a1e603-x86-time-adjust-local-system-time-initialization.patch 57a1e64c-x86-time-introduce-and-use-rdtsc_ordered.patch 57a2f6ac-x86-time-calibrate-TSC-against-platform-timer.patch - bsc#991934 - xen hypervisor crash in csched_acct 57973099-have-schedulers-revise-initial-placement.patch 579730e6-remove-buggy-initial-placement-algorithm.patch - bsc#988675 - VUL-0: CVE-2016-6258: xen: x86: Privilege escalation in PV guests (XSA-182) 57976073-x86-remove-unsafe-bits-from-mod_lN_entry-fastpath.patch - bsc#988676 - VUL-0: CVE-2016-6259: xen: x86: Missing SMAP whitelisting in 32-bit exception / event delivery (XSA-183) 57976078-x86-avoid-SMAP-violation-in-compat_create_bounce_frame.patch - Upstream patches from Jan 57a30261-x86-support-newer-Intel-CPU-models.patch - bsc#985503 - vif-route broken vif-route.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=445
51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
References: bsc#970135
|
|
|
|
# Commit b64438c7c1495a7580d1bb9d8ba644f3705e1ffb
|
|
# Date 2016-06-14 15:08:47 +0200
|
|
# Author Jan Beulich <jbeulich@suse.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
x86/time: use correct (local) time stamp in constant-TSC calibration fast path
|
|
|
|
This looks like a copy and paste mistake in commit 1b6a99892d ("x86:
|
|
Simpler time handling when TSC is constant across all power saving
|
|
states"), responsible for occasional many-microsecond cross-CPU skew of
|
|
what NOW() returns.
|
|
|
|
Also improve the correlation between local TSC and stime stamps
|
|
obtained at the end of the two calibration handlers: Compute the stime
|
|
one from the TSC one, instead of doing another rdtsc() for that
|
|
compuation.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
|
|
--- a/xen/arch/x86/time.c
|
|
+++ b/xen/arch/x86/time.c
|
|
@@ -998,7 +998,7 @@ static void local_time_calibration(void)
|
|
/* Atomically read cpu_calibration struct and write cpu_time struct. */
|
|
local_irq_disable();
|
|
t->local_tsc_stamp = c->local_tsc_stamp;
|
|
- t->stime_local_stamp = c->stime_master_stamp;
|
|
+ t->stime_local_stamp = c->stime_local_stamp;
|
|
t->stime_master_stamp = c->stime_master_stamp;
|
|
local_irq_enable();
|
|
update_vcpu_system_time(current);
|
|
@@ -1275,7 +1275,7 @@ static void time_calibration_tsc_rendezv
|
|
}
|
|
|
|
c->local_tsc_stamp = rdtsc();
|
|
- c->stime_local_stamp = get_s_time();
|
|
+ c->stime_local_stamp = get_s_time_fixed(c->local_tsc_stamp);
|
|
c->stime_master_stamp = r->master_stime;
|
|
|
|
raise_softirq(TIME_CALIBRATE_SOFTIRQ);
|
|
@@ -1305,7 +1305,7 @@ static void time_calibration_std_rendezv
|
|
}
|
|
|
|
c->local_tsc_stamp = rdtsc();
|
|
- c->stime_local_stamp = get_s_time();
|
|
+ c->stime_local_stamp = get_s_time_fixed(c->local_tsc_stamp);
|
|
c->stime_master_stamp = r->master_stime;
|
|
|
|
raise_softirq(TIME_CALIBRATE_SOFTIRQ);
|