[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/time: do not kill calibration timer on suspend


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 10 Apr 2026 10:55:04 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2XJEhgp4BVZNw2sqSQY7yoDG2c9i7xv0t/nv/VfKyOw=; b=yH+DiJh2FosRl0zhENm6T0ExQrR2tn/yEyodiSXIG1i96g4jPqVcSWrbjr2BFNzEm9Q+KJK3r83lQHKg8d91N/TFpd5/SiFBLgeIVj+UesNTydXvqPo2jPXfpxChjqH0kIqhG7mCkvcgPODPECi8xXez/8MUdf0EIb7gTyiutG52I6UGmaX9i3SJB55zYd4GXTk0xgcp96RxhgyfDgqSwFZt3G7eSy/M1WoWgg8Og8N2Kl8X1BKJDIOgWTDOky+3C1l5R8m3sjcyGkorPFSc01F8Dpw/hKM7/VonIa1fetjMAY47DgU/4g2o6Y9Sv+3CMTUZSwfcJib1Lk0cP3u9tw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uUrrtux+Jx/TA96+RNy9aj0EgNUveo2+EEP8t1yOtzExP+X3DO+8FOUm5dfyowzrC4Ov7sYcmMMbouW2px90byPcbKCBqx8xJWd1ZTZy9sdXVuZBe7Szj8OaYAdxBKoomUxDYav983kWzz9y9QFu2cHNge7k+5ElsGBLJZPWPx+lB7q93Nnt67Ytz4jwmR/YXZEACDkUw9cajAUtKlpTXSfYARRyUwgMojE0FUlGLr3v3Nt4XPllwIW8/mwrGORSByAHSYtpeMak3lf/H+C9e8dvaMCIaWKesF1b3OQKSZBly5n1FFheViFzy3H+H7awvXZC2PaIpEFUoOqyYQae/Q==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 10 Apr 2026 08:55:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

A killed timer will ignore further set_timer() calls, and hence won't be
re-armed unless it's initialized again.  Use stop_timer() instead of
kill_timer() in time_suspend(), so that the set_timer() call in
time_resume() successfully re-arms the timer.  Otherwise time calibration
is no longer scheduled (and executed) after resuming from S3 suspend.

Fixes: 6d90db1a2ca1 ("x86: rendezvous-based local time calibration")
Reported-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/arch/x86/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index fed30a919d2c..4233ea507d40 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -2728,7 +2728,7 @@ int time_suspend(void)
     {
         cmos_utc_offset = -get_wallclock_time();
         cmos_utc_offset += get_sec();
-        kill_timer(&calibration_timer);
+        stop_timer(&calibration_timer);
 
         /* Sync platform timer stamps. */
         platform_time_calibration();
-- 
2.53.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.