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(-)

-- 
2.43.0

Reply via email to