Re: [PATCH 2/2] Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR"

2015-09-23 Thread Marcelo Tosatti
On Tue, Sep 22, 2015 at 09:52:49PM +0200, Paolo Bonzini wrote: > > > On 22/09/2015 21:01, Marcelo Tosatti wrote: > > On Fri, Sep 18, 2015 at 05:54:30PM +0200, Radim Krčmář wrote: > >> Shifting pvclock_vcpu_time_info.system_time on write to KVM system time > >> MSR is a change of ABI. Probably on

Re: [PATCH v1] Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR"

2015-09-22 Thread Paolo Bonzini
On 22/09/2015 21:02, Marcelo Tosatti wrote: > NACK, please use original patchset. What do you mean? Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR"

2015-09-22 Thread Paolo Bonzini
On 22/09/2015 21:01, Marcelo Tosatti wrote: > On Fri, Sep 18, 2015 at 05:54:30PM +0200, Radim Krčmář wrote: >> Shifting pvclock_vcpu_time_info.system_time on write to KVM system time >> MSR is a change of ABI. Probably only 2.6.16 based SLES 10 breaks due >> to its custom enhancements to kvmcloc

Re: [PATCH v1] Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR"

2015-09-22 Thread Marcelo Tosatti
On Tue, Sep 22, 2015 at 06:33:46PM +0200, Radim Krčmář wrote: > PVCLOCK_COUNTS_FROM_ZERO broke ABI and (at least) three things with it. > All problems stem from repeated writes to MSR_KVM_SYSTEM_TIME(_NEW). > The reverted patch treated the MSR write as a one-shot initializer: > any write from VCPU

Re: [PATCH 2/2] Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR"

2015-09-22 Thread Marcelo Tosatti
On Fri, Sep 18, 2015 at 05:54:30PM +0200, Radim Krčmář wrote: > Shifting pvclock_vcpu_time_info.system_time on write to KVM system time > MSR is a change of ABI. Probably only 2.6.16 based SLES 10 breaks due > to its custom enhancements to kvmclock, but KVM never declared the MSR > only for one-sh

[PATCH v1] Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR"

2015-09-22 Thread Radim Krčmář
PVCLOCK_COUNTS_FROM_ZERO broke ABI and (at least) three things with it. All problems stem from repeated writes to MSR_KVM_SYSTEM_TIME(_NEW). The reverted patch treated the MSR write as a one-shot initializer: any write from VCPU 0 would reset system_time. And this is what broke for Linux guests: *

[PATCH 2/2] Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR"

2015-09-18 Thread Radim Krčmář
Shifting pvclock_vcpu_time_info.system_time on write to KVM system time MSR is a change of ABI. Probably only 2.6.16 based SLES 10 breaks due to its custom enhancements to kvmclock, but KVM never declared the MSR only for one-shot initialization. (Doc says that only one write is needed.) This re

[patch v2 3/3] KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR

2015-05-28 Thread Marcelo Tosatti
Initialize kvmclock base, on kvmclock system MSR write time, so that the guest sees kvmclock counting from zero. This matches baremetal behaviour when kvmclock in guest sets sched clock stable. Signed-off-by: Marcelo Tosatti --- arch/x86/kvm/x86.c |4 1 file changed, 4 insertions(+)

Re: [patch 3/3] KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR

2015-05-28 Thread Paolo Bonzini
On 28/05/2015 03:47, Marcelo Tosatti wrote: > Initialize kvmclock base, on kvmclock system MSR write time, > so that the guest sees kvmclock counting from zero. > > This matches baremetal behaviour when kvmclock in guest > sets sched clock stable. > > Signed-off-by: Marcelo Tosatti > > --- >

[patch 3/3] KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR

2015-05-27 Thread Marcelo Tosatti
Initialize kvmclock base, on kvmclock system MSR write time, so that the guest sees kvmclock counting from zero. This matches baremetal behaviour when kvmclock in guest sets sched clock stable. Signed-off-by: Marcelo Tosatti --- arch/x86/kvm/x86.c |5 + 1 file changed, 5 insertions(+)

Re: [PATCH v2] KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR

2015-05-26 Thread Luiz Capitulino
On Sat, 23 May 2015 17:06:29 -0300 Marcelo Tosatti wrote: > Initialize kvmclock base, on kvmclock system MSR write time, > so that the guest sees kvmclock counting from zero. > > This matches baremetal behaviour when kvmclock in guest > sets sched clock stable. > > Signed-off-by: Marcelo Tosat

[PATCH v2] KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR

2015-05-23 Thread Marcelo Tosatti
Initialize kvmclock base, on kvmclock system MSR write time, so that the guest sees kvmclock counting from zero. This matches baremetal behaviour when kvmclock in guest sets sched clock stable. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index cc2c759..e

Re: KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR

2015-05-22 Thread Owen Hofmann
Change as described sounds good, however: > @@ -2188,6 +2188,8 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, > struct msr_data *msr_info) > &vcpu->requests); > > ka->boot_vcpu_runs_old_kvmclock = tmp; > + > +

KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR

2015-05-21 Thread Marcelo Tosatti
Initialize kvmclock base, on kvmclock system MSR write time, so that the guest sees kvmclock counting from zero. This matches baremetal behaviour when kvmclock in guest sets sched clock stable. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index cc2c759..