[SRU][N:linux-azure][PATCH 2/2] Revert "UBUNTU: SAUCE: clocksource: hyper-v: do not use an insanely big TSC in hv_read_tsc_page_tsc()"

John Cabaj john.cabaj at canonical.com
Tue Sep 22 20:53:51 UTC 2026


BugLink: https://bugs.launchpad.net/bugs/2167893

This reverts commit 895f106d8d01950eee345904f1285a7854eb07fd.

Signed-off-by: John Cabaj <john.cabaj at canonical.com>
---
 drivers/clocksource/hyperv_timer.c | 4 +---
 include/clocksource/hyperv_timer.h | 4 ----
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c
index 7a61d9bfdc551..b39dee7b93af0 100644
--- a/drivers/clocksource/hyperv_timer.c
+++ b/drivers/clocksource/hyperv_timer.c
@@ -432,10 +432,8 @@ static __always_inline u64 read_hv_clock_tsc(void)
 	 * times are in sync and monotonic. Therefore we can fall back
 	 * to the MSR in case the TSC page indicates unavailability.
 	 */
-	if (!hv_read_tsc_page_tsc(tsc_page, &cur_tsc, &time)) {
-		WARN_ONCE(((s64)cur_tsc) < 0, "TSC is too big: %llx\n", cur_tsc);
+	if (!hv_read_tsc_page_tsc(tsc_page, &cur_tsc, &time))
 		time = read_hv_clock_msr();
-	}
 
 	return time;
 }
diff --git a/include/clocksource/hyperv_timer.h b/include/clocksource/hyperv_timer.h
index 76197d44618fd..aa5233b1eba97 100644
--- a/include/clocksource/hyperv_timer.h
+++ b/include/clocksource/hyperv_timer.h
@@ -77,10 +77,6 @@ hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page *tsc_pg,
 		offset = READ_ONCE(tsc_pg->tsc_offset);
 		*cur_tsc = hv_get_raw_timer();
 
-		/* In case the TSC is insanely big, do not use it. */
-		if (((s64)*cur_tsc) < 0)
-			return false;
-
 		/*
 		 * Make sure we read sequence after we read all other values
 		 * from TSC page.
-- 
2.43.0




More information about the kernel-team mailing list