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

[PATCH v1 15/25] xen/domctl: wrap around XEN_DOMCTL_settimeoffset


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Sun, 3 Aug 2025 17:47:28 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=MKCJ9vwLM3+NoLdeUojQBdoUwvP1C5l3ojylIEw6UR8=; b=kD/WKn6zgLTDP2vX+ENhrGoU5+zyi48Xc09gWEqIRfsW+5IiNVfBoFIp+p1SEke+bHw3L1iMrDIsPbBQobKLa70O3MLhMt1V0aC1b8Si1oeb8JFJAJVWjwkHhRwPp2/qvHW+5Jb4RyAoApd30bdyrBz6dGd0YKNMUCh0QT7cp6Wqze1f/+9UriGhu+y3acvNXPV6201cX048oI4QeFg+nRG/YhZrPyd2kDQQi9Ni/7yiyU8fxZ+j4r4Ht15Dutpk41N6KK8na9V6pBuWtSrEyOSaIGjdsgKdhzB2X4besLb4f4Pz+sdLqKCYcqCKsSxR4mz2aAfynCvtdg4fxz7pvA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OzMtirBEoe24sQOgNjDwzrxAwjJlKknllu4u1Vy5I6c3x4AF2UoyHOtmXBxH+0bqVx0kqH0ifjskshA5+PHYHPl7w86KZs4820apdUcvc26P5sxNj4H85f2QQ3O1GND5j60V1L7Eir7B8tIycKBSnsGq1ru69zGClifwz5ZqUNuQ72YdcmhIWFsmuq0zunvnpdfNnjI5RZQrkZZj6EdZds2f76d1juoDm9i4etT/Fw7ANpXsm5p5X0AzkwPUQhwVFQP5Dm2RZk9Tapq1pbjrEVDs02GOffQxO5WRxF6aoGGsa9ugdeyltG51UscW5XKlpFKi5H/9d3b4iMwTTOWI2w==
  • Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Sun, 03 Aug 2025 09:50:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Arch-specific domain_set_time_offset() is responisble for
XEN_DOMCTL_settimeoffset domctl-op, and shall be wrapped.

Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
 xen/arch/arm/time.c | 2 ++
 xen/arch/x86/time.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c
index e74d30d258..5955c7ce7a 100644
--- a/xen/arch/arm/time.c
+++ b/xen/arch/arm/time.c
@@ -365,12 +365,14 @@ void force_update_vcpu_system_time(struct vcpu *v)
     update_vcpu_system_time(v);
 }
 
+#ifdef CONFIG_DOMCTL
 void domain_set_time_offset(struct domain *d, int64_t time_offset_seconds)
 {
     d->time_offset.seconds = time_offset_seconds;
     d->time_offset.set = true;
     /* XXX update guest visible wallclock time */
 }
+#endif /* CONFIG_DOMCTL */
 
 static int cpu_time_callback(struct notifier_block *nfb,
                              unsigned long action,
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 59129f419d..c1411be64e 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1841,6 +1841,7 @@ static void update_domain_rtc(void)
     rcu_read_unlock(&domlist_read_lock);
 }
 
+#ifdef CONFIG_DOMCTL
 void domain_set_time_offset(struct domain *d, int64_t time_offset_seconds)
 {
     d->time_offset.seconds = time_offset_seconds;
@@ -1849,6 +1850,7 @@ void domain_set_time_offset(struct domain *d, int64_t 
time_offset_seconds)
         rtc_update_clock(d);
     update_domain_wallclock_time(d);
 }
+#endif /* CONFIG_DOMCTL */
 
 int cpu_frequency_change(u64 freq)
 {
-- 
2.34.1




 


Rackspace

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