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

[PATCH 0/2] time: fix time accounting for x86 HVM guests


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Tue, 14 Apr 2026 12:33:25 +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=qkmC8IXQxgYOEFFtKm/qpnF1ibUpy9+DhFJIcy5HhzQ=; b=IsghH2346Dr51BGHwL9i+e2TVbZB4VPJFp1mCRi9++Y8WYE3zq+Ke1ufN/qey2kpmafDjkU92kTDrhdixqU8AOMXL0kJ8ALpbApq40GoZYALD4BYyNbAAUTeBsBfpMvM5ll752AciNs+Qu5RVTtqU+7AUaDHCK+Ktl5sKVfXe4qMuTCnq34ao+L7vrDRmBt2zoZ+FhEKeDasjU2sR6S1puClhN9pMtOCas2dd35vRhVBw8ckVyO+9U1TimxK4EAu6QkQZtLgw+MAvn3DS1mRXbTUWP7U36M19UdgYtdOfZSOPMMeIAOA0joHfl1m+gJ7dU0v/OthBuyA4tDOkiNFXg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ExzE881PzynhrciFQfyBS2bSjDlG6dA1hcz5KCX7MkZ0CZbC/GoWd/R4LJq+sh4GYrpoh24T/rrsBw29zeJAQzbYyGbbsJS5w+BbRcyFtiHADVf+Q0VT/+AsZL2S4S/q5d7lFBl0d52TO4BNSeYEFVk3jPoF2ugpNn2WtRQYURlswsPseyb1Nlj1sRAzllOwOaxcM9pIK174Cdr+JftAlhq+RXPq9dn9Hb+zcV176EXFXn3UkfjO5DlXACJn31x/hCtIItViw/LWThoS07+m2cI/Ajb9Qq96SyJuRzXJI59GgLRSLWL9bwGvU5RhkNZRRpFGw7vaSeAAOMoOas7yXQ==
  • 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>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Tue, 14 Apr 2026 10:34:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

When not emulating the TSC the guest time value calculated by using the
vCPU time info page in HVM mode would drift between time synchronization
intervals.  First patch fixes the drift, second patch makes the
calculation of cpu_khz round up the value for better accuracy.

Thanks, Roger.

Roger Pau Monne (2):
  x86/time: use native TSC scaling factors when TSC is not scaled
  xen/cpu: round up cpu_khz calculations

 xen/arch/arm/time.c   |  4 ++--
 xen/arch/riscv/time.c |  2 +-
 xen/arch/x86/time.c   | 20 ++++++++++++++------
 3 files changed, 17 insertions(+), 9 deletions(-)

-- 
2.53.0




 


Rackspace

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