Commit 9bac175d authored by Radim Krčmář's avatar Radim Krčmář Committed by Paolo Bonzini

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

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 reverts commit b7e60c5a.
And adds a note to the definition of PVCLOCK_COUNTS_FROM_ZERO.
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Acked-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 9ffecb10
...@@ -41,6 +41,7 @@ struct pvclock_wall_clock { ...@@ -41,6 +41,7 @@ struct pvclock_wall_clock {
#define PVCLOCK_TSC_STABLE_BIT (1 << 0) #define PVCLOCK_TSC_STABLE_BIT (1 << 0)
#define PVCLOCK_GUEST_STOPPED (1 << 1) #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) #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2)
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _ASM_X86_PVCLOCK_ABI_H */ #endif /* _ASM_X86_PVCLOCK_ABI_H */
...@@ -1708,8 +1708,6 @@ static int kvm_guest_time_update(struct kvm_vcpu *v) ...@@ -1708,8 +1708,6 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
vcpu->pvclock_set_guest_stopped_request = false; vcpu->pvclock_set_guest_stopped_request = false;
} }
pvclock_flags |= PVCLOCK_COUNTS_FROM_ZERO;
/* If the host uses TSC clocksource, then it is stable */ /* If the host uses TSC clocksource, then it is stable */
if (use_master_clock) if (use_master_clock)
pvclock_flags |= PVCLOCK_TSC_STABLE_BIT; pvclock_flags |= PVCLOCK_TSC_STABLE_BIT;
...@@ -2007,8 +2005,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) ...@@ -2007,8 +2005,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
&vcpu->requests); &vcpu->requests);
ka->boot_vcpu_runs_old_kvmclock = tmp; ka->boot_vcpu_runs_old_kvmclock = tmp;
ka->kvmclock_offset = -get_kernel_ns();
} }
vcpu->arch.time = data; vcpu->arch.time = data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment