xcp-1.6-updates/xen-4.1.hg

view Makefile @ 23319:ff523faf2be1

x86/mm: fix mod_l1_entry() return value when encountering r/o MMIO page

While putting together the workaround announced in
http://lists.xen.org/archives/html/xen-devel/2012-06/msg00709.html, I
found that mod_l1_entry(), upon encountering a set bit in
mmio_ro_ranges, would return 1 instead of 0 (the removal of the write
permission is supposed to be entirely transparent to the caller, even
more so to the calling guest).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen-unstable changeset: 25487:baa85434d0ec
xen-unstable date: Thu Jun 21 11:30:59 2012 +0200
author Jan Beulich <jbeulich@novell.com>
date Mon Jul 09 10:30:16 2012 +0100 (2012-07-09)
parents 18fd1b4e6021
children
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 dist-misc
42 dist-misc:
43 $(INSTALL_DIR) $(DISTDIR)/check
44 $(INSTALL_DATA) ./COPYING $(DISTDIR)
45 $(INSTALL_DATA) ./README $(DISTDIR)
46 $(INSTALL_PROG) ./install.sh $(DISTDIR)
47 $(INSTALL_PROG) tools/check/chk tools/check/check_* tools/check/funcs.sh $(DISTDIR)/check
48 dist-%: DESTDIR=$(DISTDIR)/install
49 dist-%: install-%
50 @: # do nothing
52 # Legacy dist targets
53 .PHONY: xen tools stubdom kernels docs
54 xen: dist-xen
55 tools: dist-tools
56 kernels: dist-kernels
57 stubdom: dist-stubdom
58 docs: dist-docs
60 .PHONY: prep-kernels
61 prep-kernels:
62 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
64 .PHONY: install-xen
65 install-xen:
66 $(MAKE) -C xen install
68 .PHONY: install-tools
69 install-tools:
70 $(MAKE) -C tools install
72 ifeq ($(CONFIG_IOEMU),y)
73 install-tools: tools/ioemu-dir
74 endif
76 .PHONY: install-kernels
77 install-kernels:
78 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
80 .PHONY: install-stubdom
81 install-stubdom: tools/ioemu-dir install-tools
82 $(MAKE) -C stubdom install
83 ifeq (x86_64,$(XEN_TARGET_ARCH))
84 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
85 endif
87 tools/ioemu-dir:
88 $(MAKE) -C tools ioemu-dir-find
90 .PHONY: tools/ioemu-dir-force-update
91 tools/ioemu-dir-force-update:
92 $(MAKE) -C tools ioemu-dir-force-update
94 .PHONY: install-docs
95 install-docs:
96 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
98 .PHONY: dev-docs
99 dev-docs:
100 $(MAKE) -C docs dev-docs
102 # Build all the various kernels and modules
103 .PHONY: kbuild
104 kbuild: kernels
106 # Delete the kernel build trees entirely
107 .PHONY: kdelete
108 kdelete:
109 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
111 # Clean the kernel build trees
112 .PHONY: kclean
113 kclean:
114 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
116 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
117 # and place them in the install directory. 'make install' should then
118 # copy them to the normal system directories
119 .PHONY: world
120 world:
121 $(MAKE) clean
122 $(MAKE) kdelete
123 $(MAKE) dist
125 # clean doesn't do a kclean
126 .PHONY: clean
127 clean::
128 $(MAKE) -C xen clean
129 $(MAKE) -C tools clean
130 $(MAKE) -C stubdom crossclean
131 ifeq (x86_64,$(XEN_TARGET_ARCH))
132 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom crossclean
133 endif
134 $(MAKE) -C docs clean
136 # clean, but blow away kernel build tree plus tarballs
137 .PHONY: distclean
138 distclean:
139 $(MAKE) -C xen distclean
140 $(MAKE) -C tools distclean
141 $(MAKE) -C stubdom distclean
142 ifeq (x86_64,$(XEN_TARGET_ARCH))
143 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
144 endif
145 $(MAKE) -C docs distclean
146 rm -rf dist patches/tmp
147 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
148 rm -rf patches/*/.makedep
150 # Linux name for GNU distclean
151 .PHONY: mrproper
152 mrproper: distclean
154 # Prepare for source tarball
155 .PHONY: src-tarball
156 src-tarball: distclean
157 $(MAKE) -C xen .banner
158 rm -rf xen/tools/figlet .[a-z]*
159 $(MAKE) -C xen distclean
161 .PHONY: help
162 help:
163 @echo 'Installation targets:'
164 @echo ' install - build and install everything'
165 @echo ' install-xen - build and install the Xen hypervisor'
166 @echo ' install-tools - build and install the control tools'
167 @echo ' install-kernels - build and install guest kernels'
168 @echo ' install-stubdom - build and install the stubdomain images'
169 @echo ' install-docs - build and install user documentation'
170 @echo ''
171 @echo 'Building targets:'
172 @echo ' dist - build and install everything into local dist directory'
173 @echo ' world - clean everything, delete guest kernel build'
174 @echo ' trees then make dist'
175 @echo ' xen - build and install Xen hypervisor'
176 @echo ' tools - build and install tools'
177 @echo ' stubdom - build and install the stubdomain images'
178 @echo ' kernels - build and install guest kernels'
179 @echo ' kbuild - synonym for make kernels'
180 @echo ' docs - build and install user documentation'
181 @echo ' dev-docs - build developer-only documentation'
182 @echo ''
183 @echo 'Cleaning targets:'
184 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
185 @echo ' distclean - clean plus delete kernel build trees and'
186 @echo ' local downloaded files'
187 @echo ' kdelete - delete guest kernel build trees'
188 @echo ' kclean - clean guest kernel build trees'
189 @echo ''
190 @echo 'Miscellaneous targets:'
191 @echo ' prep-kernels - prepares kernel directories, does not build'
192 @echo ' uninstall - attempt to remove installed Xen tools'
193 @echo ' (use with extreme care!)'
194 @echo
195 @echo 'Trusted Boot (tboot) targets:'
196 @echo ' build-tboot - download and build the tboot module'
197 @echo ' install-tboot - download, build, and install the tboot module'
198 @echo ' clean-tboot - clean the tboot module if it exists'
199 @echo
200 @echo 'Environment:'
201 @echo ' [ this documentation is sadly not complete ]'
203 # Use this target with extreme care!
204 .PHONY: uninstall
205 uninstall: D=$(DESTDIR)
206 uninstall:
207 [ -d $(D)$(XEN_CONFIG_DIR) ] && mv -f $(D)$(XEN_CONFIG_DIR) $(D)$(XEN_CONFIG_DIR).old-`date +%s` || true
208 rm -rf $(D)$(CONFIG_DIR)/init.d/xend*
209 rm -rf $(D)$(CONFIG_DIR)/hotplug/xen-backend.agent
210 rm -f $(D)$(CONFIG_DIR)/udev/rules.d/xen-backend.rules
211 rm -f $(D)$(CONFIG_DIR)/udev/xen-backend.rules
212 rm -f $(D)$(CONFIG_DIR)/udev/rules.d/xend.rules
213 rm -f $(D)$(CONFIG_DIR)/udev/xend.rules
214 rm -f $(D)$(SYSCONFIG_DIR)/xendomains
215 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
216 rm -rf $(D)/boot/*xen*
217 rm -rf $(D)/lib/modules/*xen*
218 rm -rf $(D)$(LIBDIR)/xen* $(D)$(BINDIR)/lomount
219 rm -rf $(D)$(BINDIR)/cpuperf-perfcntr $(D)$(BINDIR)/cpuperf-xen
220 rm -rf $(D)$(BINDIR)/xc_shadow
221 rm -rf $(D)$(BINDIR)/pygrub
222 rm -rf $(D)$(BINDIR)/setsize $(D)$(BINDIR)/tbctl
223 rm -rf $(D)$(BINDIR)/xsls
224 rm -rf $(D)$(INCLUDEDIR)/xenctrl.h $(D)$(INCLUDEDIR)/xenguest.h
225 rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h
226 rm -rf $(D)$(INCLUDEDIR)/xen
227 rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest*
228 rm -rf $(D)$(LIBDIR)/libxenstore*
229 rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub
230 rm -rf $(D)$(LIBDIR)/xen/
231 rm -rf $(D)$(LIBEXEC)/xen*
232 rm -rf $(D)$(SBINDIR)/setmask
233 rm -rf $(D)$(SBINDIR)/xen* $(D)$(SBINDIR)/netfix $(D)$(SBINDIR)/xm
234 rm -rf $(D)$(SHAREDIR)/doc/xen
235 rm -rf $(D)$(SHAREDIR)/xen
236 rm -rf $(D)$(MAN1DIR)/xen*
237 rm -rf $(D)$(MAN8DIR)/xen*
238 rm -rf $(D)/boot/tboot*
240 # Legacy targets for compatibility
241 .PHONY: linux26
242 linux26:
243 $(MAKE) 'KERNELS=linux-2.6*' kernels
246 #
247 # tboot targets
248 #
250 TBOOT_TARFILE = tboot-20090330.tar.gz
251 #TBOOT_BASE_URL = http://downloads.sourceforge.net/tboot
252 TBOOT_BASE_URL = $(XEN_EXTFILES_URL)
254 .PHONY: build-tboot
255 build-tboot: download_tboot
256 $(MAKE) -C tboot build
258 .PHONY: install-tboot
259 install-tboot: download_tboot
260 $(MAKE) -C tboot install
262 .PHONY: dist-tboot
263 dist-tboot: download_tboot
264 $(MAKE) DESTDIR=$(DISTDIR)/install -C tboot dist
266 .PHONY: clean-tboot
267 clean-tboot:
268 [ ! -d tboot ] || $(MAKE) -C tboot clean
270 .PHONY: distclean-tboot
271 distclean-tboot:
272 [ ! -d tboot ] || $(MAKE) -C tboot distclean
274 .PHONY: download_tboot
275 download_tboot: tboot/Makefile
277 tboot/Makefile: tboot/$(TBOOT_TARFILE)
278 [ -e tboot/Makefile ] || tar -xzf tboot/$(TBOOT_TARFILE) -C tboot/ --strip-components 1
280 tboot/$(TBOOT_TARFILE):
281 mkdir -p tboot
282 wget -O tboot/$(TBOOT_TARFILE) $(TBOOT_BASE_URL)/$(TBOOT_TARFILE)