On 05.12.2025 21:36, Milan Djokic wrote:
> When PIRQs are not supported (e.g. for arm), XEN_DOMCTL_irq_permission
> command is not handled.
> This results with default (-ENOSYS) error code returned to control domain.
> Update command handling to return -EOPNOTSUPP if control domain
> invokes it by mistake when PIRQs are not supported.
Did you consider simply replacing the bogus ENOSYS by EOPNOTSUPP? (Assuming
the difference in error code really makes a difference to callers.)
> --- a/xen/include/xsm/dummy.h
> +++ b/xen/include/xsm/dummy.h
> @@ -555,14 +555,14 @@ static XSM_INLINE int cf_check xsm_unmap_domain_irq(
> XSM_ASSERT_ACTION(XSM_HOOK);
> return xsm_default_action(action, current->domain, d);
> }
> -
> +#ifdef CONFIG_HAS_PIRQ
> static XSM_INLINE int cf_check xsm_irq_permission(
> XSM_DEFAULT_ARG struct domain *d, int pirq, uint8_t allow)
> {
> XSM_ASSERT_ACTION(XSM_HOOK);
> return xsm_default_action(action, current->domain, d);
> }
> -
> +#endif
> static XSM_INLINE int cf_check xsm_iomem_permission(
> XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, uint8_t allow)
> {
Why would you zap blank lines like this (also elsewhere)?
Jan