It's unreachable / dead otherwise.

Signed-off-by: Jan Beulich <[email protected]>

--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -583,6 +583,7 @@ static XSM_INLINE int cf_check xsm_hvm_p
     return xsm_default_action(action, current->domain, d);
 }
 
+#ifdef CONFIG_ALTP2M
 static XSM_INLINE int cf_check xsm_hvm_altp2mhvm_op(
     XSM_DEFAULT_ARG struct domain *d, uint64_t mode, uint32_t op)
 {
@@ -602,6 +603,7 @@ static XSM_INLINE int cf_check xsm_hvm_a
         return -EPERM;
     }
 }
+#endif /* CONFIG_ALTP2M */
 
 #ifdef CONFIG_VM_EVENT
 static XSM_INLINE int cf_check xsm_mem_access(XSM_DEFAULT_ARG struct domain *d)
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -106,7 +106,11 @@ XSM_HOOK(int, hypfs_op)
 
 XSM_HOOK(int, hvm_param, struct domain *, unsigned long)
 XSM_HOOK(int, hvm_param_altp2mhvm, struct domain *)
+
+#ifdef CONFIG_ALTP2M
 XSM_HOOK(int, hvm_altp2mhvm_op, struct domain *, uint64_t, uint32_t)
+#endif
+
 XSM_HOOK(int, get_vnumainfo, struct domain *)
 
 #ifdef CONFIG_VM_EVENT
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1393,6 +1393,7 @@ static int cf_check flask_hvm_param_altp
     return current_has_perm(d, SECCLASS_HVM, HVM__ALTP2MHVM);
 }
 
+#ifdef CONFIG_ALTP2M
 static int cf_check flask_hvm_altp2mhvm_op(struct domain *d, uint64_t mode, 
uint32_t op)
 {
     /*
@@ -1416,6 +1417,7 @@ static int cf_check flask_hvm_altp2mhvm_
 
     return current_has_perm(d, SECCLASS_HVM, HVM__ALTP2MHVM_OP);
 }
+#endif /* CONFIG_ALTP2M */
 
 #ifdef CONFIG_VM_EVENT
 static int cf_check flask_mem_access(struct domain *d)


Reply via email to