[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] XSM: make .dm_op() hook dependent upon IOREQ_SERVER=y



commit 7d15b10f6c9c870e88017b54239a590ec22e173c
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Aug 3 16:36:34 2026 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Aug 3 16:36:34 2026 +0200

    XSM: make .dm_op() hook dependent upon IOREQ_SERVER=y
    
    It's unreachable / dead otherwise.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
 xen/include/xsm/dummy.h | 2 ++
 xen/include/xsm/hooks.h | 3 +++
 xen/xsm/flask/hooks.c   | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 773666a778..fb339120bb 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -739,11 +739,13 @@ static XSM_INLINE int cf_check xsm_pmu_op(
 
 #endif /* CONFIG_X86 */
 
+#ifdef CONFIG_IOREQ_SERVER
 static XSM_INLINE int cf_check xsm_dm_op(XSM_DEFAULT_ARG struct domain *d)
 {
     XSM_ASSERT_ACTION(XSM_DM_PRIV);
     return xsm_default_action(action, current->domain, d);
 }
+#endif
 
 #ifdef CONFIG_ARGO
 static XSM_INLINE int cf_check xsm_argo_enable(const struct domain *d)
diff --git a/xen/include/xsm/hooks.h b/xen/include/xsm/hooks.h
index 54e91497b8..dd5627c901 100644
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -145,7 +145,10 @@ XSM_HOOK(int, ioport_mapping, struct domain *, uint32_t, 
uint32_t, uint8_t)
 XSM_HOOK(int, pmu_op, struct domain *, unsigned int)
 #endif /* CONFIG_X86 */
 
+#ifdef CONFIG_IOREQ_SERVER
 XSM_HOOK(int, dm_op, struct domain *)
+#endif
+
 XSM_HOOK(int, xen_version, uint32_t)
 XSM_HOOK(int, domain_resource_map, struct domain *)
 
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 2e27dc2b8a..5de7139da0 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1852,10 +1852,12 @@ static int cf_check flask_pmu_op(struct domain *d, 
unsigned int op)
 }
 #endif /* CONFIG_X86 */
 
+#ifdef CONFIG_IOREQ_SERVER
 static int cf_check flask_dm_op(struct domain *d)
 {
     return current_has_perm(d, SECCLASS_HVM, HVM__DM);
 }
+#endif
 
 static int cf_check flask_xen_version(uint32_t op)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.