From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] kvm: x86: fix kvmclock update protocol Date: Thu, 23 Apr 2015 17:24:05 +0200 Message-ID: <20150423152405.GA1927@potion.brq.redhat.com> References: <1429789615-36001-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, luto@kernel.org, mtosatti@redhat.com To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <1429789615-36001-1-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2015-04-23 13:46+0200, Paolo Bonzini: > From: Radim Kr=C4=8Dm=C3=A1=C5=99 >=20 > The kvmclock spec says that the host will increment a version field t= o > an odd number, then update stuff, then increment it to an even number= =2E > The host is buggy and doesn't do this, and the result is observable > when one vcpu reads another vcpu's kvmclock data. >=20 > There's no good way for a guest kernel to keep its vdso from reading > a different vcpu's kvmclock data, but we don't need to care about > changing VCPUs as long as we read a consistent data from kvmclock. > (VCPU can change outside of this loop too, so it doesn't matter if we > return a value not fit for this VCPU.) >=20 > Based on a patch by Radim Kr=C4=8Dm=C3=A1=C5=99. >=20 > Signed-off-by: Paolo Bonzini > --- Nice, Reviewed-by: Radim Kr=C4=8Dm=C3=A1=C5=99