2015-03-23 20:21-0300, Marcelo Tosatti: > The following point: > > 2. per-CPU pvclock time info is updated if the > underlying CPU changes. > > Is not true anymore since "KVM: x86: update pvclock area conditionally, > on cpu migration". > > Add task migration notification back. > > Problem noticed by Andy Lutomirski. > > Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx> > CC: stable@xxxxxxxxxx # 3.11+ Please improve the commit message. "KVM: x86: update pvclock area conditionally [...]" was merged half a year before the patch we are reverting and is completely unrelated to the bug we are fixing now, (reverted patch just was just wrong) Reviewed-by: Radim Krčmář <rkrcmar@xxxxxxxxxx> > diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c > @@ -82,18 +82,15 @@ static notrace cycle_t vread_pvclock(int *mode) > /* > - * Note: hypervisor must guarantee that: > - * 1. cpu ID number maps 1:1 to per-CPU pvclock time info. > - * 2. that per-CPU pvclock time info is updated if the > - * underlying CPU changes. > - * 3. that version is increased whenever underlying CPU > - * changes. > - * > + * When looping to get a consistent (time-info, tsc) pair, we > + * also need to deal with the possibility we can switch vcpus, > + * so make sure we always re-fetch time-info for the current vcpu. (All points from the original comment need to hold -- it would be nicer to keep both.) -- 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