They're unreachable / dead otherwise.

Signed-off-by: Jan Beulich <[email protected]>
---
Strictly speaking .hvm_param_altp2mhvm() is dependent upon X86=y as well
(but oddly not dependent upon ALTP2M=y).

--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -569,6 +569,8 @@ static XSM_INLINE int cf_check xsm_map_g
     return xsm_default_action(action, d, t);
 }
 
+#ifdef CONFIG_HVM
+
 static XSM_INLINE int cf_check xsm_hvm_param(
     XSM_DEFAULT_ARG struct domain *d, unsigned long op)
 {
@@ -583,6 +585,8 @@ static XSM_INLINE int cf_check xsm_hvm_p
     return xsm_default_action(action, current->domain, d);
 }
 
+#endif /* CONFIG_HVM */
+
 #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)
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -104,8 +104,10 @@ XSM_HOOK(int, pci_config_permission, str
 XSM_HOOK(int, hypfs_op)
 #endif
 
+#ifdef CONFIG_HVM
 XSM_HOOK(int, hvm_param, struct domain *, unsigned long)
 XSM_HOOK(int, hvm_param_altp2mhvm, struct domain *)
+#endif
 
 #ifdef CONFIG_ALTP2M
 XSM_HOOK(int, hvm_altp2mhvm_op, struct domain *, uint64_t, uint32_t)
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1368,6 +1368,8 @@ static int cf_check flask_map_gmfn_forei
     return domain_has_perm(d, t, SECCLASS_MMU, MMU__MAP_READ | MMU__MAP_WRITE);
 }
 
+#ifdef CONFIG_HVM
+
 static int cf_check flask_hvm_param(struct domain *d, unsigned long op)
 {
     uint32_t perm;
@@ -1393,6 +1395,8 @@ static int cf_check flask_hvm_param_altp
     return current_has_perm(d, SECCLASS_HVM, HVM__ALTP2MHVM);
 }
 
+#endif /* CONFIG_HVM */
+
 #ifdef CONFIG_ALTP2M
 static int cf_check flask_hvm_altp2mhvm_op(struct domain *d, uint64_t mode, 
uint32_t op)
 {


Reply via email to