* [PATCH] KVM: remove useless write to vcpu->hv_clock.tsc_timestamp
@ 2014-01-15 17:08 Paolo Bonzini
2014-01-15 23:10 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2014-01-15 17:08 UTC (permalink / raw)
To: linux-kernel; +Cc: mtosatti, kvm, glommer
After the previous patch from Marcelo, the comment before this write
became obsolete. In fact, the write is unnecessary. The calls to
kvm_write_tsc ultimately result in a master clock update as soon as
all TSCs agree and the master clock is re-enabled. This master
clock update will rewrite tsc_timestamp.
So, together with the comment, delete the dead write too.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
arch/x86/kvm/x86.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 842abd3..0fbdced 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1278,8 +1278,6 @@ void kvm_write_tsc(struct kvm_vcpu *vcpu, struct msr_data *msr)
kvm->arch.last_tsc_write = data;
kvm->arch.last_tsc_khz = vcpu->arch.virtual_tsc_khz;
- /* Reset of TSC must disable overshoot protection below */
- vcpu->arch.hv_clock.tsc_timestamp = 0;
vcpu->arch.last_guest_tsc = data;
/* Keep track of which generation this VCPU has synchronized to */
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: remove useless write to vcpu->hv_clock.tsc_timestamp
2014-01-15 17:08 [PATCH] KVM: remove useless write to vcpu->hv_clock.tsc_timestamp Paolo Bonzini
@ 2014-01-15 23:10 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2014-01-15 23:10 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: linux-kernel, kvm, glommer
On Wed, Jan 15, 2014 at 06:08:11PM +0100, Paolo Bonzini wrote:
> After the previous patch from Marcelo, the comment before this write
> became obsolete. In fact, the write is unnecessary. The calls to
> kvm_write_tsc ultimately result in a master clock update as soon as
> all TSCs agree and the master clock is re-enabled. This master
> clock update will rewrite tsc_timestamp.
>
> So, together with the comment, delete the dead write too.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> arch/x86/kvm/x86.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 842abd3..0fbdced 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -1278,8 +1278,6 @@ void kvm_write_tsc(struct kvm_vcpu *vcpu, struct msr_data *msr)
> kvm->arch.last_tsc_write = data;
> kvm->arch.last_tsc_khz = vcpu->arch.virtual_tsc_khz;
>
> - /* Reset of TSC must disable overshoot protection below */
> - vcpu->arch.hv_clock.tsc_timestamp = 0;
> vcpu->arch.last_guest_tsc = data;
>
> /* Keep track of which generation this VCPU has synchronized to */
> --
> 1.7.1
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-15 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-15 17:08 [PATCH] KVM: remove useless write to vcpu->hv_clock.tsc_timestamp Paolo Bonzini
2014-01-15 23:10 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).