Re: [PATCH RESEND] ptp: add VMware virtual PTP clock driver
From: Vivek Thampi <hidden>
Date: 2020-03-05 04:47:34
Also in:
lkml, netdev
Thanks for taking a look, David. On Wed, Mar 04, 2020 at 02:04:10PM -0800, David Miller wrote:
From: Vivek Thampi <redacted> Date: Fri, 28 Feb 2020 05:32:46 +0000quoted
Add a PTP clock driver called ptp_vmw, for guests running on VMware ESXi hypervisor. The driver attaches to a VMware virtual device called "precision clock" that provides a mechanism for querying host system time. Similar to existing virtual PTP clock drivers (e.g. ptp_kvm), ptp_vmw utilizes the kernel's PTP hardware clock API to implement a clock device that can be used as a reference in Chrony for synchronizing guest time with host. The driver is only applicable to x86 guests running in VMware virtual machines with precision clock virtual device present. It uses a VMware specific hypercall mechanism to read time from the device. Reviewed-by: Thomas Hellstrom <redacted> Signed-off-by: Vivek Thampi <redacted> --- Based on feedback, resending patch to include a broader audience.If it's just providing a read of an accurate timesource, I think it's kinda pointless to provide a full PTP driver for it.
The point of a PTP driver for this timesource is to provide an interface that can be consumed by Chrony (and possibly other applications) as a reference clock for time sync. This is admittedly a very basic first step providing just PTP_SYS_OFFSET functionality (which gets us to <1us VM-host time sync). Down the line, I also intend to introduce cross-timestamping for more precise offsets. Using the PHC infrastructure seems like a good fit for this, but please let me know if I'm missing something or misinterpreting your comment. Thanks.