ia64/xen-unstable

annotate Makefile @ 19828:180ae4bca33e

VT-d: don't disable VT-d engine in suspend for security purpose

force_iommu option is used to force enabling and using IOMMU for
security purpose. So when force_iommu is set, it shouldn't disable
VT-d engines in suspend.

Signed-off-by: Weidong Han <weidong.han@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jun 24 11:15:31 2009 +0100 (2009-06-24)
parents 9749e8f6e3d8
children
rev   line source
kaf24@1446 1 #
kaf24@424 2 # Grand Unified Makefile for Xen.
kaf24@424 3 #
kaf24@424 4
kaf24@5199 5 # Default target must appear before any include lines
kaf24@9660 6 .PHONY: all
kaf24@5199 7 all: dist
kaf24@5199 8
kfraser@10232 9 export XEN_ROOT=$(CURDIR)
kaf24@4252 10 include Config.mk
kfraser@13463 11
kfraser@13463 12 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
kfraser@13463 13 export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
kaf24@2978 14 include buildconfigs/Rules.mk
iap10@2835 15
cl349@3561 16 # build and install everything into the standard system directories
kaf24@9660 17 .PHONY: install
keir@18055 18 install: install-xen install-kernels install-tools install-stubdom install-docs
iap10@3514 19
kaf24@9660 20 .PHONY: build
ian@13740 21 build: kernels
doogie@4109 22 $(MAKE) -C xen build
doogie@4109 23 $(MAKE) -C tools build
keir@18014 24 $(MAKE) -C stubdom build
keir@18330 25 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18330 26 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub
keir@18330 27 endif
doogie@4109 28 $(MAKE) -C docs build
doogie@4109 29
emellor@7244 30 # The test target is for unit tests that can run without an installation. Of
emellor@7244 31 # course, many tests require a machine running Xen itself, and these are
emellor@7244 32 # handled elsewhere.
kaf24@9660 33 .PHONY: test
emellor@7244 34 test:
emellor@7244 35 $(MAKE) -C tools/python test
emellor@7244 36
iap10@2836 37 # build and install everything into local dist directory
kaf24@9660 38 .PHONY: dist
kaf24@7225 39 dist: DESTDIR=$(DISTDIR)/install
keir@18055 40 dist: dist-xen dist-kernels dist-tools dist-stubdom dist-docs
iap10@3534 41 $(INSTALL_DIR) $(DISTDIR)/check
iap10@3534 42 $(INSTALL_DATA) ./COPYING $(DISTDIR)
iap10@3534 43 $(INSTALL_DATA) ./README $(DISTDIR)
iap10@3534 44 $(INSTALL_PROG) ./install.sh $(DISTDIR)
keir@16892 45 $(INSTALL_PROG) tools/check/chk tools/check/check_* tools/check/funcs.sh $(DISTDIR)/check
kaf24@7225 46 dist-%: DESTDIR=$(DISTDIR)/install
kaf24@7225 47 dist-%: install-%
kaf24@7225 48 @: # do nothing
cl349@2443 49
kaf24@7225 50 # Legacy dist targets
keir@18014 51 .PHONY: xen tools stubdom kernels docs
kaf24@7225 52 xen: dist-xen
kaf24@7225 53 tools: dist-tools
kaf24@7225 54 kernels: dist-kernels
keir@18014 55 stubdom: dist-stubdom
kaf24@7225 56 docs: dist-docs
kaf24@7225 57
kaf24@9660 58 .PHONY: prep-kernels
vhanquez@8312 59 prep-kernels:
vhanquez@8312 60 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
vhanquez@8312 61
kaf24@9660 62 .PHONY: install-xen
ian@13740 63 install-xen:
kaf24@3537 64 $(MAKE) -C xen install
iap10@2842 65
kaf24@9660 66 .PHONY: install-tools
keir@18496 67 install-tools: tools/ioemu-dir
kaf24@3551 68 $(MAKE) -C tools install
iap10@2842 69
kaf24@9660 70 .PHONY: install-kernels
kaf24@7225 71 install-kernels:
kaf24@7313 72 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
cl349@2443 73
keir@18014 74 .PHONY: install-stubdom
keir@18496 75 install-stubdom: tools/ioemu-dir
keir@18014 76 $(MAKE) -C stubdom install
keir@18330 77 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18330 78 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
keir@18330 79 endif
keir@18014 80
keir@18496 81 tools/ioemu-dir:
keir@18543 82 $(MAKE) -C tools ioemu-dir-find
keir@18496 83
kaf24@9660 84 .PHONY: install-docs
kaf24@7225 85 install-docs:
kaf24@3537 86 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
iap10@2842 87
kaf24@9660 88 .PHONY: dev-docs
ewan@6783 89 dev-docs:
ewan@6783 90 $(MAKE) -C docs dev-docs
ewan@6783 91
kaf24@2978 92 # Build all the various kernels and modules
kaf24@9660 93 .PHONY: kbuild
cl349@2858 94 kbuild: kernels
cl349@2858 95
iap10@2842 96 # Delete the kernel build trees entirely
kaf24@9660 97 .PHONY: kdelete
iap10@3514 98 kdelete:
iap10@3514 99 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
iap10@2842 100
iap10@2842 101 # Clean the kernel build trees
kaf24@9660 102 .PHONY: kclean
iap10@3514 103 kclean:
iap10@3514 104 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
cl349@2443 105
iap10@1468 106 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
iap10@1468 107 # and place them in the install directory. 'make install' should then
iap10@1468 108 # copy them to the normal system directories
kaf24@9660 109 .PHONY: world
iap10@2842 110 world:
iap10@1558 111 $(MAKE) clean
iap10@2835 112 $(MAKE) kdelete
iap10@2845 113 $(MAKE) dist
iap10@1464 114
iap10@2842 115 # clean doesn't do a kclean
kaf24@9660 116 .PHONY: clean
keir@16275 117 clean::
iap10@3514 118 $(MAKE) -C xen clean
kaf24@3551 119 $(MAKE) -C tools clean
keir@18014 120 $(MAKE) -C stubdom crossclean
keir@18330 121 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18330 122 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom crossclean
keir@18330 123 endif
iap10@3514 124 $(MAKE) -C docs clean
kaf24@1446 125
kaf24@6906 126 # clean, but blow away kernel build tree plus tarballs
kaf24@9660 127 .PHONY: distclean
kaf24@10540 128 distclean:
kaf24@10540 129 $(MAKE) -C xen distclean
kaf24@10540 130 $(MAKE) -C tools distclean
keir@18014 131 $(MAKE) -C stubdom distclean
keir@18330 132 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18330 133 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
keir@18330 134 endif
kaf24@10540 135 $(MAKE) -C docs distclean
iap10@2900 136 rm -rf dist patches/tmp
iap10@3514 137 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
kaf24@10640 138 rm -rf patches/*/.makedep
iap10@1464 139
kaf24@6906 140 # Linux name for GNU distclean
kaf24@9660 141 .PHONY: mrproper
kaf24@6906 142 mrproper: distclean
kaf24@6906 143
keir@17493 144 # Prepare for source tarball
keir@17493 145 .PHONY: src-tarball
keir@17493 146 src-tarball: distclean
keir@17493 147 $(MAKE) -C xen .banner
keir@17494 148 rm -rf xen/tools/figlet .[a-z]*
keir@17493 149 $(MAKE) -C xen distclean
keir@17493 150
kaf24@9660 151 .PHONY: help
mwilli2@3376 152 help:
mwilli2@3376 153 @echo 'Installation targets:'
kaf24@3537 154 @echo ' install - build and install everything'
cl349@3561 155 @echo ' install-xen - build and install the Xen hypervisor'
cl349@3561 156 @echo ' install-tools - build and install the control tools'
cl349@3561 157 @echo ' install-kernels - build and install guest kernels'
keir@18014 158 @echo ' install-stubdom - build and install the stubdomain images'
emellor@6792 159 @echo ' install-docs - build and install user documentation'
mwilli2@3376 160 @echo ''
mwilli2@3376 161 @echo 'Building targets:'
kaf24@3537 162 @echo ' dist - build and install everything into local dist directory'
mwilli2@3376 163 @echo ' world - clean everything, delete guest kernel build'
mwilli2@3376 164 @echo ' trees then make dist'
kaf24@3537 165 @echo ' xen - build and install Xen hypervisor'
kaf24@3537 166 @echo ' tools - build and install tools'
keir@18250 167 @echo ' stubdom - build and install the stubdomain images'
kaf24@3537 168 @echo ' kernels - build and install guest kernels'
mwilli2@3376 169 @echo ' kbuild - synonym for make kernels'
emellor@6792 170 @echo ' docs - build and install user documentation'
emellor@6792 171 @echo ' dev-docs - build developer-only documentation'
mwilli2@3376 172 @echo ''
mwilli2@3376 173 @echo 'Cleaning targets:'
kaf24@9653 174 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
kaf24@9653 175 @echo ' distclean - clean plus delete kernel build trees and'
kaf24@9653 176 @echo ' local downloaded files'
mwilli2@3376 177 @echo ' kdelete - delete guest kernel build trees'
mwilli2@3376 178 @echo ' kclean - clean guest kernel build trees'
mwilli2@3376 179 @echo ''
mwilli2@3376 180 @echo 'Miscellaneous targets:'
vhanquez@8312 181 @echo ' prep-kernels - prepares kernel directories, does not build'
kaf24@9653 182 @echo ' uninstall - attempt to remove installed Xen tools'
kaf24@9653 183 @echo ' (use with extreme care!)'
kaf24@9654 184 @echo
keir@16275 185 @echo 'Trusted Boot (tboot) targets:'
keir@16275 186 @echo ' build-tboot - download and build the tboot module'
keir@16275 187 @echo ' install-tboot - download, build, and install the tboot module'
keir@16275 188 @echo ' clean-tboot - clean the tboot module if it exists'
keir@16275 189 @echo
kaf24@9654 190 @echo 'Environment:'
keir@19527 191 @echo ' [ this documentation is sadly not complete ]'
mwilli2@3376 192
iap10@2835 193 # Use this target with extreme care!
kaf24@9660 194 .PHONY: uninstall
kaf24@3544 195 uninstall: D=$(DESTDIR)
iap10@1790 196 uninstall:
keir@19645 197 [ -d $(D)$(XEN_CONFIG_DIR) ] && mv -f $(D)$(XEN_CONFIG_DIR) $(D)$(XEN_CONFIG_DIR).old-`date +%s` || true
keir@19645 198 rm -rf $(D)$(CONFIG_DIR)/init.d/xend*
keir@19645 199 rm -rf $(D)$(CONFIG_DIR)/hotplug/xen-backend.agent
keir@19645 200 rm -f $(D)$(CONFIG_DIR)/udev/rules.d/xen-backend.rules
keir@19645 201 rm -f $(D)$(CONFIG_DIR)/udev/xen-backend.rules
keir@19645 202 rm -f $(D)$(CONFIG_DIR)/udev/rules.d/xend.rules
keir@19645 203 rm -f $(D)$(CONFIG_DIR)/udev/xend.rules
keir@19645 204 rm -f $(D)$(CONFIG_DIR)/sysconfig/xendomains
kaf24@5413 205 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
kaf24@3544 206 rm -rf $(D)/boot/*xen*
bren@3868 207 rm -rf $(D)/lib/modules/*xen*
keir@19645 208 rm -rf $(D)$(LIBDIR)/xen* $(D)$(BINDIR)/lomount
keir@19645 209 rm -rf $(D)$(BINDIR)/cpuperf-perfcntr $(D)$(BINDIR)/cpuperf-xen
keir@19645 210 rm -rf $(D)$(BINDIR)/xc_shadow
keir@19645 211 rm -rf $(D)$(BINDIR)/pygrub
keir@19645 212 rm -rf $(D)$(BINDIR)/setsize $(D)$(BINDIR)/tbctl
keir@19645 213 rm -rf $(D)$(BINDIR)/xsls
keir@19645 214 rm -rf $(D)$(INCLUDEDIR)/xenctrl.h $(D)$(INCLUDEDIR)/xenguest.h
keir@19645 215 rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h
keir@19645 216 rm -rf $(D)$(INCLUDEDIR)/xen
keir@16841 217 rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest*
keir@16841 218 rm -rf $(D)$(LIBDIR)/libxenstore*
keir@16841 219 rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub
keir@16841 220 rm -rf $(D)$(LIBDIR)/xen/
keir@19645 221 rm -rf $(D)$(LIBEXEC)/xen*
keir@19645 222 rm -rf $(D)$(SBINDIR)/setmask
keir@19645 223 rm -rf $(D)$(SBINDIR)/xen* $(D)$(SBINDIR)/netfix $(D)$(SBINDIR)/xm
keir@19645 224 rm -rf $(D)$(SHAREDIR)/doc/xen
keir@19645 225 rm -rf $(D)$(SHAREDIR)/xen
keir@19645 226 rm -rf $(D)$(MAN1DIR)/xen*
keir@19645 227 rm -rf $(D)$(MAN8DIR)/xen*
keir@16275 228 rm -rf $(D)/boot/tboot*
mwilli2@1914 229
kaf24@2978 230 # Legacy targets for compatibility
kaf24@9660 231 .PHONY: linux26
iap10@3514 232 linux26:
kaf24@5697 233 $(MAKE) 'KERNELS=linux-2.6*' kernels
keir@16275 234
keir@16275 235
keir@16275 236 #
keir@16275 237 # tboot targets
keir@16275 238 #
keir@16275 239
keir@19558 240 TBOOT_TARFILE = tboot-20090330.tar.gz
keir@18986 241 #TBOOT_BASE_URL = http://downloads.sourceforge.net/tboot
keir@18986 242 TBOOT_BASE_URL = $(XEN_EXTFILES_URL)
keir@16275 243
keir@16275 244 .PHONY: build-tboot
keir@16275 245 build-tboot: download_tboot
keir@16275 246 $(MAKE) -C tboot build
keir@16275 247
keir@16275 248 .PHONY: install-tboot
keir@16275 249 install-tboot: download_tboot
keir@16275 250 $(MAKE) -C tboot install
keir@16275 251
keir@16512 252 .PHONY: dist-tboot
keir@16512 253 dist-tboot: download_tboot
keir@16512 254 $(MAKE) DESTDIR=$(DISTDIR)/install -C tboot dist
keir@16512 255
keir@16275 256 .PHONY: clean-tboot
keir@16275 257 clean-tboot:
keir@16275 258 [ ! -d tboot ] || $(MAKE) -C tboot clean
keir@16275 259
keir@16275 260 .PHONY: distclean-tboot
keir@16275 261 distclean-tboot:
keir@16275 262 [ ! -d tboot ] || $(MAKE) -C tboot distclean
keir@16275 263
keir@16275 264 .PHONY: download_tboot
keir@16275 265 download_tboot: tboot/Makefile
keir@16275 266
keir@16275 267 tboot/Makefile: tboot/$(TBOOT_TARFILE)
keir@16275 268 [ -e tboot/Makefile ] || tar -xzf tboot/$(TBOOT_TARFILE) -C tboot/ --strip-components 1
keir@16275 269
keir@16275 270 tboot/$(TBOOT_TARFILE):
keir@16275 271 mkdir -p tboot
keir@16275 272 wget -O tboot/$(TBOOT_TARFILE) $(TBOOT_BASE_URL)/$(TBOOT_TARFILE)