diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2017-05-18 20:46:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-25 16:42:42 +0300 |
commit | 1d10602d306cb7f70545b5e1166efc9409e7d384 (patch) | |
tree | a345216d6831c53d661b759688a84e81b383dd24 /drivers/hv/connection.c | |
parent | 4f9bac039a64f6306b613a0d90e6b7e75d7ab0c4 (diff) | |
download | linux-1d10602d306cb7f70545b5e1166efc9409e7d384.tar.xz |
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