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

[Xen-devel] [PATCH 1/2] xen/xsm: Reduce compiler command line clutter



Move the preprocessor definitions for FLASK_ENABLE off the compiler
command line and into config.h, which is the preferred location for
such definitions.

Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Keir Fraser <keir@xxxxxxx>
---
 xen/Rules.mk             |  2 --
 xen/include/xen/config.h | 13 +++++++++++++
 xen/include/xsm/xsm.h    |  3 ---
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 3a6cec5..824f48c 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -47,8 +47,6 @@ CFLAGS += -pipe -g -D__XEN__ -include 
$(BASEDIR)/include/xen/config.h
 CFLAGS += -nostdinc
 
 CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE
-CFLAGS-$(FLASK_ENABLE)  += -DFLASK_ENABLE -DXSM_MAGIC=0xf97cff8c
-CFLAGS-$(FLASK_ENABLE)  += -DFLASK_DEVELOP -DFLASK_BOOTPARAM -DFLASK_AVC_STATS
 CFLAGS-$(verbose)       += -DVERBOSE
 CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h
index 8bae6e6..93a7d1d 100644
--- a/xen/include/xen/config.h
+++ b/xen/include/xen/config.h
@@ -98,4 +98,17 @@
 #define __cpuinitdata
 #define __cpuinit
 
+#ifdef XSM_ENABLE
+/* FLASK is currently the only XSM provider, so always enable it if XSM is 
enabled
+ */
+#define FLASK_ENABLE 1
+#endif
+
+#ifdef FLASK_ENABLE
+#define XSM_MAGIC 0xf97cff8c
+#define FLASK_DEVELOP 1
+#define FLASK_BOOTPARAM 1
+#define FLASK_AVC_STATS 1
+#endif
+
 #endif /* __XEN_CONFIG_H__ */
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index de9cf86..7894490 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -23,9 +23,6 @@ DEFINE_XEN_GUEST_HANDLE(xsm_op_t);
 
 /* policy magic number (defined by XSM_MAGIC) */
 typedef u32 xsm_magic_t;
-#ifndef XSM_MAGIC
-#define XSM_MAGIC 0x00000000
-#endif
 
 /* These annotations are used by callers and in dummy.h to document the
  * default actions of XSM hooks. They should be compiled out otherwise.
-- 
1.8.5.3


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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