diff options
| author | Marcelo Tosatti <mtosatti@redhat.com> | 2012-11-27 20:28:53 -0500 |
|---|---|---|
| committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-11-27 20:29:08 -0500 |
| commit | 189e11731aa858597095fbe1e6d243bad26bd96b (patch) | |
| tree | 7d7857fc8766606afb45da7303fa3242ae844665 /arch/x86/include/asm | |
| parent | 2697902be89d7f38e9736dfe946cd0e5d4f47b80 (diff) | |
x86: pvclock: add note about rdtsc barriers
As noted by Gleb, not advertising SSE2 support implies
no RDTSC barriers.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include/asm')
| -rw-r--r-- | arch/x86/include/asm/pvclock.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h index ea27a8dd189..63f91679af7 100644 --- a/arch/x86/include/asm/pvclock.h +++ b/arch/x86/include/asm/pvclock.h | |||
| @@ -74,6 +74,12 @@ unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src, | |||
| 74 | u8 ret_flags; | 74 | u8 ret_flags; |
| 75 | 75 | ||
| 76 | version = src->version; | 76 | version = src->version; |
| 77 | /* Note: emulated platforms which do not advertise SSE2 support | ||
| 78 | * result in kvmclock not using the necessary RDTSC barriers. | ||
| 79 | * Without barriers, it is possible that RDTSC instruction reads from | ||
| 80 | * the time stamp counter outside rdtsc_barrier protected section | ||
| 81 | * below, resulting in violation of monotonicity. | ||
| 82 | */ | ||
| 77 | rdtsc_barrier(); | 83 | rdtsc_barrier(); |
| 78 | offset = pvclock_get_nsec_offset(src); | 84 | offset = pvclock_get_nsec_offset(src); |
| 79 | ret = src->system_time + offset; | 85 | ret = src->system_time + offset; |
