On 10/30/2012 11:23 AM, Avi Kivity wrote: > On 10/24/2012 03:13 PM, Marcelo Tosatti wrote: >> Originally from Jeremy Fitzhardinge. >> >> We can copy the information directly from "struct pvclock_vcpu_time_info", >> remove pvclock_shadow_time. >> >> Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx> >> >> >> unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src) >> @@ -90,21 +54,20 @@ void pvclock_resume(void) >> >> cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src) >> { >> - struct pvclock_shadow_time shadow; >> unsigned version; >> cycle_t ret, offset; >> u64 last; >> >> do { >> - version = pvclock_get_time_values(&shadow, src); >> + version = src->version; >> rdtsc_barrier(); >> - offset = pvclock_get_nsec_offset(&shadow); >> - ret = shadow.system_timestamp + offset; >> + offset = pvclock_get_nsec_offset(src); >> + ret = src->system_time + offset; >> rdtsc_barrier(); >> - } while (version != src->version); >> + } while ((src->version & 1) || version != src->version); >> >> if ((valid_flags & PVCLOCK_TSC_STABLE_BIT) && >> - (shadow.flags & PVCLOCK_TSC_STABLE_BIT)) >> + (src->flags & PVCLOCK_TSC_STABLE_BIT)) >> return ret; >> > > You're now reading PVCLOCK_TSC_STABLE outside the critical section. We > could have live migrated to a tsc-unstable host and had this flag cleared. > I see it's fixed in patch 5. So there's a window of two patches where this is broken. -- error compiling committee.c: too many arguments to function -- 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