From 8f1981d7b5546dc960ae356d5219dc83a17e90ea Mon Sep 17 00:00:00 2001 From: Marcelo Tosatti Date: Tue, 27 Nov 2012 23:28:53 -0200 Subject: [PATCH] --- yaml --- r: 343536 b: refs/heads/master c: 189e11731aa858597095fbe1e6d243bad26bd96b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/pvclock.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index fbc4cd8035da..31577e81ff7b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2697902be89d7f38e9736dfe946cd0e5d4f47b80 +refs/heads/master: 189e11731aa858597095fbe1e6d243bad26bd96b diff --git a/trunk/arch/x86/include/asm/pvclock.h b/trunk/arch/x86/include/asm/pvclock.h index ea27a8dd189c..63f91679af73 100644 --- a/trunk/arch/x86/include/asm/pvclock.h +++ b/trunk/arch/x86/include/asm/pvclock.h @@ -74,6 +74,12 @@ unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src, u8 ret_flags; version = src->version; + /* Note: emulated platforms which do not advertise SSE2 support + * result in kvmclock not using the necessary RDTSC barriers. + * Without barriers, it is possible that RDTSC instruction reads from + * the time stamp counter outside rdtsc_barrier protected section + * below, resulting in violation of monotonicity. + */ rdtsc_barrier(); offset = pvclock_get_nsec_offset(src); ret = src->system_time + offset;