From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 2/2] Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR" Date: Tue, 22 Sep 2015 16:01:33 -0300 Message-ID: <20150922190133.GB23748@amt.cnet> References: <1442591670-5216-1-git-send-email-rkrcmar@redhat.com> <1442591670-5216-3-git-send-email-rkrcmar@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, Paolo Bonzini , Luiz Capitulino To: Radim =?utf-8?B?S3LEjW3DocWZ?= Return-path: Content-Disposition: inline In-Reply-To: <1442591670-5216-3-git-send-email-rkrcmar@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Sep 18, 2015 at 05:54:30PM +0200, Radim Kr=C4=8Dm=C3=A1=C5=99 w= rote: > Shifting pvclock_vcpu_time_info.system_time on write to KVM system ti= me > MSR is a change of ABI. Probably only 2.6.16 based SLES 10 breaks du= e > to its custom enhancements to kvmclock, but KVM never declared the MS= R > only for one-shot initialization. (Doc says that only one write is > needed.) >=20 > This reverts commit b7e60c5aedd2b63f16ef06fde4f81ca032211bc5. > And adds a note to the definition of PVCLOCK_COUNTS_FROM_ZERO. >=20 > Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 > --- > arch/x86/include/asm/pvclock-abi.h | 1 + > arch/x86/kvm/x86.c | 4 ---- > 2 files changed, 1 insertion(+), 4 deletions(-) >=20 > diff --git a/arch/x86/include/asm/pvclock-abi.h b/arch/x86/include/as= m/pvclock-abi.h > index 655e07a48f6c..67f08230103a 100644 > --- a/arch/x86/include/asm/pvclock-abi.h > +++ b/arch/x86/include/asm/pvclock-abi.h > @@ -41,6 +41,7 @@ struct pvclock_wall_clock { > =20 > #define PVCLOCK_TSC_STABLE_BIT (1 << 0) > #define PVCLOCK_GUEST_STOPPED (1 << 1) > +/* PVCLOCK_COUNTS_FROM_ZERO broke ABI and can't be used anymore. */ > #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) > #endif /* __ASSEMBLY__ */ > #endif /* _ASM_X86_PVCLOCK_ABI_H */ > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 18d59b584dee..34d33f4757d2 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -1707,8 +1707,6 @@ static int kvm_guest_time_update(struct kvm_vcp= u *v) > vcpu->pvclock_set_guest_stopped_request =3D false; > } > =20 > - pvclock_flags |=3D PVCLOCK_COUNTS_FROM_ZERO; > - > /* If the host uses TSC clocksource, then it is stable */ > if (use_master_clock) > pvclock_flags |=3D PVCLOCK_TSC_STABLE_BIT; > @@ -2006,8 +2004,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, s= truct msr_data *msr_info) > &vcpu->requests); > =20 > ka->boot_vcpu_runs_old_kvmclock =3D tmp; > - > - ka->kvmclock_offset =3D -get_kernel_ns(); > } > =20 > vcpu->arch.time =3D data; > --=20 > 2.5.2 ACK