hv_utils: Allow implicit ICTIMESYNCFLAG_SYNC
authorPeter Martincic <pmartincic@microsoft.com>
Mon, 27 Nov 2023 21:35:24 +0000 (13:35 -0800)
committerWei Liu <wei.liu@kernel.org>
Fri, 1 Mar 2024 08:19:06 +0000 (08:19 +0000)
commitadf47524b56a791734ae24da8412c6579e2fab4f
tree868b3b9d4810131da98af73676216b1413513735
parentd206a76d7d2726f3b096037f2079ce0bd3ba329b
hv_utils: Allow implicit ICTIMESYNCFLAG_SYNC

Hyper-V hosts can omit the _SYNC flag to due a bug on resume from modern
suspend. In such a case, the guest may fail to update its time-of-day to
account for the period when it was suspended, and could proceed with a
significantly wrong time-of-day. In such a case when the guest is
significantly behind, fix it by treating a _SAMPLE the same as if _SYNC
was received so that the guest time-of-day is updated.

This is hidden behind param hv_utils.timesync_implicit.

Signed-off-by: Peter Martincic <pmartincic@microsoft.com>
Acked-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20231127213524.52783-1-pmartincic@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20231127213524.52783-1-pmartincic@linux.microsoft.com>
drivers/hv/hv_util.c