On 10.09.2025 09:38, Penny Zheng wrote:
> --- a/xen/common/sched/core.c
> +++ b/xen/common/sched/core.c
> @@ -1402,10 +1402,12 @@ int vcpu_set_hard_affinity(struct vcpu *v, const
> cpumask_t *affinity)
> return vcpu_set_affinity(v, affinity, v->sched_unit->cpu_hard_affinity);
> }
>
> +#ifdef CONFIG_MGMT_HYPERCALLS
> static int vcpu_set_soft_affinity(struct vcpu *v, const cpumask_t *affinity)
> {
> return vcpu_set_affinity(v, affinity, v->sched_unit->cpu_soft_affinity);
> }
> +#endif /* CONFIG_MGMT_HYPERCALLS */
Again preferable to get away with just a single #ifdef (i.e. ...
> @@ -1693,6 +1695,7 @@ int vcpuaffinity_params_invalid(const struct
> xen_domctl_vcpuaffinity *vcpuaff)
> guest_handle_is_null(vcpuaff->cpumap_soft.bitmap));
> }
>
> +#ifdef CONFIG_MGMT_HYPERCALLS
... this one) here. In fact I question the value of the helper: It has
a single caller, so what the helper does could easily be expanded at
the sole call site ...
> int vcpu_affinity_domctl(struct domain *d, uint32_t cmd,
> struct xen_domctl_vcpuaffinity *vcpuaff)
> {
... below from here.
Jan