From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932827AbbI1LGD (ORCPT ); Mon, 28 Sep 2015 07:06:03 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:34252 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932533AbbI1LGB (ORCPT ); Mon, 28 Sep 2015 07:06:01 -0400 Subject: Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from PVCLOCK_COUNTS_FROM_ZERO. To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org References: <1442591670-5216-1-git-send-email-rkrcmar@redhat.com> Cc: kvm@vger.kernel.org, Marcelo Tosatti , Luiz Capitulino From: Paolo Bonzini Message-ID: <56091F16.5050503@redhat.com> Date: Mon, 28 Sep 2015 13:05:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1442591670-5216-1-git-send-email-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/09/2015 17:54, Radim Krčmář wrote: > This patch series will be disabling PVCLOCK_COUNTS_FROM_ZERO flag and is > RFC because I haven't explored many potential problems or tested it. > > [1/2] uses a different algorithm in the guest to start counting from 0. > [2/2] stops exposing PVCLOCK_COUNTS_FROM_ZERO in the hypervisor. > > A viable alternative would be to implement opt-in features in kvm clock. > > And because we probably only broke one old user (the infamous SLES 10), a > workaround like this is also possible: (but I'd rather not do that) Thanks, applying 2/2 for 4.4 and 1/2 for 4.3. Paolo > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index a60bdbccff51..ae9049248aaf 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -2007,7 +2007,8 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) > > ka->boot_vcpu_runs_old_kvmclock = tmp; > > - ka->kvmclock_offset = -get_kernel_ns(); > + if (!ka->boot_vcpu_runs_old_kvmclock) > + ka->kvmclock_offset = -get_kernel_ns(); > } > > vcpu->arch.time = data; > > > Radim Krčmář (2): > x86: kvmclock: abolish PVCLOCK_COUNTS_FROM_ZERO > Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock > system MSR" > > arch/x86/include/asm/pvclock-abi.h | 1 + > arch/x86/kernel/kvmclock.c | 46 +++++++++++++++++++++++++++++--------- > arch/x86/kvm/x86.c | 4 ---- > 3 files changed, 36 insertions(+), 15 deletions(-) >