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

[PATCH v2 09/26] xen/domctl: wrap domain_resume() with CONFIG_MGMT_HYPERCALLS


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Wed, 10 Sep 2025 15:38:10 +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=z6hAYbhVRKjqwBmccO7F1sUrcRPgT0pjyjykY0wxnhw=; b=szzAevj0MhHlDtgbptDbO0iTa2YqOeiwtcUAfAoAzKUjyIOXIH6y5D1Sl8x3Ifw8HrnvCZj1qUz+xWIJ8ZTe8yKXdZ93NU4UFlaBZgTh9A3Qc6qbJFS2R3yxfwXmjU52gSfZHR9bX13hOexXQlDPZo88GvIo7b/6Iy3ATTgGlt2JEu1DKlWtN86DrzLA5OUs1YQ95ek1UGmR7MWFDn/q+fV56UhQeEaaTb8ADqfXV2D/vzUG34ABU8mZZjqj2ITw1mmXqwV4oC3ltlr3PaZzZX9dYIivxHz+Jh9KsO8va/RxkaoyQ4QYVfCWBjngWUfq3a3M3slUWpbNg6heBVo95g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rVUiKKCZz1pwJPp5699W7G7o3EDjcEn0Qww5nhoxmN1sBbsc1tu+L/bDRVqNNfH6FxQOz6vEsVDvOXz4uFovdSdE6waf8fFd0tA/mkyFu8DG0HSOBNz764l4TZCUYsNQBhVI4t37wk1OxBcJJqoYl5Nq/2sr/aWn8h9CWeHdOTewNeVlf6p2WKIgoCn+2/LIhABtmYpTxLAtPx58rquLRBjBXUJg20A+TBSBRpifIKZ7sV0Mek66gxt4QGjBBI2MmCcIqzU/43fk4TUNrE1sQD6wi/FrgUToStrlndx4bu0ZiZ2YQmuZU9YRriH67wihtA9qX53HqaBseJGtvdSncA==
  • Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 10 Sep 2025 07:39:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

One usage of function domain_resume() is in domain resume domctl-op, and
the other is in domain_soft_reset(), which is already guarded with
CONFIG_MGMT_HYPERCALLS.
So we could wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS.

Wrap XEN_DOMCTL_resumedomain-case transiently with CONFIG_MGMT_HYPERCALLS, and
it will be removed when introducing CONFIG_MGMT_HYPERCALLS on the
common/domctl.c in the last.

Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
v1 -> v2:
- new commit
---
 xen/common/domain.c | 2 ++
 xen/common/domctl.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index 678e81b400..34e2e501dc 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -1351,6 +1351,7 @@ int domain_shutdown(struct domain *d, u8 reason)
     return 0;
 }
 
+#ifdef CONFIG_MGMT_HYPERCALLS
 void domain_resume(struct domain *d)
 {
     struct vcpu *v;
@@ -1377,6 +1378,7 @@ void domain_resume(struct domain *d)
 
     domain_unpause(d);
 }
+#endif /* CONFIG_MGMT_HYPERCALLS */
 
 int vcpu_start_shutdown_deferral(struct vcpu *v)
 {
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 1c0bfd456e..278a00b141 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -402,12 +402,14 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
u_domctl)
         ret = domain_unpause_by_systemcontroller(d);
         break;
 
+#ifdef CONFIG_MGMT_HYPERCALLS
     case XEN_DOMCTL_resumedomain:
         if ( d == current->domain ) /* no domain_pause() */
             ret = -EINVAL;
         else
             domain_resume(d);
         break;
+#endif /* CONFIG_MGMT_HYPERCALLS */
 
     case XEN_DOMCTL_createdomain:
     {
-- 
2.34.1




 


Rackspace

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