Skip to contentSkip to conversation

kvmclock: serialize RDTSC

PATCH Applied Marcelo Tosatti 2 participants 2 messages Jun 15, 2013 – Jun 17, 2013 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvmclock: serialize RDTSC

Serialize RDTSC so its executed inside kvmclock_read section.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=922285

x86/kvmclock.c +2 -2
index 0624da3..5b831c5 100644
@@ -177,10 +177,10 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
 
 	do {
 		version = pvclock_get_time_values(&shadow, src);
-		barrier();
+		mb();
 		offset = pvclock_get_nsec_offset(&shadow);
 		ret = shadow.system_timestamp + offset;
-		barrier();
+		mb();
 	} while (version != src->version);
 
 	if ((valid_flags & PVCLOCK_RAW_CYCLE_BIT) ||
maintainer Applied
#1 lore raw

Il 14/06/2013 23:30, Marcelo Tosatti ha scritto:

Quoted 26 lines

Serialize RDTSC so its executed inside kvmclock_read section.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=922285

x86/kvmclock.c +2 -3
index 0624da3..5b831c5 100644
@@ -177,10 +177,10 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
 
 	do {
 		version = pvclock_get_time_values(&shadow, src);
-		barrier();
+		mb();
 		offset = pvclock_get_nsec_offset(&shadow);
 		ret = shadow.system_timestamp + offset;
-		barrier();
+		mb();
 	} while (version != src->version);
 
 	if ((valid_flags & PVCLOCK_RAW_CYCLE_BIT) ||
--
Quoted 4 lines

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

Applied, thanks.

Paolo