* kvm masterclock
@ 2016-09-05 15:50 Mika Penttilä
2016-09-06 8:21 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Mika Penttilä @ 2016-09-05 15:50 UTC (permalink / raw)
To: kvm
While using the master clock among guests, when is it updated? Thought it had to be in
pvclock_gtod_notify() but it only triggers update of :
master_kernel_ns, master_cycle_now
if clocksource changes away from TSC :
if (gtod->clock.vclock_mode != VCLOCK_TSC &&
atomic_read(&kvm_guest_has_master_clock) != 0)
queue_work(system_long_wq, &pvclock_gtod_work);
And gtod work would set KVM_REQ_MASTERCLOCK_UPDATE if queued, which is not the case if always TSC.
So kvm_guest_time_update() always uses same values is use_master_clock ?
Maybe I missed some piece?
--Mika
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kvm masterclock
2016-09-05 15:50 kvm masterclock Mika Penttilä
@ 2016-09-06 8:21 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2016-09-06 8:21 UTC (permalink / raw)
To: Mika Penttilä, kvm
On 05/09/2016 17:50, Mika Penttilä wrote:
> While using the master clock among guests, when is it updated? Thought it had to be in
>
> pvclock_gtod_notify() but it only triggers update of :
>
> master_kernel_ns, master_cycle_now
>
> if clocksource changes away from TSC :
>
> if (gtod->clock.vclock_mode != VCLOCK_TSC &&
> atomic_read(&kvm_guest_has_master_clock) != 0)
> queue_work(system_long_wq, &pvclock_gtod_work);
>
> And gtod work would set KVM_REQ_MASTERCLOCK_UPDATE if queued, which is not the case if always TSC.
>
> So kvm_guest_time_update() always uses same values is use_master_clock ?
Yes, if the master clock is in use the kvmclock does _not_ adjust itself
and, as a consequence, doesn't follow host NTP adjustments.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-06 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 15:50 kvm masterclock Mika Penttilä
2016-09-06 8:21 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.