hv_utils: return error if host timesysnc update is stale
authorVineeth Pillai <viremana@linux.microsoft.com>
Fri, 21 Aug 2020 15:25:23 +0000 (15:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:09 +0000 (19:14 +0200)
commit6a725c83a08d41f2bc1630835712a4edc2e6caad
treeb8535c742cbe4a8df69cec1b183fce6d05cb6ab6
parent4f3ffd5fcbf77a0bb497a89c1b28c2a4532a9101
hv_utils: return error if host timesysnc update is stale

[ Upstream commit 90b125f4cd2697f949f5877df723a0b710693dd0 ]

If for any reason, host timesync messages were not processed by
the guest, hv_ptp_gettime() returns a stale value and the
caller (clock_gettime, PTP ioctl etc) has no means to know this
now. Return an error so that the caller knows about this.

Signed-off-by: Vineeth Pillai <viremana@linux.microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20200821152523.99364-1-viremana@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hv/hv_util.c