Skip to content

Align handling of domctl/sysctl unsupported commands

Milan Djokic xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4arm/domain: Update SBSA_VUART_CONSOLE config option handlingxen/arch/arm/dom0less-build.c xen/arch/arm/domctl.c xen/arch/arm/include/asm/vpl011.h+8 -12 replies
2/4domctl: Provide appropriate error code when PIRQs are not supportedxen/common/domctl.c xen/include/xsm/dummy.h xen/include/xsm/xsm.h +2 more+16 -74 replies
3/4domctl: Provide appropriate error code when VM events are not supportedxen/common/domctl.c+11 -82 replies
4/4sysctl: align handling of unsupported commandsxen/common/sysctl.c xen/include/xen/livepatch.h xen/include/xen/perfc.h +2 more+28 -202 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Align handling of domctl/sysctl unsupported commands

This patch series provides minor updates to the domctl and sysctl handling of unsupported commands. Currently the behavior diverges: some commands return -EOPNOTSUPP, while others fall back to the generic -ENOSYS. This series aligns the behavior so that unsupported commands consistently return the appropriate error code, allowing the control domain to correctly identify unsupported operations.

Where possible, IS_ENABLED() is used to detect disabled commands at compile time, enabling dead code elimination. For commands where stubs are provided, the stub functions are updated to return the correct error code.

The only exception is XEN_DOMCTL_irq_permission, which cannot use IS_ENABLED() due to PIRQ-specific structures being unavailable when PIRQ support is off. In this case, classic #ifdef blocks remain in place.

There may be future updates in this regard. This initial series is intended to get maintainers' feedback on the approach taken.

Milan Djokic (4):
arm/domain: Update SBSA_VUART_CONSOLE config option handling
domctl: Provide appropriate error code when PIRQs are not supported
domctl: Provide appropriate error code when VM events are not
supported
sysctl: align handling of unsupported commands

 xen/arch/arm/dom0less-build.c     |  4 ++++
 xen/arch/arm/domctl.c             |  3 +++
 xen/arch/arm/include/asm/vpl011.h |  2 +-
 xen/common/domctl.c               | 25 ++++++++++++++---------
 xen/common/sysctl.c               | 34 ++++++++++++++++++-------------
 xen/include/xen/livepatch.h       |  2 +-
 xen/include/xen/perfc.h           |  4 +++-
 xen/include/xen/spinlock.h        |  6 +++---
 xen/include/xen/trace.h           |  2 +-
 xen/include/xsm/dummy.h           |  4 ++--
 xen/include/xsm/xsm.h             |  6 ++++--
 xen/xsm/dummy.c                   |  2 ++
 xen/xsm/flask/hooks.c             |  5 ++++-
 13 files changed, 63 insertions(+), 36 deletions(-)
Signature · 1 line
2.43.0