Re: [PATCH 07/24] XSM: make .hypfs() hook dependent upon HYPFS=y

"Daniel P. Smith" <[email protected]> Sun, 2 Aug 2026 10:58:04 -0400
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
On 7/28/26 9:15 AM, Jan Beulich wrote:
> It's unreachable / dead otherwise.
> 
> Signed-off-by: Jan Beulich <[email protected]>
> 
> --- a/xen/include/xsm/dummy.h
> +++ b/xen/include/xsm/dummy.h
> @@ -437,11 +437,13 @@ static XSM_INLINE int cf_check xsm_resou
>       return xsm_default_action(action, current->domain, NULL);
>   }
>   
> +#ifdef CONFIG_HYPFS
>   static XSM_INLINE int cf_check xsm_hypfs_op(XSM_DEFAULT_VOID)
>   {
>       XSM_ASSERT_ACTION(XSM_PRIV);
>       return xsm_default_action(action, current->domain, NULL);
>   }
> +#endif
>   
>   static XSM_INLINE long cf_check xsm_do_xsm_op(XEN_GUEST_HANDLE_PARAM(void) op)
>   {
> --- a/xen/include/xsm/hooks.h
> +++ b/xen/include/xsm/hooks.h
> @@ -100,7 +100,9 @@ XSM_HOOK(int, pci_config_permission, str
>                                        uint16_t, uint8_t)
>   #endif
>   
> +#ifdef CONFIG_HYPFS
>   XSM_HOOK(int, hypfs_op)
> +#endif
>   
>   XSM_HOOK(int, hvm_param, struct domain *, unsigned long)
>   XSM_HOOK(int, hvm_param_altp2mhvm, struct domain *)
> --- a/xen/xsm/flask/hooks.c
> +++ b/xen/xsm/flask/hooks.c
> @@ -1345,10 +1345,12 @@ static int cf_check flask_resource_setup
>       return avc_current_has_perm(SECINITSID_XEN, SECCLASS_RESOURCE, RESOURCE__SETUP, NULL);
>   }
>   
> +#ifdef CONFIG_HYPFS
>   static inline int cf_check flask_hypfs_op(void)
>   {
>       return domain_has_xen(current->domain, XEN__HYPFS_OP);
>   }
> +#endif
>   
>   static int cf_check flask_add_to_physmap(struct domain *d1, struct domain *d2)
>   {
> 


Acked-by: Daniel P. Smith <[email protected]>