From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966326AbbDWPYN (ORCPT ); Thu, 23 Apr 2015 11:24:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55496 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965904AbbDWPYL (ORCPT ); Thu, 23 Apr 2015 11:24:11 -0400 Date: Thu, 23 Apr 2015 17:24:05 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, luto@kernel.org, mtosatti@redhat.com Subject: Re: [PATCH] kvm: x86: fix kvmclock update protocol 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1429789615-36001-1-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-04-23 13:46+0200, Paolo Bonzini: > From: Radim Krčmář > > The kvmclock spec says that the host will increment a version field to > an odd number, then update stuff, then increment it to an even number. > The host is buggy and doesn't do this, and the result is observable > when one vcpu reads another vcpu's kvmclock data. > > 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.) > > Based on a patch by Radim Krčmář. > > Signed-off-by: Paolo Bonzini > --- Nice, Reviewed-by: Radim Krčmář