On Tue Feb 10, 2026 at 4:10 PM CET, Alejandro Vallejo wrote:
> Make them uniformly return EOPNOTSUPP when their dependent features
> are absent. Otherwise the compiler loses context and they might return
> ENOSYS instead.
>
> debug_op, mem_sharing_op and psr_alloc change behaviour and return
> EOPNOTSUPP when compiled out, rather than ENOSYS.
>
> While at it, remove the public headers from mem_sharing.h (forward
> declarations are fine) and add a missing xen/sched.h include (for
> complete struct domain definition).
>
> Signed-off-by: Alejandro Vallejo <[email protected]>
> ---
>  xen/arch/x86/domctl.c                  | 27 +++++++++++++++-----------
>  xen/arch/x86/include/asm/mem_sharing.h | 11 +++++++----
>  2 files changed, 23 insertions(+), 15 deletions(-)
>
> diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
> index d9521808dc..7066a18735 100644
> --- a/xen/arch/x86/domctl.c
> +++ b/xen/arch/x86/domctl.c

[snip]

>      case XEN_DOMCTL_psr_alloc:
> +        ret = -EOPNOTSUPP;
> +        if ( IS_ENABLED(CONFIG_X86_PSR) )

This was supposed to be !IS_ENABLED(), obviously.

Cheers,
Alejandro

Reply via email to