[PATCH 06/24] XSM: make .kexec() hook dependent upon KEXEC=y

Jan Beulich <[email protected]>
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
It's unreachable / dead otherwise.

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

--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -271,11 +271,13 @@ static XSM_INLINE int cf_check xsm_conso
     return xsm_default_action(XSM_PRIV, d, NULL);
 }
 
+#ifdef CONFIG_KEXEC
 static XSM_INLINE int cf_check xsm_kexec(XSM_DEFAULT_VOID)
 {
     XSM_ASSERT_ACTION(XSM_PRIV);
     return xsm_default_action(action, current->domain, NULL);
 }
+#endif
 
 static XSM_INLINE int cf_check xsm_schedop_shutdown(
     XSM_DEFAULT_ARG struct domain *d1, struct domain *d2)
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -61,7 +61,9 @@ XSM_HOOK(int, claim_pages, struct domain
 
 XSM_HOOK(int, console_io, struct domain *, int)
 
+#ifdef CONFIG_KEXEC
 XSM_HOOK(int, kexec)
+#endif
 
 XSM_HOOK(int, schedop_shutdown, struct domain *, struct domain *)
 
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -536,10 +536,12 @@ static int cf_check flask_console_io(str
     return domain_has_xen(d, perm);
 }
 
+#ifdef CONFIG_KEXEC
 static int cf_check flask_kexec(void)
 {
     return domain_has_xen(current->domain, XEN__KEXEC);
 }
+#endif
 
 static int cf_check flask_schedop_shutdown(struct domain *d1, struct domain *d2)
 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.