[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 16/28] xen/domctl: wrap domain_set_node_affinity() with CONFIG_MGMT_HYPERCALLS
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Penny Zheng <Penny.Zheng@xxxxxxx>
- Date: Mon, 13 Oct 2025 18:15: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=mUzeX3m860DkQZELNQP1jPIoGOmjnl/TlRkAt13jUvE=; b=TxSyslhUD46GZCsnNvVTI2hD7guLrUwWol1O5yAQxPC89ROyfsnOfj8vx5sTFenutjcrW6lK4CFctZ3+SeipC+Pe3UiJ9No+NDiOlR9Tmi4DPBshz5lYS6mNyDjnTIqfbhuPKHaM1KK6Zt903MifeQ783V3tkZtGYyCFG4vcbq4TQOZjhtWKKnZ7PoMBrM1TPdqN62GD80muE55I8tNXEUpRhlnBoM/EKCwVTj4OT6vGjoL/0e3cJYYZK4iAk9xzx6Tb0OMPPQSh70SZtmejnj4mzOw2C26UsHKgdZy6PjEIw8rraXjUZkqotFnpVr/I/JyWVUenfrDe+yBTl1g5HA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GZQe3SLaQG7OaY6T70B+v0+5YAKkChcwfCp7j4IUKFiqw1EGeSztyboKXGKMaCQxTwFSnfMrkn9YBEIfaP8VxUnbnz9QNYKIcKFNxWhrPNt04cICAD5NmCK+Iehf2z1rmf99y9V01Hst1W798GLcHaLGDuEY8oCbVzyow+2keiE1LW9itARtf9oO8AYXc06SB5TZ6hLP+Y7Qs+tBM/iqaHIQ9ost2Htqag1sIiEuLeMU7MggZ18CkOQ98AqpfSJqaQpVyemhNUqegO7VrDxPm/bCJc6XFZ/+HOW6QX7SMiLTfHoaexO2WvsXP/dVb1TWAAOUfktFDcAbrLBBcs3BAw==
- Cc: <ray.huang@xxxxxxx>, <oleksii.kurochko@xxxxxxxxx>, 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: Mon, 13 Oct 2025 10:26:52 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Function domain_set_node_affinity() is responsible for
XEN_DOMCTL_setnodeaffinity domctl-op, and shall be wrapped with
CONFIG_MGMT_HYPERCALLS. Otherwise it will become unreachable codes when
MGMT_HYPERCALLS=n, and hence violating Misra rule 2.1.
Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
v1 -> v2:
- adapt to changes of "unify DOMCTL to MGMT_HYPERCALLS"
- wrap XEN_DOMCTL_setnodeaffinity-case and xenctl_bitmap_to_nodemask()
transiently
---
v2 -> v3:
- address "violating Misra rule 2.1" in commit message
- remove transient wrapping around XEN_DOMCTL_setnodeaffinity-case
---
xen/common/domain.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 5d81ab3045..6778dc388c 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -1105,6 +1105,7 @@ void __init setup_system_domains(void)
#endif
}
+#ifdef CONFIG_MGMT_HYPERCALLS
int domain_set_node_affinity(struct domain *d, const nodemask_t *affinity)
{
/* Being disjoint with the system is just wrong. */
@@ -1133,6 +1134,7 @@ out:
return 0;
}
+#endif /* CONFIG_MGMT_HYPERCALLS */
/* rcu_read_lock(&domlist_read_lock) must be held. */
static struct domain *domid_to_domain(domid_t dom)
--
2.34.1
|