[patch 07/18] x86: pvclock: add note about rdtsc barriers

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

 



As noted by Gleb, not advertising SSE2 support implies
no RDTSC barriers.

Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

Index: vsyscall/arch/x86/include/asm/pvclock.h
===================================================================
--- vsyscall.orig/arch/x86/include/asm/pvclock.h
+++ vsyscall/arch/x86/include/asm/pvclock.h
@@ -74,6 +74,12 @@ unsigned __pvclock_read_cycles(const str
 	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;


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux