From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from PVCLOCK_COUNTS_FROM_ZERO. Date: Mon, 28 Sep 2015 13:05:58 +0200 Message-ID: <56091F16.5050503@redhat.com> References: <1442591670-5216-1-git-send-email-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, Marcelo Tosatti , Luiz Capitulino To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org Return-path: In-Reply-To: <1442591670-5216-1-git-send-email-rkrcmar@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 18/09/2015 17:54, Radim Kr=C4=8Dm=C3=A1=C5=99 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. >=20 > [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. >=20 > A viable alternative would be to implement opt-in features in kvm clo= ck. >=20 > 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, s= truct msr_data *msr_info) > =20 > ka->boot_vcpu_runs_old_kvmclock =3D tmp; > =20 > - ka->kvmclock_offset =3D -get_kernel_ns(); > + if (!ka->boot_vcpu_runs_old_kvmclock) > + ka->kvmclock_offset =3D -get_kernel_ns(); > } > =20 > vcpu->arch.time =3D data; >=20 >=20 > Radim Kr=C4=8Dm=C3=A1=C5=99 (2): > x86: kvmclock: abolish PVCLOCK_COUNTS_FROM_ZERO > Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmcl= ock > system MSR" >=20 > 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(-) >=20