kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR
@ 2015-05-22 21:40 Owen Hofmann
  2015-05-23 20:06 ` [PATCH v2] " Marcelo Tosatti
  0 siblings, 1 reply; 3+ messages in thread
From: Owen Hofmann @ 2015-05-22 21:40 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: KVM General, Paolo Bonzini, LKML, Sasha Levin

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;
> +
> +                       ka->kvmclock_offset = get_kernel_ns();
>                 }

Should this be ka->kvmclock_offset = -get_kernel_ns()?
kvm_guest_time_update() sets hv_clock.system_time = kernel_ns +
v->kvm->arch.kvmclock_offset, and similarly kvmclock_offset is added
to the value from get_kernel_ns() in the handler for
HV_X64_MSR_TIME_REF_COUNT.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-26 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22 21:40 KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR Owen Hofmann
2015-05-23 20:06 ` [PATCH v2] " Marcelo Tosatti
2015-05-26 13:22   ` Luiz Capitulino

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).