[PATCH v3 12/28] xen/domctl: wrap domain_pause_by_systemcontroller() with MGMT_HYPERCALLS

Penny Zheng posted 28 patches 2 weeks, 3 days ago
Only 27 patches received!
[PATCH v3 12/28] xen/domctl: wrap domain_pause_by_systemcontroller() with MGMT_HYPERCALLS
Posted by Penny Zheng 2 weeks, 3 days ago
Function domain_pause_by_systemcontroller() is responsible for
XEN_DOMCTL_pausedomain domctl-op, and shall be wrapped around with
CONFIG_MGMT_HYPERCALLS. Otherwiae it will become unreachable when
MGMT_HYPERCALLS=n and hence violating Misra rule 2.1.

Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>
---
v1 -> v2:
- adapt to changes of "unify DOMCTL to MGMT_HYPERCALLS"
- provide transient wrapping around XEN_DOMCTL_pausedomain-case
---
v2 -> v3:
- remove transient wrapping around XEN_DOMCTL_pausedomain-case
- address "violating Misra rule 2.1" in commit message
---
 xen/common/domain.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index 775c339285..976172c7d3 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -1606,10 +1606,12 @@ static int _domain_pause_by_systemcontroller(struct domain *d, bool sync)
     return 0;
 }
 
+#ifdef CONFIG_MGMT_HYPERCALLS
 int domain_pause_by_systemcontroller(struct domain *d)
 {
     return _domain_pause_by_systemcontroller(d, true /* sync */);
 }
+#endif /* CONFIG_MGMT_HYPERCALLS */
 
 int domain_pause_by_systemcontroller_nosync(struct domain *d)
 {
-- 
2.34.1
Re: [PATCH v3 12/28] xen/domctl: wrap domain_pause_by_systemcontroller() with MGMT_HYPERCALLS
Posted by Jan Beulich 7 hours ago
On 13.10.2025 12:15, Penny Zheng wrote:
> Function domain_pause_by_systemcontroller() is responsible for
> XEN_DOMCTL_pausedomain domctl-op, and shall be wrapped around with
> CONFIG_MGMT_HYPERCALLS. Otherwiae it will become unreachable when
> MGMT_HYPERCALLS=n and hence violating Misra rule 2.1.
> 
> Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>
> ---
> v1 -> v2:
> - adapt to changes of "unify DOMCTL to MGMT_HYPERCALLS"
> - provide transient wrapping around XEN_DOMCTL_pausedomain-case
> ---
> v2 -> v3:
> - remove transient wrapping around XEN_DOMCTL_pausedomain-case
> - address "violating Misra rule 2.1" in commit message

Fine with me, but imo this purely mechanical change wants combining with the
similar ones in patches 14 and 16, both touching the same file.

Jan