xcp-1.6-updates/xen-4.1.hg

annotate Config.mk @ 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 acbd36176913
children 5cdcfed7b5b1
rev   line source
kaf24@4252 1 # -*- mode: Makefile; -*-
cl349@4443 2
keir@19530 3 # A debug build of Xen and tools?
keir@22976 4 debug ?= n
kaf24@9189 5
kaf24@10683 6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
keir@17599 7 -e s/i86pc/x86_32/ -e s/amd64/x86_64/)
kaf24@4252 8 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
kfraser@11767 9 XEN_OS ?= $(shell uname -s)
kaf24@4252 10
kfraser@11774 11 CONFIG_$(XEN_OS) := y
kfraser@11774 12
ack@13255 13 SHELL ?= /bin/sh
ack@13255 14
kaf24@4444 15 # Tools to run on system hosting the build
keir@15497 16 HOSTCC = gcc
keir@15497 17 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
keir@15497 18 HOSTCFLAGS += -fno-strict-aliasing
kaf24@4252 19
kaf24@7216 20 DISTDIR ?= $(XEN_ROOT)/dist
kaf24@9599 21 DESTDIR ?= /
kaf24@7207 22
keir@17279 23 # Allow phony attribute to be listed as dependency rather than fake target
keir@17279 24 .PHONY: .phony
keir@17279 25
kfraser@11767 26 include $(XEN_ROOT)/config/$(XEN_OS).mk
kfraser@10197 27 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
katzj@4544 28
keir@19475 29 SHAREDIR ?= $(PREFIX)/share
keir@19475 30 DOCDIR ?= $(SHAREDIR)/doc/xen
keir@19475 31 MANDIR ?= $(SHAREDIR)/man
keir@21565 32 BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d
keir@19475 33
Ian@22187 34 # arguments: variable, common path part, path to test, if yes, if no
Ian@22187 35 define setvar_dir
Ian@22187 36 ifndef $(1)
Ian@22187 37 ifneq (,$(wildcard $(2)$(3)))
Ian@22187 38 $(1) ?= $(2)$(4)
Ian@22187 39 else
Ian@22187 40 $(1) ?= $(2)$(5)
Ian@22187 41 endif
Ian@22187 42 endif
Ian@22187 43 endef
Ian@22187 44
bruce@22179 45 # See distro_mapping.txt for other options
Ian@22187 46 $(eval $(call setvar_dir,CONFIG_LEAF_DIR,,/etc/sysconfig,sysconfig,default))
Ian@22187 47 $(eval $(call setvar_dir,SUBSYS_DIR,/var/run,/subsys,/subsys,))
Ian@22187 48 $(eval $(call setvar_dir,INITD_DIR,/etc,/rc.d/init.d,/rc.d/init.d,/init.d))
bruce@22179 49
kaf24@4252 50 ifneq ($(EXTRA_PREFIX),)
kaf24@4252 51 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
keir@16950 52 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
kaf24@4252 53 endif
kaf24@4252 54
keir@20994 55 BISON ?= bison
keir@20994 56 FLEX ?= flex
keir@20994 57
keir@19594 58 PYTHON ?= python
keir@19594 59 PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
keir@19594 60 # The above requires that PREFIX contains *no spaces*. This variable is here
keir@19594 61 # to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug:
keir@19594 62 # https://bugs.launchpad.net/ubuntu/+bug/362570
keir@19594 63
kfraser@14581 64 # cc-option: Check if compiler supports first option, else fall back to second.
keir@23063 65 #
keir@23063 66 # This is complicated by the fact that unrecognised -Wno-* options:
keir@23063 67 # (a) are ignored unless the compilation emits a warning; and
keir@23063 68 # (b) even then produce a warning rather than an error
keir@23063 69 # To handle this we do a test compile, passing the option-under-test, on a code
keir@23063 70 # fragment that will always produce a warning (integer assigned to pointer).
keir@23063 71 # We then grep for the option-under-test in the compiler's output, the presence
keir@23063 72 # of which would indicate an "unrecognized command-line option" warning/error.
keir@23063 73 #
kfraser@11820 74 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
keir@23063 75 cc-option = $(shell if test -z "`echo 'void*p=1;' | \
ian@23164 76 $(1) $(2) -S -o /dev/null -xc - 2>&1 | grep -- $(2) -`"; \
keir@23063 77 then echo "$(2)"; else echo "$(3)"; fi ;)
kaf24@7975 78
keir@19030 79 # cc-option-add: Add an option to compilation flags, but only if supported.
keir@19030 80 # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6)
keir@19030 81 cc-option-add = $(eval $(call cc-option-add-closure,$(1),$(2),$(3)))
keir@19030 82 define cc-option-add-closure
keir@19030 83 ifneq ($$(call cc-option,$$($(2)),$(3),n),n)
keir@19030 84 $(1) += $(3)
keir@19030 85 endif
keir@19030 86 endef
keir@19030 87
keir@21860 88 cc-options-add = $(foreach o,$(3),$(call cc-option-add,$(1),$(2),$(o)))
keir@21860 89
kfraser@14581 90 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
keir@14420 91 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
keir@14420 92 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
keir@14420 93 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
keir@14420 94 then echo y; else echo n; fi ;)
keir@14420 95
kfraser@14581 96 # cc-ver-check: Check compiler is at least specified version, else fail.
kfraser@14581 97 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
kfraser@14581 98 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
kfraser@14581 99 define cc-ver-check-closure
kfraser@14581 100 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
kfraser@14581 101 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
kfraser@14581 102 cc-option := n
kfraser@14581 103 endif
kfraser@14581 104 endef
kfraser@14581 105
keir@19818 106 define buildmakevars2shellvars
keir@23167 107 export PREFIX="$(PREFIX)"; \
keir@23167 108 export XEN_SCRIPT_DIR="$(XEN_SCRIPT_DIR)"; \
keir@23167 109 export XEN_ROOT="$(XEN_ROOT)"
keir@19818 110 endef
keir@19818 111
keir@19818 112 buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1)))
keir@19818 113 define buildmakevars2file-closure
keir@19818 114 .PHONY: genpath
keir@19818 115 genpath:
ian@22189 116 rm -f $(1).tmp; \
ian@22189 117 echo "SBINDIR=\"$(SBINDIR)\"" >> $(1).tmp; \
ian@22189 118 echo "BINDIR=\"$(BINDIR)\"" >> $(1).tmp; \
ian@22189 119 echo "LIBEXEC=\"$(LIBEXEC)\"" >> $(1).tmp; \
ian@22189 120 echo "LIBDIR=\"$(LIBDIR)\"" >> $(1).tmp; \
ian@22189 121 echo "SHAREDIR=\"$(SHAREDIR)\"" >> $(1).tmp; \
ian@22189 122 echo "PRIVATE_BINDIR=\"$(PRIVATE_BINDIR)\"" >> $(1).tmp; \
ian@22189 123 echo "XENFIRMWAREDIR=\"$(XENFIRMWAREDIR)\"" >> $(1).tmp; \
ian@22189 124 echo "XEN_CONFIG_DIR=\"$(XEN_CONFIG_DIR)\"" >> $(1).tmp; \
ian@22189 125 echo "XEN_SCRIPT_DIR=\"$(XEN_SCRIPT_DIR)\"" >> $(1).tmp; \
stefano@22202 126 echo "XEN_LOCK_DIR=\"$(XEN_LOCK_DIR)\"" >> $(1).tmp; \
ian@22189 127 if ! cmp $(1).tmp $(1); then mv -f $(1).tmp $(1); fi
keir@19818 128 endef
keir@19818 129
keir@16722 130 ifeq ($(debug),y)
kfraser@11767 131 CFLAGS += -g
kfraser@11767 132 endif
kfraser@11767 133
keir@15497 134 CFLAGS += -fno-strict-aliasing
keir@15497 135
kfraser@11799 136 CFLAGS += -std=gnu99
kfraser@11799 137
kaf24@9200 138 CFLAGS += -Wall -Wstrict-prototypes
kaf24@9188 139
kfraser@11762 140 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
kfraser@11762 141 # result of any casted expression causes a warning.
kfraser@11762 142 CFLAGS += -Wno-unused-value
kfraser@11762 143
keir@19030 144 $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
keir@19030 145 $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
olaf@23058 146 $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable)
kaf24@7973 147
kaf24@4252 148 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
kaf24@4252 149 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
iap10@5507 150
keir@21860 151 EMBEDDED_EXTRA_CFLAGS := -nopie -fno-stack-protector -fno-stack-protector-all
keir@21860 152 EMBEDDED_EXTRA_CFLAGS += -fno-exceptions
keir@21860 153
kfraser@15808 154 # Enable XSM security module. Enabling XSM requires selection of an
kfraser@15812 155 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
kfraser@15808 156 XSM_ENABLE ?= n
kfraser@15809 157 FLASK_ENABLE ?= n
kaf24@7900 158 ACM_SECURITY ?= n
kaf24@7900 159
keir@21838 160 # Download GIT repositories via HTTP or GIT's own protocol?
keir@21838 161 # GIT's protocol is faster and more robust, when it works at all (firewalls
keir@21838 162 # may block it). We make it the default, but if your GIT repository downloads
keir@21838 163 # fail or hang, please specify GIT_HTTP=y in your environment.
keir@21838 164 GIT_HTTP ?= n
keir@21838 165
keir@18969 166 XEN_EXTFILES_URL=http://xenbits.xensource.com/xen-extfiles
keir@18969 167 # All the files at that location were downloaded from elsewhere on
keir@18969 168 # the internet. The original download URL is preserved as a comment
keir@18969 169 # near the place in the Xen Makefiles where the file is used.
keir@18969 170
keir@21838 171 ifeq ($(GIT_HTTP),y)
keir@22975 172 QEMU_REMOTE=http://xenbits.xensource.com/git-http/qemu-xen-4.1-testing.git
keir@21838 173 else
keir@22975 174 QEMU_REMOTE=git://xenbits.xensource.com/qemu-xen-4.1-testing.git
keir@21838 175 endif
keir@17953 176
keir@17953 177 # Specify which qemu-dm to use. This may be `ioemu' to use the old
keir@17953 178 # Mercurial in-tree version, or a local directory, or a git URL.
ian@22831 179 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
keir@18511 180 CONFIG_QEMU ?= $(QEMU_REMOTE)
keir@17953 181
keir@23302 182 QEMU_TAG ?= xen-4.1.3-rc2
Ian@23285 183 # Mon Apr 2 17:55:05 2012 +0100
Ian@23285 184 # qemu-xen-traditional: QDISK fixes
keir@19692 185
josht@6320 186 # Optional components
kfraser@14271 187 XENSTAT_XENTOP ?= y
kfraser@14271 188 VTPM_TOOLS ?= n
jfehlig@12596 189 LIBXENAPI_BINDINGS ?= n
kfraser@14271 190 PYTHON_TOOLS ?= y
keir@21294 191 OCAML_TOOLS ?= y
keir@16742 192 CONFIG_MINITERM ?= n
keir@16742 193 CONFIG_LOMOUNT ?= n
kaf24@7207 194
keir@21294 195 ifeq ($(OCAML_TOOLS),y)
keir@21294 196 OCAML_TOOLS := $(shell ocamlopt -v > /dev/null 2>&1 && echo "y" || echo "n")
keir@21294 197 endif
keir@21294 198
kaf24@7207 199 -include $(XEN_ROOT)/.config