]> xenbits.xensource.com Git - xen.git/commitdiff
tools: Expose XSM Flask initial SIDs list to tools
authorIan Campbell <ian.campbell@citrix.com>
Wed, 20 May 2015 14:38:58 +0000 (15:38 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 21 May 2015 14:25:47 +0000 (15:25 +0100)
By generating tools/include/xen-xsm/flask/flask.h using the same tool
as used during the hypervisor build.

Note that this is done regardless of whether XSM is enabled, since we
want the tools to be agnostic to whether or not XSM is enabled in the
hypervisor

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
.gitignore
tools/include/Makefile

index c6185a06d8d21ce7076e6ad222128a4321837528..3bc9cd99d271b0e1b36f0edcead54a3d8aeba9fb 100644 (file)
@@ -147,6 +147,7 @@ tools/hotplug/Linux/xen-hotplug-common.sh
 tools/hotplug/Linux/xendomains
 tools/hotplug/NetBSD/rc.d/xencommons
 tools/include/xen/*
+tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
 tools/libxl/libxlu_cfg_y.output
index 3cd157aae91571569129c71fb26cd9018c4efe19..dec8b3d352549e2ecdc4dc0250c6bcb6a2306ea6 100644 (file)
@@ -1,8 +1,11 @@
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
+# Relative to $(XEN_ROOT)/xen/xsm/flask
+FLASK_H_DEPEND := policy/initial_sids
+
 .PHONY: all
-all: xen-foreign xen/.dir
+all: xen-foreign xen/.dir xen-xsm/.dir
 
 .PHONY: xen-foreign
 xen-foreign:
@@ -19,6 +22,15 @@ xen/.dir:
        ln -s ../xen-foreign xen/foreign
        touch $@
 
+# Not xen/xsm as that clashes with link to
+# $(XEN_ROOT)/xen/include/public/xsm above.
+xen-xsm/.dir: $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh \
+             $(patsubst %,$(XEN_ROOT)/xen/xsm/flask/%,$(FLASK_H_DEPEND))
+       mkdir -p xen-xsm/flask
+       cd $(XEN_ROOT)/xen/xsm/flask/ && \
+               $(SHELL) policy/mkflask.sh $(AWK) $(CURDIR)/xen-xsm/flask $(FLASK_H_DEPEND)
+       touch $@
+
 .PHONY: install
 install: all
        $(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/arch-x86
@@ -47,7 +59,7 @@ install: all
 
 .PHONY: clean
 clean:
-       rm -rf xen
+       rm -rf xen xen-xsm
        $(MAKE) -C xen-foreign clean