summaryrefslogtreecommitdiffstats
path: root/drivers/hv/connection.c
diff options
context:
space:
mode:
authorVitaly Kuznetsov2017-05-18 19:46:04 +0200
committerGreg Kroah-Hartman2017-05-25 15:42:42 +0200
commit1d10602d306cb7f70545b5e1166efc9409e7d384 (patch)
treea345216d6831c53d661b759688a84e81b383dd24 /drivers/hv/connection.c
parenthv_utils: drop .getcrosststamp() support from PTP driver (diff)
downloadkernel-qcow2-linux-1d10602d306cb7f70545b5e1166efc9409e7d384.tar.gz
kernel-qcow2-linux-1d10602d306cb7f70545b5e1166efc9409e7d384.tar.xz
kernel-qcow2-linux-1d10602d306cb7f70545b5e1166efc9409e7d384.zip
hv_utils: fix TimeSync work on pre-TimeSync-v4 hosts
It was found that ICTIMESYNCFLAG_SYNC packets are handled incorrectly on WS2012R2, e.g. after the guest is paused and resumed its time is set to something different from host's time. The problem is that we call adj_guesttime() with reftime=0 for these old hosts and we don't account for that in 'if (adj_flags & ICTIMESYNCFLAG_SYNC)' branch and hv_set_host_time(). While we could've solved this by adding a check like 'if (ts_srv_version > TS_VERSION_3)' to hv_set_host_time() I prefer to do some refactoring. We don't need to have two separate containers for host samples, struct host_ts which we use for PTP is enough. Throw away 'struct adj_time_work' and create hv_get_adj_host_time() accessor to host_ts to avoid code duplication. Fixes: 3716a49a81ba ("hv_utils: implement Hyper-V PTP source") Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/connection.c')
0 files changed, 0 insertions, 0 deletions