Re: What time is it kvm-clock?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-02-24 21:53+0100, Radim Krčmář:
> 2016-02-24 12:24-0800, Andy Lutomirski:
>> On Wed, Feb 24, 2016 at 12:17 PM, Radim Krčmář <rkrcmar@xxxxxxxxxx> wrote:
>>> Do you find anything incorrect with
>>>  * kvmclock measures the flow of time.
>>>  * time in kvmclock flows at the same rate as host's CLOCK_BOOTTIME.
>>> ?
>> 
>> If we could supply CLOCK_REALTIME as well and advertise that fact to
>> guest userspace (perhaps with a sysctl or similar in the guest to turn
>> it on), it would be *awesome*.  Guests with access to this feature
>> could simply not run ntpd/chronyd.
> 
> I think that pvclock_wall_clock interface is there to do that.
> (If pvclock_vcpu_time_info can provide what is claimed above.)
> 
> If pvclock_wall_clock version field matches with pvclock_vcpu_time_info,

Correction: versioning schemes are independent.  (pvclock_wall_clock
needs a version because of CPUs that can't atomically access 64 bits.)

> then the guest can add those two and get CLOCK_REALTIME.

pvclock_wall_clock provides CLOCK_REALTIME when pvclock_wall_clock was
0, so the guest can just add them to get current CLOCK_REALTIME.

(The agreement is that CLOCK_REALTIME started in 1970.)
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux