ia64/xen-unstable

view Makefile @ 18447:f2bd9bbb0593

xc_save: ignore the first suspend event channel notification

I've noticed that the suspend event channel becomes pending as soon as
it is bound. I'm not sure why or whether this is intentional, but it
means that the suspend function will return before the domain has
completed suspending unless the first notification is cleared. Without
this patch, xc_domain_save may find that the guest has not suspended
and sleep in 10ms chunks until it does. Typically this is several
milliseconds of wasted time.

From: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Sep 08 11:16:23 2008 +0100 (2008-09-08)
parents d3947223dfae
children 087008dfb005
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 # Default target must appear before any include lines
6 .PHONY: all
7 all: dist
9 export XEN_ROOT=$(CURDIR)
10 include Config.mk
12 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
13 export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
14 include buildconfigs/Rules.mk
16 # build and install everything into the standard system directories
17 .PHONY: install
18 install: install-xen install-kernels install-tools install-stubdom install-docs
20 .PHONY: build
21 build: kernels
22 $(MAKE) -C xen build
23 $(MAKE) -C tools build
24 $(MAKE) -C stubdom build
25 ifeq (x86_64,$(XEN_TARGET_ARCH))
26 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub
27 endif
28 $(MAKE) -C docs build
30 # The test target is for unit tests that can run without an installation. Of
31 # course, many tests require a machine running Xen itself, and these are
32 # handled elsewhere.
33 .PHONY: test
34 test:
35 $(MAKE) -C tools/python test
37 # build and install everything into local dist directory
38 .PHONY: dist
39 dist: DESTDIR=$(DISTDIR)/install
40 dist: dist-xen dist-kernels dist-tools dist-stubdom dist-docs
41 $(INSTALL_DIR) $(DISTDIR)/check
42 $(INSTALL_DATA) ./COPYING $(DISTDIR)
43 $(INSTALL_DATA) ./README $(DISTDIR)
44 $(INSTALL_PROG) ./install.sh $(DISTDIR)
45 $(INSTALL_PROG) tools/check/chk tools/check/check_* tools/check/funcs.sh $(DISTDIR)/check
46 dist-%: DESTDIR=$(DISTDIR)/install
47 dist-%: install-%
48 @: # do nothing
50 # Legacy dist targets
51 .PHONY: xen tools stubdom kernels docs
52 xen: dist-xen
53 tools: dist-tools
54 kernels: dist-kernels
55 stubdom: dist-stubdom
56 docs: dist-docs
58 .PHONY: prep-kernels
59 prep-kernels:
60 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
62 .PHONY: install-xen
63 install-xen:
64 $(MAKE) -C xen install
66 .PHONY: install-tools
67 install-tools:
68 $(MAKE) -C tools install
70 .PHONY: install-kernels
71 install-kernels:
72 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
74 .PHONY: install-stubdom
75 install-stubdom:
76 $(MAKE) -C stubdom install
77 ifeq (x86_64,$(XEN_TARGET_ARCH))
78 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
79 endif
81 .PHONY: install-docs
82 install-docs:
83 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
85 .PHONY: dev-docs
86 dev-docs:
87 $(MAKE) -C docs dev-docs
89 # Build all the various kernels and modules
90 .PHONY: kbuild
91 kbuild: kernels
93 # Delete the kernel build trees entirely
94 .PHONY: kdelete
95 kdelete:
96 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
98 # Clean the kernel build trees
99 .PHONY: kclean
100 kclean:
101 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
103 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
104 # and place them in the install directory. 'make install' should then
105 # copy them to the normal system directories
106 .PHONY: world
107 world:
108 $(MAKE) clean
109 $(MAKE) kdelete
110 $(MAKE) dist
112 # clean doesn't do a kclean
113 .PHONY: clean
114 clean::
115 $(MAKE) -C xen clean
116 $(MAKE) -C tools clean
117 $(MAKE) -C stubdom crossclean
118 ifeq (x86_64,$(XEN_TARGET_ARCH))
119 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom crossclean
120 endif
121 $(MAKE) -C docs clean
123 # clean, but blow away kernel build tree plus tarballs
124 .PHONY: distclean
125 distclean:
126 $(MAKE) -C xen distclean
127 $(MAKE) -C tools distclean
128 $(MAKE) -C stubdom distclean
129 ifeq (x86_64,$(XEN_TARGET_ARCH))
130 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
131 endif
132 $(MAKE) -C docs distclean
133 rm -rf dist patches/tmp
134 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
135 rm -rf patches/*/.makedep
137 # Linux name for GNU distclean
138 .PHONY: mrproper
139 mrproper: distclean
141 # Prepare for source tarball
142 .PHONY: src-tarball
143 src-tarball: distclean
144 $(MAKE) -C xen .banner
145 rm -rf xen/tools/figlet .[a-z]*
146 $(MAKE) -C xen distclean
148 .PHONY: help
149 help:
150 @echo 'Installation targets:'
151 @echo ' install - build and install everything'
152 @echo ' install-xen - build and install the Xen hypervisor'
153 @echo ' install-tools - build and install the control tools'
154 @echo ' install-kernels - build and install guest kernels'
155 @echo ' install-stubdom - build and install the stubdomain images'
156 @echo ' install-docs - build and install user documentation'
157 @echo ''
158 @echo 'Building targets:'
159 @echo ' dist - build and install everything into local dist directory'
160 @echo ' world - clean everything, delete guest kernel build'
161 @echo ' trees then make dist'
162 @echo ' xen - build and install Xen hypervisor'
163 @echo ' tools - build and install tools'
164 @echo ' stubdom - build and install the stubdomain images'
165 @echo ' kernels - build and install guest kernels'
166 @echo ' kbuild - synonym for make kernels'
167 @echo ' docs - build and install user documentation'
168 @echo ' dev-docs - build developer-only documentation'
169 @echo ''
170 @echo 'Cleaning targets:'
171 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
172 @echo ' distclean - clean plus delete kernel build trees and'
173 @echo ' local downloaded files'
174 @echo ' kdelete - delete guest kernel build trees'
175 @echo ' kclean - clean guest kernel build trees'
176 @echo ''
177 @echo 'Miscellaneous targets:'
178 @echo ' prep-kernels - prepares kernel directories, does not build'
179 @echo ' uninstall - attempt to remove installed Xen tools'
180 @echo ' (use with extreme care!)'
181 @echo
182 @echo 'Trusted Boot (tboot) targets:'
183 @echo ' build-tboot - download and build the tboot module'
184 @echo ' install-tboot - download, build, and install the tboot module'
185 @echo ' clean-tboot - clean the tboot module if it exists'
186 @echo
187 @echo 'Environment:'
188 @echo ' XEN_PYTHON_NATIVE_INSTALL=y'
189 @echo ' - native python install or dist'
190 @echo ' install into prefix/lib/python<VERSION>'
191 @echo ' instead of <PREFIX>/lib/python'
192 @echo ' true if set to non-empty value, false otherwise'
194 # Use this target with extreme care!
195 .PHONY: uninstall
196 uninstall: D=$(DESTDIR)
197 uninstall:
198 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
199 rm -rf $(D)/etc/init.d/xend*
200 rm -rf $(D)/etc/hotplug/xen-backend.agent
201 rm -f $(D)/etc/udev/rules.d/xen-backend.rules
202 rm -f $(D)/etc/udev/xen-backend.rules
203 rm -f $(D)/etc/sysconfig/xendomains
204 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
205 rm -rf $(D)/boot/*xen*
206 rm -rf $(D)/lib/modules/*xen*
207 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
208 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
209 rm -rf $(D)/usr/bin/xc_shadow
210 rm -rf $(D)/usr/bin/pygrub
211 rm -rf $(D)/usr/bin/setsize $(D)/usr/bin/tbctl
212 rm -rf $(D)/usr/bin/xsls
213 rm -rf $(D)/usr/include/xenctrl.h $(D)/usr/include/xenguest.h
214 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
215 rm -rf $(D)/usr/include/xen
216 rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest*
217 rm -rf $(D)$(LIBDIR)/libxenstore*
218 rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub
219 rm -rf $(D)$(LIBDIR)/xen/
220 rm -rf $(D)/usr/lib/xen/
221 rm -rf $(D)/usr/local/sbin/setmask $(D)/usr/local/sbin/xen*
222 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
223 rm -rf $(D)/usr/share/doc/xen
224 rm -rf $(D)/usr/share/xen
225 rm -rf $(D)/usr/share/man/man1/xen*
226 rm -rf $(D)/usr/share/man/man8/xen*
227 rm -rf $(D)/boot/tboot*
229 # Legacy targets for compatibility
230 .PHONY: linux26
231 linux26:
232 $(MAKE) 'KERNELS=linux-2.6*' kernels
235 #
236 # tboot targets
237 #
239 TBOOT_TARFILE = tboot-20080613.tar.gz
240 TBOOT_BASE_URL = http://downloads.sourceforge.net/tboot
242 .PHONY: build-tboot
243 build-tboot: download_tboot
244 $(MAKE) -C tboot build
246 .PHONY: install-tboot
247 install-tboot: download_tboot
248 $(MAKE) -C tboot install
250 .PHONY: dist-tboot
251 dist-tboot: download_tboot
252 $(MAKE) DESTDIR=$(DISTDIR)/install -C tboot dist
254 .PHONY: clean-tboot
255 clean-tboot:
256 [ ! -d tboot ] || $(MAKE) -C tboot clean
258 .PHONY: distclean-tboot
259 distclean-tboot:
260 [ ! -d tboot ] || $(MAKE) -C tboot distclean
262 .PHONY: download_tboot
263 download_tboot: tboot/Makefile
265 tboot/Makefile: tboot/$(TBOOT_TARFILE)
266 [ -e tboot/Makefile ] || tar -xzf tboot/$(TBOOT_TARFILE) -C tboot/ --strip-components 1
268 tboot/$(TBOOT_TARFILE):
269 mkdir -p tboot
270 wget -O tboot/$(TBOOT_TARFILE) $(TBOOT_BASE_URL)/$(TBOOT_TARFILE)