00/28] Kconfig conversion
PATCH v6 1/1 00/28] Kconfig conversion
The following series is a follow on to the Kconfig conversion patch series. There are still more components to convert however this is the bare minimal to get everything working and get the options out of the existing makefiles.
The CONFIG_HAS_ variables are there to match the behavior of the Linux CONFIG_HAVE_ variables. The purpose is to say that this hardware/profile/env supports this option while the CONFIG_ variable states that this option was requested on/off by user intervention.
The UARTs are now uniformly prefixed as CONFIG_UART_ and dropping most of the CONFIG_HAS_ labeling for them. This means they are now user selectable as requested by Julien Grall in the prior review. The question I've got is the old config was just for selecting defaults. Users could enable the OMAP UART for arm64 for example but I'm not sure if that's valid. Currently this patchset makes those UARTs not user selectable if they were not previously defaulted on. But I would like some feedback on this if possible.
Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.
The patch series can be grabbed at:
https://github.com/cardoe/xen/tree/kconfig_v6
Changes since v5:
- added Andrew Cooper's Acked-by and Tested-by
- rebased to resolve conflict with NUMA changes in staging (minor conflict)
Changes since v4:
- v4 was an oops and was a resend of v3. So the 'Changes since v3' apply here.
Changes since v3:
- fix dependency inversion causing options to appear to flip back on (hi kexec)
- separate out wiring up Kconfig and then using it in the build (added patch 3)
- dropped the old patch 3
- changed UART configs to be prefixed as CONFIG_UART_
- changed ARM UART defaults
Changes since v2:
- drop x86_32 support (patch 2)
- fix make defconfig (patch 2)
- fix 'make -C xen' vs 'cd xen && make' behaving differently (patch 2)
- fix for ARM64 builds (added patch 3)
- At this point all targets are tested on x86_64, arm32, and arm64 with fresh clones and rebuilds.
Changes since v1:
- hopefully addressed all review comments
- added CCs to all maintainers from get_maintainer.pl as requested
- drop Kbuild to build Kconfig and instead port the Makefile to the Xen env
- add support for xconfig/gconfig
- include Kconfig docs from Linux
Doug Goldstein (28):
build: import Kbuild/Kconfig from Linux 4.2
build: build Kconfig and config rules
build: use generated Kconfig options for Xen
build: convert HAS_PASSTHROUGH use to Kconfig
build: convert HAS_DEVICE_TREE use to Kconfig
build: convert HAS_PCI use to Kconfig
build: convert HAS_NS16550 use to Kconfig
build: convert HAS_IOPORTS use to Kconfig
build: convert HAS_ACPI use to Kconfig
build: convert HAS_VIDEO use to Kconfig
build: convert HAS_VGA use to Kconfig
build: convert HAS_CPUFREQ use to Kconfig
build: convert HAS_GDBSX use to Kconfig
build: convert HAS_PDX use to Kconfig
build: convert HAS_KEXEC use to Kconfig
build: convert HAS_ARM_HDLCD use to Kconfig
build: convert HAS_CADENCE_UART use to Kconfig
build: convert HAS_PL011 use to Kconfig
build: convert HAS_EXYNOS4210 use to Kconfig
build: convert HAS_OMAP use to Kconfig
build: convert HAS_SCIF use to Kconfig
build: convert HAS_EHCI use to Kconfig
build: convert HAS_MEM_ACCESS use to Kconfig
build: convert HAS_MEM_PAGING use to Kconfig
build: convert HAS_MEM_SHARING use to Kconfig
build: convert HAS_GICV3 use to Kconfig
build: convert CONFIG_COMPAT to Kconfig
build: convert kexec options to CONFIG_KEXEC
.gitignore | 8 + config/arm32.mk | 5 - config/arm64.mk | 4 - config/x86_32.mk | 2 - config/x86_64.mk | 2 - docs/misc/kconfig-language.txt | 395 ++++ docs/misc/kconfig.txt | 237 +++ xen/Kconfig | 26 + xen/Makefile | 25 + xen/Rules.mk | 18 +- xen/arch/arm/Kconfig | 42 + xen/arch/arm/Makefile | 2 +- xen/arch/arm/Rules.mk | 8 - xen/arch/arm/configs/arm32_defconfig | 5 + xen/arch/arm/configs/arm64_defconfig | 3 + xen/arch/arm/vgic.c | 2 +- xen/arch/x86/Kconfig | 39 + xen/arch/x86/Rules.mk | 12 - xen/arch/x86/configs/x86_64_defconfig | 0 xen/common/Kconfig | 44 + xen/common/Makefile | 8 +- xen/common/compat/memory.c | 4 +- xen/common/domain.c | 2 +- xen/common/domctl.c | 2 +- xen/common/memory.c | 12 +- xen/common/sysctl.c | 4 +- xen/common/vm_event.c | 16 +- xen/drivers/Kconfig | 15 + xen/drivers/Makefile | 10 +- xen/drivers/acpi/Kconfig | 4 + xen/drivers/char/Kconfig | 52 + xen/drivers/char/Makefile | 14 +- xen/drivers/char/ns16550.c | 40 +- xen/drivers/cpufreq/Kconfig | 4 + xen/drivers/passthrough/Kconfig | 4 + xen/drivers/passthrough/Makefile | 4 +- xen/drivers/passthrough/arm/smmu.c | 4 - xen/drivers/passthrough/iommu.c | 4 +- xen/drivers/pci/Kconfig | 4 + xen/drivers/video/Kconfig | 13 + xen/drivers/video/Makefile | 14 +- xen/include/asm-arm/device.h | 2 +- xen/include/asm-arm/domain.h | 2 +- xen/include/asm-arm/gic.h | 4 +- xen/include/asm-arm/vgic.h | 2 +- xen/include/linux/kconfig.h | 54 + xen/include/xen/config.h | 2 + xen/include/xen/hvm/iommu.h | 2 +- xen/include/xen/iommu.h | 14 +- xen/include/xen/mem_access.h | 4 +- xen/include/xen/pdx.h | 4 +- xen/include/xen/sched.h | 4 +- xen/include/xsm/dummy.h | 14 +- xen/include/xsm/xsm.h | 28 +- xen/scripts/Makefile.host | 128 ++ xen/scripts/kconfig/.gitignore | 25 + xen/scripts/kconfig/Makefile | 77 + xen/scripts/kconfig/Makefile.linux | 317 +++ xen/scripts/kconfig/POTFILES.in | 12 + xen/scripts/kconfig/check.sh | 13 + xen/scripts/kconfig/conf.c | 722 +++++++ xen/scripts/kconfig/confdata.c | 1248 ++++++++++++ xen/scripts/kconfig/expr.c | 1206 +++++++++++ xen/scripts/kconfig/expr.h | 238 +++ xen/scripts/kconfig/gconf.c | 1521 ++++++++++++++ xen/scripts/kconfig/gconf.glade | 661 ++++++ xen/scripts/kconfig/images.c | 326 +++ xen/scripts/kconfig/kxgettext.c | 235 +++ xen/scripts/kconfig/list.h | 131 ++ xen/scripts/kconfig/lkc.h | 186 ++ xen/scripts/kconfig/lkc_proto.h | 52 + xen/scripts/kconfig/lxdialog/.gitignore | 4 + xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING | 4 + xen/scripts/kconfig/lxdialog/check-lxdialog.sh | 91 + xen/scripts/kconfig/lxdialog/checklist.c | 332 +++ xen/scripts/kconfig/lxdialog/dialog.h | 257 +++ xen/scripts/kconfig/lxdialog/inputbox.c | 301 +++ xen/scripts/kconfig/lxdialog/menubox.c | 437 ++++ xen/scripts/kconfig/lxdialog/textbox.c | 408 ++++ xen/scripts/kconfig/lxdialog/util.c | 713 +++++++ xen/scripts/kconfig/lxdialog/yesno.c | 114 ++ xen/scripts/kconfig/mconf.c | 1047 ++++++++++ xen/scripts/kconfig/menu.c | 697 +++++++ xen/scripts/kconfig/merge_config.sh | 158 ++ xen/scripts/kconfig/nconf.c | 1561 ++++++++++++++ xen/scripts/kconfig/nconf.gui.c | 656 ++++++ xen/scripts/kconfig/nconf.h | 96 + xen/scripts/kconfig/qconf.cc | 1798 +++++++++++++++++ xen/scripts/kconfig/qconf.h | 338 ++++ xen/scripts/kconfig/streamline_config.pl | 647 ++++++ xen/scripts/kconfig/symbol.c | 1377 +++++++++++++ xen/scripts/kconfig/util.c | 147 ++ xen/scripts/kconfig/zconf.gperf | 48 + xen/scripts/kconfig/zconf.hash.c_shipped | 289 +++ xen/scripts/kconfig/zconf.l | 372 ++++ xen/scripts/kconfig/zconf.lex.c_shipped | 2476 +++++++++++++++++++++++ xen/scripts/kconfig/zconf.tab.c_shipped | 2580 ++++++++++++++++++++++++ xen/scripts/kconfig/zconf.y | 742 +++++++ xen/xsm/dummy.c | 10 +- xen/xsm/flask/hooks.c | 34 +- xen/xsm/xsm_core.c | 2 +- xen/xsm/xsm_policy.c | 4 +- 102 files changed, 25900 insertions(+), 187 deletions(-) create mode 100644 docs/misc/kconfig-language.txt create mode 100644 docs/misc/kconfig.txt create mode 100644 xen/Kconfig create mode 100644 xen/arch/arm/Kconfig create mode 100644 xen/arch/arm/configs/arm32_defconfig create mode 100644 xen/arch/arm/configs/arm64_defconfig create mode 100644 xen/arch/x86/Kconfig create mode 100644 xen/arch/x86/configs/x86_64_defconfig create mode 100644 xen/common/Kconfig create mode 100644 xen/drivers/Kconfig create mode 100644 xen/drivers/acpi/Kconfig create mode 100644 xen/drivers/char/Kconfig create mode 100644 xen/drivers/cpufreq/Kconfig create mode 100644 xen/drivers/passthrough/Kconfig create mode 100644 xen/drivers/pci/Kconfig create mode 100644 xen/drivers/video/Kconfig create mode 100644 xen/include/linux/kconfig.h create mode 100644 xen/scripts/Makefile.host create mode 100644 xen/scripts/kconfig/.gitignore create mode 100644 xen/scripts/kconfig/Makefile create mode 100644 xen/scripts/kconfig/Makefile.linux create mode 100644 xen/scripts/kconfig/POTFILES.in create mode 100755 xen/scripts/kconfig/check.sh create mode 100644 xen/scripts/kconfig/conf.c create mode 100644 xen/scripts/kconfig/confdata.c create mode 100644 xen/scripts/kconfig/expr.c create mode 100644 xen/scripts/kconfig/expr.h create mode 100644 xen/scripts/kconfig/gconf.c create mode 100644 xen/scripts/kconfig/gconf.glade create mode 100644 xen/scripts/kconfig/images.c create mode 100644 xen/scripts/kconfig/kxgettext.c create mode 100644 xen/scripts/kconfig/list.h create mode 100644 xen/scripts/kconfig/lkc.h create mode 100644 xen/scripts/kconfig/lkc_proto.h create mode 100644 xen/scripts/kconfig/lxdialog/.gitignore create mode 100644 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING create mode 100755 xen/scripts/kconfig/lxdialog/check-lxdialog.sh create mode 100644 xen/scripts/kconfig/lxdialog/checklist.c create mode 100644 xen/scripts/kconfig/lxdialog/dialog.h create mode 100644 xen/scripts/kconfig/lxdialog/inputbox.c create mode 100644 xen/scripts/kconfig/lxdialog/menubox.c create mode 100644 xen/scripts/kconfig/lxdialog/textbox.c create mode 100644 xen/scripts/kconfig/lxdialog/util.c create mode 100644 xen/scripts/kconfig/lxdialog/yesno.c create mode 100644 xen/scripts/kconfig/mconf.c create mode 100644 xen/scripts/kconfig/menu.c create mode 100755 xen/scripts/kconfig/merge_config.sh create mode 100644 xen/scripts/kconfig/nconf.c create mode 100644 xen/scripts/kconfig/nconf.gui.c create mode 100644 xen/scripts/kconfig/nconf.h create mode 100644 xen/scripts/kconfig/qconf.cc create mode 100644 xen/scripts/kconfig/qconf.h create mode 100755 xen/scripts/kconfig/streamline_config.pl create mode 100644 xen/scripts/kconfig/symbol.c create mode 100644 xen/scripts/kconfig/util.c create mode 100644 xen/scripts/kconfig/zconf.gperf create mode 100644 xen/scripts/kconfig/zconf.hash.c_shipped create mode 100644 xen/scripts/kconfig/zconf.l create mode 100644 xen/scripts/kconfig/zconf.lex.c_shipped create mode 100644 xen/scripts/kconfig/zconf.tab.c_shipped create mode 100644 xen/scripts/kconfig/zconf.y
Signature · 1 line
2.4.10
PATCH v6 1/1 01/28] build: import Kbuild/Kconfig from Linux 4.2
Brings in the Kbuild/Kconfig plumbing from the Linux 4.2 release.
--- docs/misc/kconfig-language.txt | 395 ++++ docs/misc/kconfig.txt | 237 +++ xen/include/linux/kconfig.h | 54 + xen/scripts/Makefile.host | 128 ++ xen/scripts/kconfig/.gitignore | 22 + xen/scripts/kconfig/Makefile.linux | 317 +++ xen/scripts/kconfig/POTFILES.in | 12 + xen/scripts/kconfig/check.sh | 13 + xen/scripts/kconfig/conf.c | 722 +++++++ xen/scripts/kconfig/confdata.c | 1248 ++++++++++++ xen/scripts/kconfig/expr.c | 1206 +++++++++++ xen/scripts/kconfig/expr.h | 238 +++ xen/scripts/kconfig/gconf.c | 1521 ++++++++++++++ xen/scripts/kconfig/gconf.glade | 661 ++++++ xen/scripts/kconfig/images.c | 326 +++ xen/scripts/kconfig/kxgettext.c | 235 +++ xen/scripts/kconfig/list.h | 131 ++ xen/scripts/kconfig/lkc.h | 186 ++ xen/scripts/kconfig/lkc_proto.h | 52 + xen/scripts/kconfig/lxdialog/.gitignore | 4 + xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING | 4 + xen/scripts/kconfig/lxdialog/check-lxdialog.sh | 91 + xen/scripts/kconfig/lxdialog/checklist.c | 332 +++ xen/scripts/kconfig/lxdialog/dialog.h | 257 +++ xen/scripts/kconfig/lxdialog/inputbox.c | 301 +++ xen/scripts/kconfig/lxdialog/menubox.c | 437 ++++ xen/scripts/kconfig/lxdialog/textbox.c | 408 ++++ xen/scripts/kconfig/lxdialog/util.c | 713 +++++++ xen/scripts/kconfig/lxdialog/yesno.c | 114 ++ xen/scripts/kconfig/mconf.c | 1047 ++++++++++ xen/scripts/kconfig/menu.c | 697 +++++++ xen/scripts/kconfig/merge_config.sh | 158 ++ xen/scripts/kconfig/nconf.c | 1561 ++++++++++++++ xen/scripts/kconfig/nconf.gui.c | 656 ++++++ xen/scripts/kconfig/nconf.h | 96 + xen/scripts/kconfig/qconf.cc | 1798 +++++++++++++++++ xen/scripts/kconfig/qconf.h | 338 ++++ xen/scripts/kconfig/streamline_config.pl | 647 ++++++ xen/scripts/kconfig/symbol.c | 1377 +++++++++++++ xen/scripts/kconfig/util.c | 147 ++ xen/scripts/kconfig/zconf.gperf | 48 + xen/scripts/kconfig/zconf.hash.c_shipped | 289 +++ xen/scripts/kconfig/zconf.l | 372 ++++ xen/scripts/kconfig/zconf.lex.c_shipped | 2476 +++++++++++++++++++++++ xen/scripts/kconfig/zconf.tab.c_shipped | 2580 ++++++++++++++++++++++++ xen/scripts/kconfig/zconf.y | 742 +++++++ 46 files changed, 25394 insertions(+) create mode 100644 docs/misc/kconfig-language.txt create mode 100644 docs/misc/kconfig.txt create mode 100644 xen/include/linux/kconfig.h create mode 100644 xen/scripts/Makefile.host create mode 100644 xen/scripts/kconfig/.gitignore create mode 100644 xen/scripts/kconfig/Makefile.linux create mode 100644 xen/scripts/kconfig/POTFILES.in create mode 100755 xen/scripts/kconfig/check.sh create mode 100644 xen/scripts/kconfig/conf.c create mode 100644 xen/scripts/kconfig/confdata.c create mode 100644 xen/scripts/kconfig/expr.c create mode 100644 xen/scripts/kconfig/expr.h create mode 100644 xen/scripts/kconfig/gconf.c create mode 100644 xen/scripts/kconfig/gconf.glade create mode 100644 xen/scripts/kconfig/images.c create mode 100644 xen/scripts/kconfig/kxgettext.c create mode 100644 xen/scripts/kconfig/list.h create mode 100644 xen/scripts/kconfig/lkc.h create mode 100644 xen/scripts/kconfig/lkc_proto.h create mode 100644 xen/scripts/kconfig/lxdialog/.gitignore create mode 100644 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING create mode 100755 xen/scripts/kconfig/lxdialog/check-lxdialog.sh create mode 100644 xen/scripts/kconfig/lxdialog/checklist.c create mode 100644 xen/scripts/kconfig/lxdialog/dialog.h create mode 100644 xen/scripts/kconfig/lxdialog/inputbox.c create mode 100644 xen/scripts/kconfig/lxdialog/menubox.c create mode 100644 xen/scripts/kconfig/lxdialog/textbox.c create mode 100644 xen/scripts/kconfig/lxdialog/util.c create mode 100644 xen/scripts/kconfig/lxdialog/yesno.c create mode 100644 xen/scripts/kconfig/mconf.c create mode 100644 xen/scripts/kconfig/menu.c create mode 100755 xen/scripts/kconfig/merge_config.sh create mode 100644 xen/scripts/kconfig/nconf.c create mode 100644 xen/scripts/kconfig/nconf.gui.c create mode 100644 xen/scripts/kconfig/nconf.h create mode 100644 xen/scripts/kconfig/qconf.cc create mode 100644 xen/scripts/kconfig/qconf.h create mode 100755 xen/scripts/kconfig/streamline_config.pl create mode 100644 xen/scripts/kconfig/symbol.c create mode 100644 xen/scripts/kconfig/util.c create mode 100644 xen/scripts/kconfig/zconf.gperf create mode 100644 xen/scripts/kconfig/zconf.hash.c_shipped create mode 100644 xen/scripts/kconfig/zconf.l create mode 100644 xen/scripts/kconfig/zconf.lex.c_shipped create mode 100644 xen/scripts/kconfig/zconf.tab.c_shipped create mode 100644 xen/scripts/kconfig/zconf.y
docs/misc/kconfig-language.txt new file +395 -0
@@ -0,0 +1,395 @@ +Introduction +------------ + +The configuration database is a collection of configuration options +organized in a tree structure: + + +- Code maturity level options + | +- Prompt for development and/or incomplete code/drivers + +- General setup + | +- Networking support + | +- System V IPC + | +- BSD Process Accounting + | +- Sysctl support + +- Loadable module support + | +- Enable loadable module support + | +- Set version information on all module symbols + | +- Kernel module loader + +- ... + +Every entry has its own dependencies. These dependencies are used +to determine the visibility of an entry. Any child entry is only +visible if its parent entry is also visible. + +Menu entries +------------ + +Most entries define a config option; all other entries help to organize +them. A single configuration option is defined like this: + +config MODVERSIONS + bool "Set version information on all module symbols" + depends on MODULES + help + Usually, modules have to be recompiled whenever you switch to a new + kernel. ... + +Every line starts with a key word and can be followed by multiple +arguments. "config" starts a new config entry. The following lines +define attributes for this config option. Attributes can be the type of +the config option, input prompt, dependencies, help text and default +values. A config option can be defined multiple times with the same +name, but every definition can have only a single input prompt and the +type must not conflict. + +Menu attributes +--------------- + +A menu entry can have a number of attributes. Not all of them are +applicable everywhere (see syntax). + +- type definition: "bool"/"tristate"/"string"/"hex"/"int" + Every config option must have a type. There are only two basic types: + tristate and string; the other types are based on these two. The type + definition optionally accepts an input prompt, so these two examples + are equivalent: + + bool "Networking support" + and + bool + prompt "Networking support" + +- input prompt: "prompt" <prompt> ["if" <expr>] + Every menu entry can have at most one prompt, which is used to display + to the user. Optionally dependencies only for this prompt can be added + with "if". + +- default value: "default" <expr> ["if" <expr>] + A config option can have any number of default values. If multiple + default values are visible, only the first defined one is active. + Default values are not limited to the menu entry where they are + defined. This means the default can be defined somewhere else or be + overridden by an earlier definition. + The default value is only assigned to the config symbol if no other + value was set by the user (via the input prompt above). If an input + prompt is visible the default value is presented to the user and can + be overridden by him. + Optionally, dependencies only for this default value can be added with + "if". + +- type definition + default value: + "def_bool"/"def_tristate" <expr> ["if" <expr>] + This is a shorthand notation for a type definition plus a value. + Optionally dependencies for this default value can be added with "if". + +- dependencies: "depends on" <expr> + This defines a dependency for this menu entry. If multiple + dependencies are defined, they are connected with '&&'. Dependencies + are applied to all other options within this menu entry (which also + accept an "if" expression), so these two examples are equivalent: + + bool "foo" if BAR + default y if BAR + and + depends on BAR + bool "foo" + default y + +- reverse dependencies: "select" <symbol> ["if" <expr>] + While normal dependencies reduce the upper limit of a symbol (see + below), reverse dependencies can be used to force a lower limit of + another symbol. The value of the current menu symbol is used as the + minimal value <symbol> can be set to. If <symbol> is selected multiple + times, the limit is set to the largest selection. + Reverse dependencies can only be used with boolean or tristate + symbols. + Note: + select should be used with care. select will force + a symbol to a value without visiting the dependencies. + By abusing select you are able to select a symbol FOO even + if FOO depends on BAR that is not set. + In general use select only for non-visible symbols + (no prompts anywhere) and for symbols with no dependencies. + That will limit the usefulness but on the other hand avoid + the illegal configurations all over. + +- limiting menu display: "visible if" <expr> + This attribute is only applicable to menu blocks, if the condition is + false, the menu block is not displayed to the user (the symbols + contained there can still be selected by other symbols, though). It is + similar to a conditional "prompt" attribute for individual menu + entries. Default value of "visible" is true. + +- numerical ranges: "range" <symbol> <symbol> ["if" <expr>] + This allows to limit the range of possible input values for int + and hex symbols. The user can only input a value which is larger than + or equal to the first symbol and smaller than or equal to the second + symbol. + +- help text: "help" or "---help---" + This defines a help text. The end of the help text is determined by + the indentation level, this means it ends at the first line which has + a smaller indentation than the first line of the help text. + "---help---" and "help" do not differ in behaviour, "---help---" is + used to help visually separate configuration logic from help within + the file as an aid to developers. + +- misc options: "option" <symbol>[=<value>] + Various less common options can be defined via this option syntax, + which can modify the behaviour of the menu entry and its config + symbol. These options are currently possible: + + - "defconfig_list" + This declares a list of default entries which can be used when + looking for the default configuration (which is used when the main + .config doesn't exists yet.) + + - "modules" + This declares the symbol to be used as the MODULES symbol, which + enables the third modular state for all config symbols. + At most one symbol may have the "modules" option set. + + - "env"=<value> + This imports the environment variable into Kconfig. It behaves like + a default, except that the value comes from the environment, this + also means that the behaviour when mixing it with normal defaults is + undefined at this point. The symbol is currently not exported back + to the build environment (if this is desired, it can be done via + another symbol). + + - "allnoconfig_y" + This declares the symbol as one that should have the value y when + using "allnoconfig". Used for symbols that hide other symbols. + +Menu dependencies +----------------- + +Dependencies define the visibility of a menu entry and can also reduce +the input range of tristate symbols. The tristate logic used in the +expressions uses one more state than normal boolean logic to express the +module state. Dependency expressions have the following syntax: + +<expr> ::= <symbol> (1) + <symbol> '=' <symbol> (2) + <symbol> '!=' <symbol> (3) + '(' <expr> ')' (4) + '!' <expr> (5) + <expr> '&&' <expr> (6) + <expr> '||' <expr> (7) + +Expressions are listed in decreasing order of precedence. + +(1) Convert the symbol into an expression. Boolean and tristate symbols + are simply converted into the respective expression values. All + other symbol types result in 'n'. +(2) If the values of both symbols are equal, it returns 'y', + otherwise 'n'. +(3) If the values of both symbols are equal, it returns 'n', + otherwise 'y'. +(4) Returns the value of the expression. Used to override precedence. +(5) Returns the result of (2-/expr/). +(6) Returns the result of min(/expr/, /expr/). +(7) Returns the result of max(/expr/, /expr/). + +An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2 +respectively for calculations). A menu entry becomes visible when its +expression evaluates to 'm' or 'y'. + +There are two types of symbols: constant and non-constant symbols. +Non-constant symbols are the most common ones and are defined with the +'config' statement. Non-constant symbols consist entirely of alphanumeric +characters or underscores. +Constant symbols are only part of expressions. Constant symbols are +always surrounded by single or double quotes. Within the quote, any +other character is allowed and the quotes can be escaped using '\'. + +Menu structure +-------------- + +The position of a menu entry in the tree is determined in two ways. First +it can be specified explicitly: + +menu "Network device support" + depends on NET + +config NETDEVICES + ... + +endmenu + +All entries within the "menu" ... "endmenu" block become a submenu of +"Network device support". All subentries inherit the dependencies from +the menu entry, e.g. this means the dependency "NET" is added to the +dependency list of the config option NETDEVICES. + +The other way to generate the menu structure is done by analyzing the +dependencies. If a menu entry somehow depends on the previous entry, it +can be made a submenu of it. First, the previous (parent) symbol must +be part of the dependency list and then one of these two conditions +must be true: +- the child entry must become invisible, if the parent is set to 'n' +- the child entry must only be visible, if the parent is visible + +config MODULES + bool "Enable loadable module support" + +config MODVERSIONS + bool "Set version information on all module symbols" + depends on MODULES + +comment "module support disabled" + depends on !MODULES + +MODVERSIONS directly depends on MODULES, this means it's only visible if +MODULES is different from 'n'. The comment on the other hand is always +visible when MODULES is visible (the (empty) dependency of MODULES is +also part of the comment dependencies). + + +Kconfig syntax +-------------- + +The configuration file describes a series of menu entries, where every +line starts with a keyword (except help texts). The following keywords +end a menu entry: +- config +- menuconfig +- choice/endchoice +- comment +- menu/endmenu +- if/endif +- source +The first five also start the definition of a menu entry. + +config: + + "config" <symbol> + <config options> + +This defines a config symbol <symbol> and accepts any of above +attributes as options. + +menuconfig: + "menuconfig" <symbol> + <config options> + +This is similar to the simple config entry above, but it also gives a +hint to front ends, that all suboptions should be displayed as a +separate list of options. + +choices: + + "choice" [symbol] + <choice options> + <choice block> + "endchoice" + +This defines a choice group and accepts any of the above attributes as +options. A choice can only be of type bool or tristate, while a boolean +choice only allows a single config entry to be selected, a tristate +choice also allows any number of config entries to be set to 'm'. This +can be used if multiple drivers for a single hardware exists and only a +single driver can be compiled/loaded into the kernel, but all drivers +can be compiled as modules. +A choice accepts another option "optional", which allows to set the +choice to 'n' and no entry needs to be selected. +If no [symbol] is associated with a choice, then you can not have multiple +definitions of that choice. If a [symbol] is associated to the choice, +then you may define the same choice (ie. with the same entries) in another +place. + +comment: + + "comment" <prompt> + <comment options> + +This defines a comment which is displayed to the user during the +configuration process and is also echoed to the output files. The only +possible options are dependencies. + +menu: + + "menu" <prompt> + <menu options> + <menu block> + "endmenu" + +This defines a menu block, see "Menu structure" above for more +information. The only possible options are dependencies and "visible" +attributes. + +if: + + "if" <expr> + <if block> + "endif" + +This defines an if block. The dependency expression <expr> is appended +to all enclosed menu entries. + +source: + + "source" <prompt> + +This reads the specified configuration file. This file is always parsed. + +mainmenu: + + "mainmenu" <prompt> + +This sets the config program's title bar if the config program chooses +to use it. It should be placed at the top of the configuration, before any +other statement. + + +Kconfig hints +------------- +This is a collection of Kconfig tips, most of which aren't obvious at +first glance and most of which have become idioms in several Kconfig +files. + +Adding common features and make the usage configurable +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +It is a common idiom to implement a feature/functionality that are +relevant for some architectures but not all. +The recommended way to do so is to use a config variable named HAVE_* +that is defined in a common Kconfig file and selected by the relevant +architectures. +An example is the generic IOMAP functionality. + +We would in lib/Kconfig see: + +# Generic IOMAP is used to ... +config HAVE_GENERIC_IOMAP + +config GENERIC_IOMAP + depends on HAVE_GENERIC_IOMAP && FOO + +And in lib/Makefile we would see: +obj-$(CONFIG_GENERIC_IOMAP) += iomap.o + +For each architecture using the generic IOMAP functionality we would see: + +config X86 + select ... + select HAVE_GENERIC_IOMAP + select ... + +Note: we use the existing config option and avoid creating a new +config variable to select HAVE_GENERIC_IOMAP. + +Note: the use of the internal config variable HAVE_GENERIC_IOMAP, it is +introduced to overcome the limitation of select which will force a +config option to 'y' no matter the dependencies. +The dependencies are moved to the symbol GENERIC_IOMAP and we avoid the +situation where select forces a symbol equals to 'y'. + +Build as module only +~~~~~~~~~~~~~~~~~~~~ +To restrict a component build to module-only, qualify its config symbol +with "depends on m". E.g.: + +config FOO + depends on BAR && m + +limits FOO to module (=m) or disabled (=n).
docs/misc/kconfig.txt new file +237 -0
237 lines not on this page · raw message
xen/include/linux/kconfig.h new file +54 -0
54 lines not on this page · raw message
xen/scripts/Makefile.host new file +128 -0
128 lines not on this page · raw message
xen/scripts/kconfig/.gitignore new file +22 -0
@@ -0,0 +1,22 @@ +# +# Generated files +# +config* +*.lex.c +*.tab.c +*.tab.h +zconf.hash.c +*.moc +gconf.glade.h +*.pot +*.mo + +# +# configuration programs +# +conf +mconf +nconf +qconf +gconf +kxgettext
xen/scripts/kconfig/Makefile.linux new file +317 -0
317 lines not on this page · raw message
xen/scripts/kconfig/POTFILES.in new file +12 -0
@@ -0,0 +1,12 @@ +scripts/kconfig/lxdialog/checklist.c +scripts/kconfig/lxdialog/inputbox.c +scripts/kconfig/lxdialog/menubox.c +scripts/kconfig/lxdialog/textbox.c +scripts/kconfig/lxdialog/util.c +scripts/kconfig/lxdialog/yesno.c +scripts/kconfig/mconf.c +scripts/kconfig/conf.c +scripts/kconfig/confdata.c +scripts/kconfig/gconf.c +scripts/kconfig/gconf.glade.h +scripts/kconfig/qconf.cc
xen/scripts/kconfig/check.sh new file +13 -0
@@ -0,0 +1,13 @@ +#!/bin/sh +# Needed for systems without gettext +$* -x c -o /dev/null - > /dev/null 2>&1 << EOF +#include <libintl.h> +int main() +{ + gettext(""); + return 0; +} +EOF +if [ ! "$?" -eq "0" ]; then + echo -DKBUILD_NO_NLS; +fi
xen/scripts/kconfig/conf.c new file +722 -0
722 lines not on this page · raw message
xen/scripts/kconfig/confdata.c new file +1248 -0
1,100 lines not on this page · raw message
xen/scripts/kconfig/expr.c new file +1206 -0
1,206 lines not on this page · raw message
xen/scripts/kconfig/expr.h new file +238 -0
238 lines not on this page · raw message
xen/scripts/kconfig/gconf.c new file +1521 -0
1,521 lines not on this page · raw message
xen/scripts/kconfig/gconf.glade new file +661 -0
661 lines not on this page · raw message
xen/scripts/kconfig/images.c new file +326 -0
326 lines not on this page · raw message
xen/scripts/kconfig/kxgettext.c new file +235 -0
235 lines not on this page · raw message
xen/scripts/kconfig/list.h new file +131 -0
131 lines not on this page · raw message
xen/scripts/kconfig/lkc.h new file +186 -0
186 lines not on this page · raw message
xen/scripts/kconfig/lkc_proto.h new file +52 -0
52 lines not on this page · raw message
xen/scripts/kconfig/lxdialog/.gitignore new file +4 -0
Lines of this file are not shown. View the raw message.
xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING new file +4 -0
Lines of this file are not shown. View the raw message.
xen/scripts/kconfig/lxdialog/check-lxdialog.sh new file +91 -0
91 lines not on this page · raw message
xen/scripts/kconfig/lxdialog/checklist.c new file +332 -0
332 lines not on this page · raw message
xen/scripts/kconfig/lxdialog/dialog.h new file +257 -0
257 lines not on this page · raw message
xen/scripts/kconfig/lxdialog/inputbox.c new file +301 -0
301 lines not on this page · raw message
xen/scripts/kconfig/lxdialog/menubox.c new file +437 -0
437 lines not on this page · raw message
xen/scripts/kconfig/lxdialog/textbox.c new file +408 -0
408 lines not on this page · raw message
xen/scripts/kconfig/lxdialog/util.c new file +713 -0
713 lines not on this page · raw message
xen/scripts/kconfig/lxdialog/yesno.c new file +114 -0
114 lines not on this page · raw message
xen/scripts/kconfig/mconf.c new file +1047 -0
1,047 lines not on this page · raw message
xen/scripts/kconfig/menu.c new file +697 -0
697 lines not on this page · raw message
xen/scripts/kconfig/merge_config.sh new file +158 -0
158 lines not on this page · raw message
xen/scripts/kconfig/nconf.c new file +1561 -0
1,561 lines not on this page · raw message
xen/scripts/kconfig/nconf.gui.c new file +656 -0
656 lines not on this page · raw message
xen/scripts/kconfig/nconf.h new file +96 -0
96 lines not on this page · raw message
xen/scripts/kconfig/qconf.cc new file +1798 -0
1,798 lines not on this page · raw message
xen/scripts/kconfig/qconf.h new file +338 -0
338 lines not on this page · raw message
xen/scripts/kconfig/streamline_config.pl new file +647 -0
647 lines not on this page · raw message
xen/scripts/kconfig/symbol.c new file +1377 -0
1,377 lines not on this page · raw message
xen/scripts/kconfig/util.c new file +147 -0
147 lines not on this page · raw message
xen/scripts/kconfig/zconf.gperf new file +48 -0
48 lines not on this page · raw message
xen/scripts/kconfig/zconf.hash.c_shipped new file +289 -0
289 lines not on this page · raw message
xen/scripts/kconfig/zconf.l new file +372 -0
372 lines not on this page · raw message
xen/scripts/kconfig/zconf.lex.c_shipped new file +2476 -0
2,476 lines not on this page · raw message
xen/scripts/kconfig/zconf.tab.c_shipped new file +2580 -0
2,580 lines not on this page · raw message
xen/scripts/kconfig/zconf.y new file +742 -0
742 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.4.10
Part of the diff is not shown here. View the raw message.
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
xen/include/linux/kconfig.h line 2
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/include/linux/kconfig.h new file +2
-0@@ -0,0 +1,54 @@ +#ifndef __LINUX_KCONFIG_H +#define __LINUX_KCONFIG_H
Neither placement in the source tree nor guard variable should say "Linux".
xen/scripts/Makefile.host
Quoted 3 lines
xen/scripts/Makefile.host new file +0
-0@@ -0,0 +1,128 @@
We already have ways to build host programs. Do we really need a second mechanism, the more an abstract one? I'd prefer a more minimalistic approach (confined to the xen/scripts/kconfig/ subtree, which imo actually should be xen/tools/kconfig/). In any even I'd expect, for everything outside of the actual kconfig/ subtree, a few words in the commit message towards the rationale for including those pieces. That'll help future cleanup by clarifying what certain pieces are actually needed for.
xen/scripts/kconfig/.gitignore
Quoted 3 lines
xen/scripts/kconfig/.gitignore new file +0
-0@@ -0,0 +1,22 @@
Does the top level one (perhaps suitably adjusted) not fit the needs?
xen/scripts/kconfig/Makefile.linux
Quoted 3 lines
xen/scripts/kconfig/Makefile.linux new file +0
-0@@ -0,0 +1,317 @@
This doesn't seem to be referenced anywhere.
xen/scripts/kconfig/POTFILES.in
Quoted 3 lines
xen/scripts/kconfig/POTFILES.in new file +0
-0@@ -0,0 +1,12 @@
Do we really need this?
Quoted 34 lines
xen/scripts/kconfig/POTFILES.in new file +34
-0+void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken) +{ + if (!e) { + fn(data, NULL, "y"); + return; + } + + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, NULL, "("); + switch (e->type) { + case E_SYMBOL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, "<choice>"); + break; + case E_NOT: + fn(data, NULL, "!"); + expr_print(e->left.expr, fn, data, E_NOT); + break; + case E_EQUAL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, "<choice>"); + fn(data, NULL, "="); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_LEQ: + case E_LTH: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, "<choice>");
xen/scripts/kconfig/POTFILES.in
Quoted 10 lines
xen/scripts/kconfig/POTFILES.in new file +10
-0+ fn(data, NULL, e->type == E_LEQ ? "<=" : "<"); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_GEQ: + case E_GTH: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, "<choice>"); + fn(data, NULL, e->type == E_LEQ ? ">=" : ">");
Please eliminate the copy-and-paste mistake here right away (see Linux commit f6aad2615c).
xen/scripts/kconfig/gconf.c
Quoted 3 lines
xen/scripts/kconfig/gconf.c new file +0
-0@@ -0,0 +1,1521 @@
I think I had asked before, and with us not wanting any user visible prompts for now I wonder even more: Do we really need [gmnq]conf? All I think we really need is conf.
Jan
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 9 lines · Jan Beulich
xen/include/linux/kconfig.h line 2
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/include/linux/kconfig.h new file +2
-0@@ -0,0 +1,54 @@ +#ifndef __LINUX_KCONFIG_H +#define __LINUX_KCONFIG_HNeither placement in the source tree nor guard variable should say "Linux".
This file gets removed later in the series. I meant to squash that into this patch.
Quoted 13 lines
xen/scripts/Makefile.host
Quoted 4 lines
xen/scripts/Makefile.host new file +0
-0@@ -0,0 +1,128 @@We already have ways to build host programs. Do we really need a second mechanism, the more an abstract one? I'd prefer a more minimalistic approach (confined to the xen/scripts/kconfig/ subtree, which imo actually should be xen/tools/kconfig/). In any even I'd expect, for everything outside of the actual kconfig/ subtree, a few words in the commit message towards the rationale for including those pieces. That'll help future cleanup by clarifying what certain pieces are actually needed for.
I can move it into xen/scripts/kconfig. The Xen make rules to build host programs leave things to be desired and its actually necessary to use these to build the different config variants. Earlier in the review process (or really the RFC) I suggested bringing those parts of Kbuild into Xen, which would have the effect of providing the ability to build all the necessary pieces but I was told not to. So I'll just move this file into xen/scripts/kconfig.
I can also move everything to xen/tools/kconfig.
Quoted 6 lines
xen/scripts/kconfig/.gitignore
Quoted 4 lines
xen/scripts/kconfig/.gitignore new file +0
-0@@ -0,0 +1,22 @@Does the top level one (perhaps suitably adjusted) not fit the needs?
The whole point here was to bring in the kconfig bits from Linux 4.2 untouched for traceability for where the code came from. By doing it this way it allows Xen to rebase kconfig support to a newer version much easier since its all self-contained.
Quoted 6 lines
xen/scripts/kconfig/Makefile.linux
Quoted 4 lines
xen/scripts/kconfig/Makefile.linux new file +0
-0@@ -0,0 +1,317 @@This doesn't seem to be referenced anywhere.
Its the central file for building kconfig. Its refereinced in xen/scripts/kconfig/Makefile on line 63. This is the only file I've renamed from its original name in the Linux source tree.
Quoted 6 lines
xen/scripts/kconfig/POTFILES.in
Quoted 4 lines
xen/scripts/kconfig/POTFILES.in new file +0
-0@@ -0,0 +1,12 @@Do we really need this?
If we don't expect to provide localization of kconfig, then no. Granted I didn't wire up the other localization bits.
Quoted 40 lines
Quoted 40 lines
xen/scripts/kconfig/POTFILES.in new file +39
-0+void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken) +{ + if (!e) { + fn(data, NULL, "y"); + return; + } + + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, NULL, "("); + switch (e->type) { + case E_SYMBOL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, "<choice>"); + break; + case E_NOT: + fn(data, NULL, "!"); + expr_print(e->left.expr, fn, data, E_NOT); + break; + case E_EQUAL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, "<choice>"); + fn(data, NULL, "="); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_LEQ: + case E_LTH: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, "<choice>"); + fn(data, NULL, e->type == E_LEQ ? "<=" : "<"); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_GEQ: + case E_GTH:
Quoted 8 lines
xen/scripts/kconfig/POTFILES.in
Quoted 5 lines
xen/scripts/kconfig/POTFILES.in new file +5
-0+ if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, "<choice>"); + fn(data, NULL, e->type == E_LEQ ? ">=" : ">");Please eliminate the copy-and-paste mistake here right away (see Linux commit
f6aad2615c).
In an effort to keep the history clean at 4.2, I'll pull this in as an additional patch to the series.
Quoted 11 lines
xen/scripts/kconfig/gconf.c
Quoted 4 lines
xen/scripts/kconfig/gconf.c new file +0
-0@@ -0,0 +1,1521 @@I think I had asked before, and with us not wanting any user visible prompts for now I wonder even more: Do we really need [gmnq]conf? All I think we really need is conf.
Jan
Well as you (and others) have commented about the fact that KEXEC and the ARM UARTs should be user configurable which is why I included those. So I'll continue to leave those in ok?
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Doug Goldstein writes ("Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2"):
Quoted 4 lines
The whole point here was to bring in the kconfig bits from Linux 4.2 untouched for traceability for where the code came from. By doing it this way it allows Xen to rebase kconfig support to a newer version much easier since its all self-contained.
I think this is a very good point.
I would go further than this, and wholesale import the relevant files into a subdirectory in a single commit that contains nothing else, and mention the specific git commit id and version number in the Linux tree in the commit message.
Something like
Import scripts/kconfig from Linux 4.2.0 commit id abcdefgh into our own xen/scripts/kconfig. So far, these are unused - they will be wired into our own build system shortly.
Ian.
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 16:42, <[email protected]> wrote:
Doug Goldstein writes ("Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2"):
Quoted 4 lines
The whole point here was to bring in the kconfig bits from Linux 4.2 untouched for traceability for where the code came from. By doing it this way it allows Xen to rebase kconfig support to a newer version much easier since its all self-contained.
Quoted 6 lines
I think this is a very good point.
I would go further than this, and wholesale import the relevant files into a subdirectory in a single commit that contains nothing else, and mention the specific git commit id and version number in the Linux tree in the commit message.
But what's the point of importing things we're not going to use? Imo such an import should be limited to those files that (later on) would actually get wired up. Hence the request to do a minimalistic import for this first round.
Jan
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Jan Beulich writes ("Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2"):
Quoted 7 lines · On 30.11.15 at 16:42, <[email protected]> wrote:
Quoted 4 lines
I would go further than this, and wholesale import the relevant files into a subdirectory in a single commit that contains nothing else, and mention the specific git commit id and version number in the Linux tree in the commit message.
But what's the point of importing things we're not going to use?
I thought I had explained that.
A future re-import or merge will be much simpler if this import is a simple wholesale copy of a directory or two or a simple glob pattern.
The runes used to do the import could be in the commit message for easy reproduction.
Quoted 3 lines
Imo such an import should be limited to those files that (later on) would actually get wired up. Hence the request to do a minimalistic import for this first round.
This would involve a series of piece-by-piece imports. Any future merge or re-import would involve retracing and re-executing those steps.
It appears that we do disagree. Perhaps the basic thing is: I don't think we want to fork this code. We want to be a downstream of Linux for it. If necessary we may edit, to an extent, the parts we import, but hopefully we'll keep that to a minimum.
Ian.
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 4 lines · Ian Jackson
It appears that we do disagree. Perhaps the basic thing is: I don't think we want to fork this code. We want to be a downstream of Linux for it. If necessary we may edit, to an extent, the parts we import, but hopefully we'll keep that to a minimum.
I agree with this.
I think I previously objected to suggesting to rename the data files Xconfig instead of Kconfiug on this basis for example.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
In reply to Ian JacksonQuoted 23 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:16, <[email protected]> wrote:
Jan Beulich writes ("Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2"):
Quoted 7 lines · On 30.11.15 at 16:42, <[email protected]> wrote:
Quoted 4 lines
I would go further than this, and wholesale import the relevant files into a subdirectory in a single commit that contains nothing else, and mention the specific git commit id and version number in the Linux tree in the commit message.
But what's the point of importing things we're not going to use?
I thought I had explained that.
A future re-import or merge will be much simpler if this import is a simple wholesale copy of a directory or two or a simple glob pattern.
The runes used to do the import could be in the commit message for easy reproduction.
Quoted 3 lines
Imo such an import should be limited to those files that (later on) would actually get wired up. Hence the request to do a minimalistic import for this first round.
Quoted 8 lines
This would involve a series of piece-by-piece imports. Any future merge or re-import would involve retracing and re-executing those steps.
It appears that we do disagree. Perhaps the basic thing is: I don't think we want to fork this code. We want to be a downstream of Linux for it. If necessary we may edit, to an extent, the parts we import, but hopefully we'll keep that to a minimum.
But not forking doesn't mean importing the whole directory. Some Makefile adjustments will be necessary anyway, so removing some of the frontends wouldn't make things worse. We indeed should avoid editing files we import, but I don't see any bad in skipping some of the files.
Reasons I'd like to avoid importing everything:
- no introduction of new build dependencies (one of the frontends being written in C++ is the mildest form, requiring HOSTCXX to be set),
- limiting the amount of new code that needs maintaining (no matter how simple a re-import, it still is work, and hence the less frequently we need to do this, the better; I assume you agree that the likelihood for changes that we want/need to pull in grows with the size of the code, and with what I propose the import size would shrink by almost 50%), unless you or Doug volunteer to look after this code on a regular basis,
- avoiding code (scripts) that seem completely pointless in our environment (e.g. streamline_config.pl).
Jan
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 5 lines · Jan Beulich
But not forking doesn't mean importing the whole directory. Some
Makefileadjustments will be necessary anyway, so removing some of the frontends wouldn't make things worse. We indeed should avoid editing files we import, but I don't see any bad in skipping some of the files.
It is much easier to resync based on entire directories (my preference, if possible) than to fiddle around picking up individual files, deciding if a "new" file is actually new or just excluded last time for some reason etc.
Quoted 4 lines
Reasons I'd like to avoid importing everything:
- no introduction of new build dependencies (one of the frontends being written in C++ is the mildest form, requiring HOSTCXX to be set),
Only if someone wants to use it. I see no harm in having such a frontend optionally available to those who are willing to meet its prerequisites in their build environment, that certainly doesn't mean it has to work for everyone nor that we should add a C++ compiler and QT environment to the standard set of Xen build deps.
I believe this is the policy in the Linux tree too.
Quoted 7 lines
- limiting the amount of new code that needs maintaining (no matter how simple a re-import, it still is work, and hence the less frequently we need to do this, the better; I assume you agree that the likelihood for changes that we want/need to pull in grows with the size of the code, and with what I propose the import size would shrink by almost 50%), unless you or Doug volunteer to look after this code on a regular basis,
I disagree with the (implied) conclusion here that you would somehow be personally on the hook for these regular updates if we would import only 50% of this kconfig code base, nor that there would therefore be some sort of additional personal burden on you if we take the whole thing. We should be arranging that the maintenance burden is ~0 by rejecting diversion and making the reimport process as brain-dead as possible.
Nonetheless if you don't want this to formally come under the remit of "THE REST" then I'd happy to see an entry for xen/tools/kconfig in the MAINTAINERS listing whoever wants to step up (Doug, Ian and/or myself).
But I honestly don't think this code is going to require much maintenance at all on our end, apart from the very occasional reimporting of the whole thing from Linux when we notice some major missing feature we care about, which is the case that Ian and I are arguing we should optimise for.
And having put aside suggestions such as renaming Kconfig to Xconfig throughout I also don't foresee making very many large changes to this code base at all, there's simply no reason to do so, at least none which can't be pushed back on. At worst I would expect to see generic Kconfig feature requests which should redirected upstream and the results reimported.
I think this is all backed up by the fact that after this initial import the remainder of this series consists of:
$ git fetch https://github.com/cardoe/xen kconfig_v6 From https://github.com/cardoe/xen * branch kconfig_v6 -> FETCH_HEAD $ git diff --stat a28f2c4~1 FETCH_HEAD -- xen/scripts/kconfig xen/scripts/kconfig/.gitignore | 3 +++ xen/scripts/kconfig/Makefile | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+)
(The first of which seems like it ought to be fixed upstream instead and it might even be possible to avoid the latter and therefore avoid the consequential renaming of the upstream Makefile => Makefile.linux by using xen/scripts/Makefile.kconfig somehow).
Quoted 2 lines
- avoiding code (scripts) that seem completely pointless in our environment (e.g. streamline_config.pl).
I think the overhead of a few extra files of marginal usefulness is far outweighed by being able to just resync a whole directory.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 65 lines · Ian Campbell
Quoted 5 lines · Jan Beulich
But not forking doesn't mean importing the whole directory. Some
Makefileadjustments will be necessary anyway, so removing some of the frontends wouldn't make things worse. We indeed should avoid editing files we import, but I don't see any bad in skipping some of the files.It is much easier to resync based on entire directories (my preference, if possible) than to fiddle around picking up individual files, deciding if a "new" file is actually new or just excluded last time for some reason etc.
Quoted 4 lines
Reasons I'd like to avoid importing everything:
- no introduction of new build dependencies (one of the frontends being written in C++ is the mildest form, requiring HOSTCXX to be set),Only if someone wants to use it. I see no harm in having such a frontend optionally available to those who are willing to meet its prerequisites in their build environment, that certainly doesn't mean it has to work for everyone nor that we should add a C++ compiler and QT environment to the standard set of Xen build deps.
I believe this is the policy in the Linux tree too.
Quoted 7 lines
- limiting the amount of new code that needs maintaining (no matter how simple a re-import, it still is work, and hence the less frequently we need to do this, the better; I assume you agree that the likelihood for changes that we want/need to pull in grows with the size of the code, and with what I propose the import size would shrink by almost 50%), unless you or Doug volunteer to look after this code on a regular basis,
I disagree with the (implied) conclusion here that you would somehow be personally on the hook for these regular updates if we would import only 50% of this kconfig code base, nor that there would therefore be some sort of additional personal burden on you if we take the whole thing. We should be arranging that the maintenance burden is ~0 by rejecting diversion and making the reimport process as brain-dead as possible.
Nonetheless if you don't want this to formally come under the remit of "THE REST" then I'd happy to see an entry for xen/tools/kconfig in the
MAINTAINERSlisting whoever wants to step up (Doug, Ian and/or myself).But I honestly don't think this code is going to require much maintenance at all on our end, apart from the very occasional reimporting of the whole thing from Linux when we notice some major missing feature we care about, which is the case that Ian and I are arguing we should optimise for.
And having put aside suggestions such as renaming
Kconfigto Xconfig throughout I also don't foresee making very many large changes to this code base at all, there's simply no reason to do so, at least none which can't be pushed back on. At worst I would expect to see genericKconfigfeature requests which should redirected upstream and the results reimported.I think this is all backed up by the fact that after this initial import the remainder of this series consists of:
$ git fetch https://github.com/cardoe/xen kconfig_v6 From https://github.com/cardoe/xen * branch kconfig_v6 -> FETCH_HEAD $ git diff --stat a28f2c4~1 FETCH_HEAD -- xen/scripts/kconfig xen/scripts/kconfig/.gitignore | 3 +++ xen/scripts/kconfig/Makefile | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+)
Quoted 4 lines
(The first of which seems like it ought to be fixed upstream instead and it might even be possible to avoid the latter and therefore avoid the consequential renaming of the upstream
Makefile=> Makefile.linux by using xen/scripts/Makefile.kconfig somehow).
I've done the Makefile -> Makefile.kconfig you suggested. As far as the .gitignore goes the Linux kernel ignores ALL .* files and explicitly un-ignores dot-files they want to keep. So not sure if they would accept a change upstream.
Quoted 9 lines
Quoted 3 lines
- avoiding code (scripts) that seem completely pointless in our environment (e.g. streamline_config.pl).
I think the overhead of a few extra files of marginal usefulness is far outweighed by being able to just resync a whole directory.
Ian.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
In reply to Doug GoldsteinQuoted 9 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 16:34, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
xen/scripts/kconfig/Makefile.linux
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/scripts/kconfig/Makefile.linux new file +0
-0@@ -0,0 +1,317 @@This doesn't seem to be referenced anywhere.
Quoted 3 lines
Its the central file for building kconfig. Its refereinced in xen/scripts/kconfig/Makefile on line 63. This is the only file I've renamed from its original name in the Linux source tree.
In a later patch I think?
Quoted 11 lines
Quoted 7 lines
xen/scripts/kconfig/gconf.c
Quoted 3 lines
xen/scripts/kconfig/gconf.c new file +0
-0@@ -0,0 +1,1521 @@I think I had asked before, and with us not wanting any user visible prompts for now I wonder even more: Do we really need [gmnq]conf? All I think we really need is conf.
Well as you (and others) have commented about the fact that KEXEC and the ARM UARTs should be user configurable which is why I included those. So I'll continue to leave those in ok?
Afaic I'd prefer a minimal import as a first step. Adding further frontends - if really needed - could be done later.
Jan
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 16:34, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
xen/scripts/kconfig/Makefile.linux
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/scripts/kconfig/Makefile.linux new file +0
-0@@ -0,0 +1,317 @@This doesn't seem to be referenced anywhere.
Quoted 5 lines
Quoted 3 lines
Its the central file for building kconfig. Its refereinced in xen/scripts/kconfig/Makefile on line 63. This is the only file I've renamed from its original name in the Linux source tree.
In a later patch I think?
Yes. This whole patch is just bringing in files from Linux 4.2.0 unmodified. I plan on modifying the commit message like Ian Jackson suggested.
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
xen/scripts/kconfig/gconf.c
Quoted 4 lines
xen/scripts/kconfig/gconf.c new file +0
-0@@ -0,0 +1,1521 @@I think I had asked before, and with us not wanting any user visible prompts for now I wonder even more: Do we really need [gmnq]conf? All I think we really need is conf.
Quoted 9 lines
Quoted 3 lines
Well as you (and others) have commented about the fact that KEXEC and the ARM UARTs should be user configurable which is why I included those. So I'll continue to leave those in ok?
Afaic I'd prefer a minimal import as a first step. Adding further frontends - if really needed - could be done later.
Jan
So you want me to break this patch up to bring in the frontends individually? Since there is a request to have KEXEC and the UARTs configurable by the user I would bring in all these frontends.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Doug Goldstein writes ("Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2"):
Quoted 8 lines · Jan Beulich
Quoted 3 lines · On 30.11.15 at 16:34, <[email protected]> wrote:
Afaic I'd prefer a minimal import as a first step. Adding further frontends - if really needed - could be done later.
So you want me to break this patch up to bring in the frontends individually? Since there is a request to have KEXEC and the UARTs configurable by the user I would bring in all these frontends.
I may be disagreeing with Jan here, but I think the import should have the simplest glob pattern or filename rules (consistent with not importing vastly too mkuch), rather than necessarily the smallest set of files.
We want to be able to do future imports with a minimum of fuss.
Ian.
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 10 lines · Ian Jackson
Doug Goldstein writes ("Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2"):
Quoted 8 lines · Jan Beulich
Quoted 3 lines · On 30.11.15 at 16:34, <[email protected]> wrote:
Afaic I'd prefer a minimal import as a first step. Adding further frontends - if really needed - could be done later.
So you want me to break this patch up to bring in the frontends individually? Since there is a request to have KEXEC and the UARTs configurable by the user I would bring in all these frontends.
Quoted 9 lines
I may be disagreeing with Jan here, but I think the import should have the simplest glob pattern or filename rules (consistent with not importing vastly too mkuch), rather than necessarily the smallest set of files.
We want to be able to do future imports with a minimum of fuss.
Ian.
Ok. So do the minimum of kconfig in the first patch. Then import kconfig frontends in another patch? Later if you want to update any parts of kconfig they would need to be updated together (e.g. frontends and the kconfig build bits). I can do that.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
In reply to Doug GoldsteinQuoted 2 lines · Doug Goldstein
Since there is a request to have KEXEC and the UARTs configurable by the user
Who asked for this?
I have quite a strong preference for not adding _any_ new[*] user configurable options in this first pass, since I think those need to be considered quite carefully whereas this first series should be largely about the mechanics of introducing Kconfig files.
Ian.
[*] i.e. anything which is not already controllable by the current .config driven thing.
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 11 lines · Ian Campbell
Quoted 2 lines · Doug Goldstein
Since there is a request to have KEXEC and the UARTs configurable by the user
Who asked for this?
I have quite a strong preference for not adding _any_ new[*] user configurable options in this first pass, since I think those need to be considered quite carefully whereas this first series should be largely about the mechanics of introducing
Kconfigfiles.
Quoted 5 lines
Ian.
[*] i.e. anything which is not already controllable by the current .config driven thing.
The ARM UARTs are the take away I had from conversations with Julien Grall and reading past comments on the ML how people can change the ARM UARTs. Obviously if that's not desired I can drop that. I originally had them enabled as they are in config/arm{32,64}.mk and changed them to be user configurable later in the series.
As far as KEXEC goes, its a user configurable option now in Rules.mk. You can build "make kexec=n" and it will disable it. I chose that one as an original example in v1 of how a user configurable option would look in this scheme.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 25 lines
Quoted 1 line
Quoted 1 line · On 01.12.15 at 21:04, <[email protected]> wrote:
Quoted 11 lines · Ian Campbell
Quoted 2 lines · Doug Goldstein
Since there is a request to have KEXEC and the UARTs configurable by the user
Who asked for this?
I have quite a strong preference for not adding _any_ new[*] user configurable options in this first pass, since I think those need to be considered quite carefully whereas this first series should be largely about the mechanics of introducing
Kconfigfiles.Quoted 5 lines
Ian.
[*] i.e. anything which is not already controllable by the current .config driven thing.
The ARM UARTs are the take away I had from conversations with Julien Grall and reading past comments on the ML how people can change the ARM UARTs. Obviously if that's not desired I can drop that. I originally had them enabled as they are in
config/arm{32,64}.mkand changed them to be user configurable later in the series.
Quoted 4 lines
As far as KEXEC goes, its a user configurable option now in Rules.mk. You can build "make kexec=n" and it will disable it. I chose that one as an original example in v1 of how a user configurable option would look in this scheme.
And note how Ian said "_any_ new".
In fact as a follow-up we should convert other command line driven overrides to config options (debug, perfc, bigmem, shadow) imo.
Jan
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 30 lines · Jan Beulich
Quoted 25 lines
Quoted 1 line
Quoted 1 line · On 01.12.15 at 21:04, <[email protected]> wrote:
Quoted 11 lines · Ian Campbell
Quoted 2 lines · Doug Goldstein
Since there is a request to have KEXEC and the UARTs configurable by the user
Who asked for this?
I have quite a strong preference for not adding _any_ new[*] user configurable options in this first pass, since I think those need to be considered quite carefully whereas this first series should be largely about the mechanics of introducing
Kconfigfiles.Quoted 5 lines
Ian.
[*] i.e. anything which is not already controllable by the current .config driven thing.
The ARM UARTs are the take away I had from conversations with Julien Grall and reading past comments on the ML how people can change the ARM UARTs. Obviously if that's not desired I can drop that. I originally had them enabled as they are in
config/arm{32,64}.mkand changed them to be user configurable later in the series.Quoted 4 lines
As far as KEXEC goes, its a user configurable option now in Rules.mk. You can build "make kexec=n" and it will disable it. I chose that one as an original example in v1 of how a user configurable option would look in this scheme.
Quoted 7 lines
And note how Ian said "_any_ new".
In fact as a follow-up we should convert other command line driven overrides to config options (debug, perfc, bigmem, shadow) imo.
Jan
I've got that series queued up locally with plans to rebase it and post it once the initial series lands. I'll pull the KEXEC one into that series and drop it from the original.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
In reply to Doug GoldsteinQuoted 14 lines · Doug Goldstein
Quoted 13 lines · Ian Campbell
Quoted 2 lines · Doug Goldstein
Since there is a request to have KEXEC and the UARTs configurable by the user
Who asked for this?
I have quite a strong preference for not adding _any_ new[*] user configurable options in this first pass, since I think those need to be considered quite carefully whereas this first series should be largely about the mechanics of introducing
Kconfigfiles.Ian.
Quoted 7 lines
Quoted 4 lines
[*] i.e. anything which is not already controllable by the current .config
driven thing.The ARM UARTs are the take away I had from conversations with Julien Grall
AIUI all Julien was asking for was that the same set of UARTs should be enabled for arm32 or arm64 both before and after this series, not that they should be user configurable (in this first pass at least).
TBH I think this series is getting bogged down in trying to do much all at the same time, switching to Kconfig, making things newly user-selectable, arranging for out of tree builds, some of which are either (potentially) controversial or simply result in apparently unnecessary changes if the reviewer is only expecting a subset of those changes (especially those only expecting the first), leading to a few RTTs of back and forth with reviewers.
I would encourage you to par this first series back to the simplest possible "switch to Kconfig, retaining the exact same set of user facing options as today" and avoid feature creep from people requesting new and exciting things which the switch to Kconfig makes possible.
That way we can make progress on a mostly mechanical switch to Kconfig without continuously getting side tracked on questions like whether this or that should be user selectable or not.
All of the "feature-creep" (which I don't mean in the pejorative sense) things can easily be done in a follow up series.
Quoted 9 lines
and reading past comments on the ML how people can change the ARM
UARTs. Obviously if that's not desired I can drop that. I originally had them enabled as they are inconfig/arm{32,64}.mkand changed them to be user configurable later in the series.As far as KEXEC goes, its a user configurable option now in Rules.mk. You can build "make kexec=n" and it will disable it. I chose that one as an original example in v1 of how a user configurable option would look in this scheme.
I don't have a problem with converting existing user-configurable options into Kconfig in the first pass, that seems natural/justifiable enough to me, and doing it in the final patch as you have done seems sensible.
Treading very carefully around the creeping-featuritis trap (:-)), it does seem that if one of the user options from xen/Rules.mk is going to be converted then they all ought to be. Perhaps that's a topic for a followup series though.
Ian.
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
Quoted 35 lines · Ian Campbell
Quoted 14 lines · Doug Goldstein
Quoted 13 lines · Ian Campbell
Quoted 2 lines · Doug Goldstein
Since there is a request to have KEXEC and the UARTs configurable by the user
Who asked for this?
I have quite a strong preference for not adding _any_ new[*] user configurable options in this first pass, since I think those need to be considered quite carefully whereas this first series should be largely about the mechanics of introducing
Kconfigfiles.Ian.
Quoted 7 lines
Quoted 4 lines
[*] i.e. anything which is not already controllable by the current .config
driven thing.The ARM UARTs are the take away I had from conversations with Julien Grall
AIUI all Julien was asking for was that the same set of UARTs should be enabled for arm32 or arm64 both before and after this series, not that they should be user configurable (in this first pass at least).
TBH I think this series is getting bogged down in trying to do much all at the same time, switching to
Kconfig, making things newly user-selectable, arranging for out of tree builds, some of which are either (potentially) controversial or simply result in apparently unnecessary changes if the reviewer is only expecting a subset of those changes (especially those only expecting the first), leading to a few RTTs of back and forth with reviewers.
Quoted 4 lines
I would encourage you to par this first series back to the simplest possible "switch to
Kconfig, retaining the exact same set of user facing options as today" and avoid feature creep from people requesting new and exciting things which the switch toKconfigmakes possible.
That I can do. I always expected that I would have a follow on series (maybe even multiples) as I was able to tease out some of the dependencies better. e.g. converting some of include/asm-ARCH/config.h
I would also happily add myself to MAINTAINERS for the Kconfig parts and would ensure some kind of periodic sync up with Linux upstream. I'm not looking at doing this conversion as a one and done but sticking around for the long haul.
Quoted 22 lines
That way we can make progress on a mostly mechanical switch to
Kconfigwithout continuously getting side tracked on questions like whether this or that should be user selectable or not.All of the "feature-creep" (which I don't mean in the pejorative sense) things can easily be done in a follow up series.
Quoted 9 lines
and reading past comments on the ML how people can change the ARM
UARTs. Obviously if that's not desired I can drop that. I originally had them enabled as they are inconfig/arm{32,64}.mkand changed them to be user configurable later in the series.As far as KEXEC goes, its a user configurable option now in Rules.mk. You can build "make kexec=n" and it will disable it. I chose that one as an original example in v1 of how a user configurable option would look in this scheme.
I don't have a problem with converting existing user-configurable options into
Kconfigin the first pass, that seems natural/justifiable enough to me, and doing it in the final patch as you have done seems sensible.
Quoted 7 lines
Treading very carefully around the creeping-featuritis trap (:-)), it does seem that if one of the user options from
xen/Rules.mkis going to be converted then they all ought to be. Perhaps that's a topic for a followup series though.Ian.
Sure thing. I'll break that out. My plan was to convert them all. The patch that does KEXEC was actually from the original RFC/v1 series where it was just an example one and I never dropped it in later series because it was useful for testing. I've got a follow on that converts all the items in xen/Rules.mk that I have not posted to the list and I can move the KEXEC into that series.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 01/28] build: import Kbuild/Kconfig from Linux 4.2
In reply to Doug GoldsteinQuoted 4 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:00, <[email protected]> wrote:
So you want me to break this patch up to bring in the frontends individually? Since there is a request to have KEXEC and the UARTs configurable by the user I would bring in all these frontends.
No, I want them to be left out entirely. But it looks like we first need to settle on what we actually (don't) want.
Jan
PATCH v6 1/1 02/28] build: build Kconfig and config rules
In reply to Doug GoldsteinWire in the Kconfig build and makefile rules to be able to generate valid configuration files to be used by the build process but don't actually use the output for affecting the Xen build.
--- .gitignore | 8 ++++ xen/Kconfig | 26 ++++++++++++ xen/Makefile | 17 ++++++++ xen/arch/arm/Kconfig | 31 ++++++++++++++ xen/arch/arm/configs/arm32_defconfig | 1 + xen/arch/arm/configs/arm64_defconfig | 0 xen/arch/x86/Kconfig | 18 ++++++++ xen/arch/x86/configs/x86_64_defconfig | 0 xen/common/Kconfig | 4 ++ xen/drivers/Kconfig | 3 ++ xen/scripts/kconfig/.gitignore | 3 ++ xen/scripts/kconfig/Makefile | 77 +++++++++++++++++++++++++++++++++++ 12 files changed, 188 insertions(+) create mode 100644 xen/Kconfig create mode 100644 xen/arch/arm/Kconfig create mode 100644 xen/arch/arm/configs/arm32_defconfig create mode 100644 xen/arch/arm/configs/arm64_defconfig create mode 100644 xen/arch/x86/Kconfig create mode 100644 xen/arch/x86/configs/x86_64_defconfig create mode 100644 xen/common/Kconfig create mode 100644 xen/drivers/Kconfig create mode 100644 xen/scripts/kconfig/Makefile
.gitignore +8 -0
@@ -217,6 +217,11 @@ tools/xentrace/tbctl tools/xentrace/xenctx tools/xentrace/xentrace xen/.banner +xen/.config +xen/.config.old +xen/defconfig +xen/**/*.cmd +xen/**/modules.order xen/System.map xen/arch/arm/asm-offsets.s xen/arch/arm/xen.lds
@@ -239,6 +244,9 @@ xen/include/headers++.chk xen/include/asm xen/include/asm-*/asm-offsets.h xen/include/compat/* +xen/include/config.h +xen/include/config/ +xen/include/generated/ xen/include/public/public xen/include/xen/*.new xen/include/xen/acm_policy.h
xen/Kconfig new file +26 -0
@@ -0,0 +1,26 @@ +# +# For a description of the syntax of this configuration file, +# see Documentation/kbuild/kconfig-language.txt from the Linux +# kernel source tree. +# +mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" + +config SRCARCH + string + option env="SRCARCH" + +config ARCH + string + option env="ARCH" + +source "arch/$SRCARCH/Kconfig" + +config XEN_FULLVERSION + string + option env="XEN_FULLVERSION" + +config DEFCONFIG_LIST + string + option defconfig_list + default "$ARCH_DEFCONFIG" + default "arch/$SRCARCH/defconfig"
xen/Makefile +17 -0
@@ -17,6 +17,9 @@ export XEN_ROOT := $(BASEDIR)/.. EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi +# Don't break if the build process wasn't called from the top level +XEN_TARGET_ARCH ?= $(shell uname -m) + .PHONY: default default: build
@@ -88,6 +91,7 @@ _clean: delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean $(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean + $(MAKE) -f scripts/kconfig/Makefile clean rm -f include/asm *.o $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET)-syms *~ core rm -f include/asm-*/asm-offsets.h rm -f .banner
@@ -216,3 +220,16 @@ FORCE: %/: FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + +kconfig := silentoldconfig oldconfig config menuconfig defconfig \ + nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig +.PHONY: $(kconfig) +$(kconfig): + $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ + +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfig + +# Allow people to just run `make` as before and not force them to configure +$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfig
xen/arch/arm/Kconfig new file +31 -0
@@ -0,0 +1,31 @@ +# Select 32 or 64 bit +config 64BIT + bool "64-bit Xen" if ARCH = "arm64" + default ARCH != "arm32" + help + Say yes to build a 64-bit Xen + Say no to build a 32-bit Xen + +config ARM_32 + def_bool y + depends on !64BIT + +config ARM_64 + def_bool y + depends on 64BIT + +config ARM + def_bool y + +config ARCH_DEFCONFIG + string + default "arch/arm/configs/arm32_defconfig" if ARM_32 + default "arch/arm/configs/arm64_defconfig" if ARM_64 + +menu "Architecture Features" + +endmenu + +source "common/Kconfig" + +source "drivers/Kconfig"
xen/arch/arm/configs/arm32_defconfig new file +1 -0
@@ -0,0 +1 @@ +CONFIG_64BIT=n
xen/arch/arm/configs/arm64_defconfig new file +0 -0
xen/arch/x86/Kconfig new file +18 -0
@@ -0,0 +1,18 @@ +config X86_64 + def_bool y + +config X86 + def_bool y + select HAS_GDBSX + +config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig" + +menu "Architecture Features" + +endmenu + +source "common/Kconfig" + +source "drivers/Kconfig"
xen/arch/x86/configs/x86_64_defconfig new file +0 -0
xen/common/Kconfig new file +4 -0
@@ -0,0 +1,4 @@ + +menu "Common Features" + +endmenu
xen/drivers/Kconfig new file +3 -0
@@ -0,0 +1,3 @@ +menu "Device Drivers" + +endmenu
xen/scripts/kconfig/.gitignore +3 -0
@@ -11,6 +11,9 @@ gconf.glade.h *.pot *.mo +.tmp_gtkcheck +.tmp_qtcheck + # # configuration programs #
xen/scripts/kconfig/Makefile new file +77 -0
77 lines not on this page · raw message
Signature · 1 line
2.4.10
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
.gitignore tools/xentrace/tbctl · line 224
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
.gitignore +5
-0@@ -217,6 +217,11 @@ tools/xentrace/tbctl tools/xentrace/xenctx tools/xentrace/xentrace xen/.banner +xen/.config +xen/.config.old +xen/defconfig +xen/**/*.cmd +xen/**/modules.order
The last two seem rather dubious to me in our environment.
.gitignore xen/include/headers++.chk · line 247
Quoted 5 lines
.gitignore +1
-0@@ -239,6 +244,9 @@ xen/include/headers++.chk xen/include/asm xen/include/asm-*/asm-offsets.h xen/include/compat/* +xen/include/config.h
Linux doesn't seem to generate a file like this. Is this perhaps a stale entry you're copying over?
xen/Kconfig line 3
Quoted 6 lines
xen/Kconfig new file +3
-0@@ -0,0 +1,26 @@ +# +# For a description of the syntax of this configuration file, +# see Documentation/kbuild/kconfig-language.txt from the Linux
This path needs fixing.
Quoted 13 lines
xen/Kconfig new file +13
-0+# kernel source tree. +# +mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" + +config SRCARCH + string + option env="SRCARCH" + +config ARCH + string + option env="ARCH" + +source "arch/$SRCARCH/Kconfig"
xen/Kconfig line 26
Quoted 10 lines
xen/Kconfig new file +10
-0+ +config XEN_FULLVERSION + string + option env="XEN_FULLVERSION" + +config DEFCONFIG_LIST + string + option defconfig_list + default "$ARCH_DEFCONFIG" + default "arch/$SRCARCH/defconfig"
Linux'es variant has just SRCARCH and the source directive. Why do we need so much more here? In any even I again think you should at least briefly explain any extensions you do in the commit message.
xen/Makefile export XEN_ROOT := $(BASEDIR)/.. · line 21
Quoted 8 lines
xen/Makefile +2
-0@@ -17,6 +17,9 @@ export XEN_ROOT := $(BASEDIR)/.. EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi +# Don't break if the build process wasn't called from the top level +XEN_TARGET_ARCH ?= $(shell uname -m)
I don't see the need for this. We already require setting this on the command line when invoking a build process bypassing the top level directory. Later in the series, when actually using the produced xen/.config, I could see this becoming a nice enhancement (by reading the value from the file).
xen/Makefile FORCE: · line 231
Quoted 13 lines
xen/Makefile +9
-0@@ -216,3 +220,16 @@ FORCE: %/: FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + +kconfig := silentoldconfig oldconfig config menuconfig defconfig \ + nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig +.PHONY: $(kconfig) +$(kconfig): + $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ + +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfig
Okay, I have found the Linux original to this and it's the same there, but I'd like to ask anyway: How can this work without $* getting passed on?
xen/Makefile FORCE: · line 235
Quoted 3 lines
xen/Makefile +3
-0+# Allow people to just run `make` as before and not force them to configure +$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfig
Is this correct? If I have xen/.config but no xen/include/config/auto.conf.cmd I surely don't want "defconfig" to be run (unless "defconfig" honors xen/.config, in which case the goal's name would be questionable)?
Also do you really need all the explicit $(BASEDIR) references in the rules above?
xen/arch/arm/configs/arm64_defconfig
Quoted 8 lines
xen/arch/arm/configs/arm32_defconfig new file +1
-0@@ -0,0 +1 @@ +CONFIG_64BIT=nxen/arch/arm/configs/arm64_defconfig new file +0
-0
As said before I'm not really up to speed with defconfigs, but the arm64 variant being empty but the arm32 one disabling 64BIT seems backwards: You don't even have a choice on arm32.
xen/arch/x86/Kconfig line 6
Quoted 9 lines
xen/arch/x86/Kconfig new file +6
-0@@ -0,0 +1,18 @@ +config X86_64 + def_bool y + +config X86 + def_bool y + select HAS_GDBSX
Didn't you mean to convert HAS_* in subsequent patches?
Also - not 64BIT here, yet this - if added to ARM - should be added here too so it can be used in common code.
xen/arch/x86/Kconfig line 10
Quoted 3 lines
xen/arch/x86/Kconfig new file +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfig perhaps?
xen/scripts/kconfig/Makefile line 3
Quoted 6 lines
xen/scripts/kconfig/Makefile new file +3
-0@@ -0,0 +1,77 @@ +# xen/scripts/kconfig + +MAKEFLAGS += -rR
Why?
Quoted 21 lines
xen/scripts/kconfig/Makefile new file +21
-0+# default rule to do nothing +all: + +XEN_ROOT = $(CURDIR)/.. + +# Xen doesn't have a silent build flag +quiet := silent_ +Q := @ +kecho := : + +# eventually you'll want to do out of tree builds +srctree = $(XEN_ROOT)/xen +objtree = $(srctree) +src := scripts/kconfig +obj := $(src) +KBUILD_SRC := + +# handle functions (most of these lifted from different Linux makefiles +dot-target = $(dir $@).$(notdir $@) +depfile = $(subst $(comma),,$(dot-target).d) +basetarget = $(basename $(notdir $@))
xen/scripts/kconfig/Makefile line 35
Quoted 10 lines
xen/scripts/kconfig/Makefile new file +10
-0+cmd = $(cmd_$(1)) +if_changed = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + ) + +if_changed_dep = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + )
Considering how much you stripped these fro their Linux original, why did you leave the always true $(if ...) in here, and why did you not consolidate things only single lines (helping readability).
xen/scripts/kconfig/Makefile line 41
Quoted 5 lines
xen/scripts/kconfig/Makefile new file +5
-0+define multi_depend +$(foreach m, $(notdir $1), \ + $(eval $(obj)/$m: \ + $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) +endef
Do you really need this?
xen/scripts/kconfig/Makefile line 51
Quoted 9 lines
xen/scripts/kconfig/Makefile new file +9
-0+# Set our default defconfig file +KBUILD_DEFCONFIG := $(ARCH)_defconfig + +# provide our shell +CONFIG_SHELL := $(SHELL) + +# provide the host compiler +HOSTCC := gcc +HOSTCXX := g++
Why is the C setting from ./Config.mk not good enough (the C++ one should then be added there if indeed needed, which I doubt)?
Jan
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 53 lines · Jan Beulich
.gitignore tools/xentrace/tbctl · line 224
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
.gitignore +5
-0@@ -217,6 +217,11 @@ tools/xentrace/tbctl tools/xentrace/xenctx tools/xentrace/xentrace xen/.banner +xen/.config +xen/.config.old +xen/defconfig +xen/**/*.cmd +xen/**/modules.orderThe last two seem rather dubious to me in our environment.
.gitignore xen/include/headers++.chk · line 247
Quoted 5 lines
.gitignore +1
-0@@ -239,6 +244,9 @@ xen/include/headers++.chk xen/include/asm xen/include/asm-*/asm-offsets.h xen/include/compat/* +xen/include/config.hLinux doesn't seem to generate a file like this. Is this perhaps a stale entry you're copying over?
xen/Kconfig line 3
Quoted 6 lines
xen/Kconfig new file +3
-0@@ -0,0 +1,26 @@ +# +# For a description of the syntax of this configuration file, +# see Documentation/kbuild/kconfig-language.txt from the LinuxThis path needs fixing.
Quoted 20 lines
xen/Kconfig new file +20
-0+# kernel source tree. +# +mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" + +config SRCARCH + string + option env="SRCARCH" + +config ARCH + string + option env="ARCH" + +source "arch/$SRCARCH/Kconfig" + +config XEN_FULLVERSION + string + option env="XEN_FULLVERSION" + +config DEFCONFIG_LIST + string
Quoted 8 lines
xen/Kconfig line 26
Quoted 3 lines
xen/Kconfig new file +3
-0+ option defconfig_list + default "$ARCH_DEFCONFIG" + default "arch/$SRCARCH/defconfig"Linux'es variant has just SRCARCH and the source directive. Why do we need so much more here? In any even I again think you should at least briefly explain any extensions you do in the commit message.
I'm not understanding the question here. Linux has 5 items in their list. The last two are identical to the 2 that I retained. Given other evolutions of the patchset I can drop the last one and keep it as just $ARCH_DEFCONFIG since I've always got that defined for arm and x86.
Quoted 7 lines
Quoted 7 lines
xen/Makefile +0
-0@@ -17,6 +17,9 @@ export XEN_ROOT := $(BASEDIR)/.. EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi
Quoted 8 lines
xen/Makefile export XEN_ROOT := $(BASEDIR)/.. · line 21
Quoted 2 lines
xen/Makefile +2
-0+# Don't break if the build process wasn't called from the top level +XEN_TARGET_ARCH ?= $(shell uname -m)I don't see the need for this. We already require setting this on the command line when invoking a build process bypassing the top level directory. Later in the series, when actually using the produced xen/.config, I could see this becoming a nice enhancement (by reading the value from the file).
One of the early on reviews told me it was not required (and I can confirm that I can run "git clean -xdf && cd xen && make" and it will build). This change makes that behavior still work.
Quoted 18 lines
Quoted 4 lines
xen/Makefile +0
-0@@ -216,3 +220,16 @@ FORCE: %/: FORCExen/Makefile FORCE: · line 231
Quoted 10 lines
xen/Makefile +9
-0$(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + +kconfig := silentoldconfig oldconfig config menuconfig defconfig \ + nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig +.PHONY: $(kconfig) +$(kconfig): + $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ + +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfigOkay, I have found the Linux original to this and it's the same there, but I'd like to ask anyway: How can this work without $* getting passed on?
silentoldconfig is the step that actually takes the .config and generates out all the files like auto.conf and generated/config.h It should be in xen/scripts/kconfig/Makefile.linux I believe.
Quoted 10 lines
xen/Makefile FORCE: · line 235
Quoted 4 lines
xen/Makefile +3
-0+# Allow people to just run `make` as before and not force them to configure +$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfigIs this correct? If I have xen/.config but no xen/include/config/auto.conf.cmd I surely don't want "defconfig" to be run (unless "defconfig" honors xen/.config, in which case the goal's name would be questionable)?
Quoted 2 lines
Also do you really need all the explicit $(BASEDIR) references in the rules above?
I was asked to make the build work with out of tree builds and that's why I went this route. The rest of the Xen build system doesn't support out of tree builds so one can argue that's not needed.
Quoted 13 lines
xen/arch/arm/configs/arm64_defconfig
Quoted 9 lines
xen/arch/arm/configs/arm32_defconfig new file +1
-0@@ -0,0 +1 @@ +CONFIG_64BIT=nxen/arch/arm/configs/arm64_defconfig new file +0
-0As said before I'm not really up to speed with defconfigs, but the arm64 variant being empty but the arm32 one disabling 64BIT seems backwards: You don't even have a choice on arm32.
I agree its squirrelly here. I believe I followed Linux and it only seems to come into play when you don't specify you're target arch and are running natively on the platform but want to build for the other arch. It likely can be dropped if its too confusing.
Quoted 12 lines
xen/arch/x86/Kconfig line 6
Quoted 10 lines
xen/arch/x86/Kconfig new file +6
-0@@ -0,0 +1,18 @@ +config X86_64 + def_bool y + +config X86 + def_bool y + select HAS_GDBSXDidn't you mean to convert HAS_* in subsequent patches?
Yes. Typo.
Quoted 3 lines
Also - not 64BIT here, yet this - if added to ARM - should be added here too so it can be used in common code.
That can fold into the above drop of 64BIT as configurable.
Quoted 6 lines
xen/arch/x86/Kconfig line 10
Quoted 4 lines
xen/arch/x86/Kconfig new file +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?
No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
Quoted 9 lines
xen/scripts/kconfig/Makefile line 3
Quoted 7 lines
xen/scripts/kconfig/Makefile new file +3
-0@@ -0,0 +1,77 @@ +# xen/scripts/kconfig + +MAKEFLAGS += -rRWhy?
kconfig in Linux makes the assumption that implicit rules and variables are turned off for the whole build process. Xen (oddly) does not do this. I sent another patch a while back that I planned on resending that disables the implicit rules and implicit variables.
Currently it makes no difference to the build of the hypervisor to have implicit rules/variables disabled because all the rules are explicitly defined and the implicit variables are unused but it certainly helps debugging of the build process (and build time) to turn them off if they aren't needed.
Quoted 28 lines
Quoted 28 lines
xen/scripts/kconfig/Makefile new file +27
-0+# default rule to do nothing +all: + +XEN_ROOT = $(CURDIR)/.. + +# Xen doesn't have a silent build flag +quiet := silent_ +Q := @ +kecho := : + +# eventually you'll want to do out of tree builds +srctree = $(XEN_ROOT)/xen +objtree = $(srctree) +src := scripts/kconfig +obj := $(src) +KBUILD_SRC := + +# handle functions (most of these lifted from different Linux makefiles +dot-target = $(dir $@).$(notdir $@) +depfile = $(subst $(comma),,$(dot-target).d) +basetarget = $(basename $(notdir $@)) +cmd = $(cmd_$(1)) +if_changed = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + ) +
Quoted 8 lines
xen/scripts/kconfig/Makefile line 35
Quoted 4 lines
xen/scripts/kconfig/Makefile new file +4
-0+if_changed_dep = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + )Considering how much you stripped these fro their Linux original, why did you leave the always true $(if ...) in here, and why did you not consolidate things only single lines (helping readability).
Funny story about GNU Make but it clears up build problems between 3.81 and 4.0 on machines that I tested this on.
Quoted 8 lines
xen/scripts/kconfig/Makefile line 41
Quoted 6 lines
xen/scripts/kconfig/Makefile new file +5
-0+define multi_depend +$(foreach m, $(notdir $1), \ + $(eval $(obj)/$m: \ + $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) +endefDo you really need this?
Yes. Makefile.host uses it. I brought this little snippet in to avoid bringing in 2 more files that reference each other.
Quoted 14 lines
xen/scripts/kconfig/Makefile line 51
Quoted 10 lines
xen/scripts/kconfig/Makefile new file +9
-0+# Set our default defconfig file +KBUILD_DEFCONFIG := $(ARCH)_defconfig + +# provide our shell +CONFIG_SHELL := $(SHELL) + +# provide the host compiler +HOSTCC := gcc +HOSTCXX := g++Why is the C setting from ./Config.mk not good enough (the C++ one should then be added there if indeed needed, which I doubt)?
Quoted 2 lines
Jan
From an earlier review I dropped the usage of Config.mk because I was told the hypervisor (xen/) should build without ./configure being run. The C++ is needed for the kconfig frontends.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 30 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 19 lines · Jan Beulich
Quoted 19 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Kconfig new file +18
-0+mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" + +config SRCARCH + string + option env="SRCARCH" + +config ARCH + string + option env="ARCH" + +source "arch/$SRCARCH/Kconfig" + +config XEN_FULLVERSION + string + option env="XEN_FULLVERSION" + +config DEFCONFIG_LIST + stringQuoted 8 lines
xen/Kconfig line 26
Quoted 3 lines
xen/Kconfig new file +3
-0+ option defconfig_list + default "$ARCH_DEFCONFIG" + default "arch/$SRCARCH/defconfig"Linux'es variant has just SRCARCH and the source directive. Why do we need so much more here? In any even I again think you should at least briefly explain any extensions you do in the commit message.
Quoted 4 lines
I'm not understanding the question here. Linux has 5 items in their list. The last two are identical to the 2 that I retained. Given other evolutions of the patchset I can drop the last one and keep it as just $ARCH_DEFCONFIG since I've always got that defined for arm and x86.
Oh, the context was ambiguous: The comment related to everything quoted, not just the last option. I.e. I'm being irritated by there being quite a few more config options here compared to Linux.
Quoted 15 lines
Quoted 6 lines
Quoted 6 lines
xen/Makefile +0
-0@@ -17,6 +17,9 @@ export XEN_ROOT := $(BASEDIR)/.. EFI_MOUNTPOINT ?= $(BOOT_DIR)/efiQuoted 8 lines
xen/Makefile export XEN_ROOT := $(BASEDIR)/.. · line 21
Quoted 2 lines
xen/Makefile +2
-0+# Don't break if the build process wasn't called from the top level +XEN_TARGET_ARCH ?= $(shell uname -m)I don't see the need for this. We already require setting this on the command line when invoking a build process bypassing the top level directory. Later in the series, when actually using the produced xen/.config, I could see this becoming a nice enhancement (by reading the value from the file).
Quoted 3 lines
One of the early on reviews told me it was not required (and I can confirm that I can run "git clean -xdf && cd xen && make" and it will build). This change makes that behavior still work.
Yes, non-cross builds of course have been working without setting that variable. I was (not clearly enough) referring to cross builds, including hypervisor builds on ix86 distros (which I consider at best kind of cross, but would really deem to be native with there not being any 32-bit hypervisor anymore).
So can you clarify what exactly breaks in which way without this change?
Quoted 18 lines
Quoted 17 lines
xen/Makefile FORCE: · line 231
Quoted 13 lines
xen/Makefile +9
-0@@ -216,3 +220,16 @@ FORCE: %/: FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + +kconfig := silentoldconfig oldconfig config menuconfig defconfig \ + nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig +.PHONY: $(kconfig) +$(kconfig): + $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ + +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfigOkay, I have found the Linux original to this and it's the same there, but I'd like to ask anyway: How can this work without $* getting passed on?
Quoted 3 lines
silentoldconfig is the step that actually takes the .config and generates out all the files like auto.conf and
generated/config.hIt should be in xen/scripts/kconfig/Makefile.linux I believe.
Not sure what you're trying to tell me, but in any event I don't see this to answer the question.
Quoted 9 lines
Quoted 9 lines
xen/Makefile FORCE: · line 235
Quoted 3 lines
xen/Makefile +3
-0+# Allow people to just run `make` as before and not force them to configure +$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfigIs this correct? If I have xen/.config but no xen/include/config/auto.conf.cmd I surely don't want "defconfig" to be run (unless "defconfig" honors xen/.config, in which case the goal's name would be questionable)?
Quoted 6 lines
Quoted 2 lines
Also do you really need all the explicit $(BASEDIR) references in the rules above?
I was asked to make the build work with out of tree builds and that's why I went this route. The rest of the Xen build system doesn't support out of tree builds so one can argue that's not needed.
That can't be right - $(BASEDIR) can't possibly refer to both the source and object trees, yet the code above clearly references both.
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines
xen/arch/arm/configs/arm32_defconfig new file +1
-0@@ -0,0 +1 @@ +CONFIG_64BIT=nQuoted 8 lines
xen/arch/arm/configs/arm64_defconfig
Quoted 4 lines
xen/arch/arm/configs/arm64_defconfig new file +0
-0As said before I'm not really up to speed with defconfigs, but the arm64 variant being empty but the arm32 one disabling 64BIT seems backwards: You don't even have a choice on arm32.
Quoted 4 lines
I agree its squirrelly here. I believe I followed Linux and it only seems to come into play when you don't specify you're target arch and are running natively on the platform but want to build for the other arch. It likely can be dropped if its too confusing.
Unless you can explain this apparent backwardness, yes please.
Quoted 4 lines
Quoted 2 lines
Also - not 64BIT here, yet this - if added to ARM - should be added here too so it can be used in common code.
That can fold into the above drop of 64BIT as configurable.
Iiuc on ARM you explicitly want this to be configurable. And even if you make it a non-configurable setting, it should still be mirrored to x86.
Quoted 8 lines
Quoted 5 lines
xen/arch/arm/configs/arm64_defconfig
Quoted 3 lines
xen/arch/arm/configs/arm64_defconfig new file +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
x86 != 32-bit. I think you're mixing this up with ix86 or x86-32. Here I consider x86 as to basic architecture without any particular bit width in mind.
Quoted 9 lines
Quoted 8 lines
xen/scripts/kconfig/Makefile line 3
Quoted 6 lines
xen/scripts/kconfig/Makefile new file +3
-0@@ -0,0 +1,77 @@ +# xen/scripts/kconfig + +MAKEFLAGS += -rRWhy?
Quoted 3 lines
kconfig in Linux makes the assumption that implicit rules and variables are turned off for the whole build process. Xen (oddly) does not do this.
Mind pointing out where this is being enforced? I've never run across this.
Quoted 2 lines
I sent another patch a while back that I planned on resending that disables the implicit rules and implicit variables.
That would be a prereq one then as it seems.
Quoted 36 lines
Quoted 27 lines
Quoted 27 lines
xen/scripts/kconfig/Makefile new file +27
-0+# default rule to do nothing +all: + +XEN_ROOT = $(CURDIR)/.. + +# Xen doesn't have a silent build flag +quiet := silent_ +Q := @ +kecho := : + +# eventually you'll want to do out of tree builds +srctree = $(XEN_ROOT)/xen +objtree = $(srctree) +src := scripts/kconfig +obj := $(src) +KBUILD_SRC := + +# handle functions (most of these lifted from different Linux makefiles +dot-target = $(dir $@).$(notdir $@) +depfile = $(subst $(comma),,$(dot-target).d) +basetarget = $(basename $(notdir $@)) +cmd = $(cmd_$(1)) +if_changed = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + ) +Quoted 8 lines
xen/scripts/kconfig/Makefile line 35
Quoted 4 lines
xen/scripts/kconfig/Makefile new file +4
-0+if_changed_dep = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + )Considering how much you stripped these fro their Linux original, why did you leave the always true $(if ...) in here, and why did you not consolidate things only single lines (helping readability).
Quoted 2 lines
Funny story about GNU Make but it clears up build problems between 3.81 and 4.0 on machines that I tested this on.
Then you'd have to explain the issue in a comment, since otherwise the first one to seriously look at this would be tempted to clean it up. (But I guess a better solution could be found than making both of these 4-line constructs.)
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines
xen/scripts/kconfig/Makefile new file +4
-0+# Set our default defconfig file +KBUILD_DEFCONFIG := $(ARCH)_defconfig + +# provide our shellQuoted 8 lines
xen/scripts/kconfig/Makefile line 51
Quoted 5 lines
xen/scripts/kconfig/Makefile new file +5
-0+CONFIG_SHELL := $(SHELL) + +# provide the host compiler +HOSTCC := gcc +HOSTCXX := g++Why is the C setting from ./Config.mk not good enough (the C++ one should then be added there if indeed needed, which I doubt)?
Quoted 3 lines
From an earlier review I dropped the usage of Config.mk because I was told the hypervisor (xen/) should build without ./configure being run. The C++ is needed for the kconfig frontends.
But Config.mk has nothing to do with top level configure, and is e.g. being included from xen/Rules.mk.
Jan
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 30 lines · Jan Beulich
Quoted 30 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 27 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Kconfig new file +11
-0+mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" + +config SRCARCH + string + option env="SRCARCH" + +config ARCH + string + option env="ARCH" + +source "arch/$SRCARCH/Kconfig"xen/Kconfig line 26
Quoted 10 lines
xen/Kconfig new file +10
-0+ +config XEN_FULLVERSION + string + option env="XEN_FULLVERSION" + +config DEFCONFIG_LIST + string + option defconfig_list + default "$ARCH_DEFCONFIG" + default "arch/$SRCARCH/defconfig"Linux'es variant has just SRCARCH and the source directive. Why do we need so much more here? In any even I again think you should at least briefly explain any extensions you do in the commit message.
Quoted 8 lines
Quoted 4 lines
I'm not understanding the question here. Linux has 5 items in their list. The last two are identical to the 2 that I retained. Given other evolutions of the patchset I can drop the last one and keep it as just $ARCH_DEFCONFIG since I've always got that defined for arm and x86.
Oh, the context was ambiguous: The comment related to everything quoted, not just the last option. I.e. I'm being irritated by there being quite a few more config options here compared to Linux.
So all these items are in Linux. And they seem to actually be necessary. You'll just find them in different files (e.g. init/Kconfig) that I didn't import because we really didn't need them for anything. Xen has SRCARCH and ARCH. (In fact Xen had SRCARCH in the Makefiles and I removed it in a patch about a month ago since it wasn't used and was inconsistent with XEN_TARGET_ARCH/XEN_TARGET_SUBARCH. SRCARCH is the general platform (e.g. x86/arm) while ARCH is the specific variant (x86_64/arm64/arm32). Unfortunately a bunch of the machinery in kconfig utilities these variables and when I tried to switch to XEN_TARGET_ARCH/XEN_TARGET_SUBARCH it caused me to have to change the pieces I copied from Linux (this is being discussed separately in this patch series as undesirable by Ian).
Quoted 20 lines
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
xen/Makefile +0
-0@@ -17,6 +17,9 @@ export XEN_ROOT := $(BASEDIR)/.. EFI_MOUNTPOINT ?= $(BOOT_DIR)/efiQuoted 8 lines
xen/Makefile export XEN_ROOT := $(BASEDIR)/.. · line 21
Quoted 2 lines
xen/Makefile +2
-0+# Don't break if the build process wasn't called from the top level +XEN_TARGET_ARCH ?= $(shell uname -m)I don't see the need for this. We already require setting this on the command line when invoking a build process bypassing the top level directory. Later in the series, when actually using the produced xen/.config, I could see this becoming a nice enhancement (by reading the value from the file).
Quoted 3 lines
One of the early on reviews told me it was not required (and I can confirm that I can run "git clean -xdf && cd xen && make" and it will build). This change makes that behavior still work.
Quoted 8 lines
Yes, non-cross builds of course have been working without setting that variable. I was (not clearly enough) referring to cross builds, including hypervisor builds on ix86 distros (which I consider at best kind of cross, but would really deem to be native with there not being any 32-bit hypervisor anymore).
So can you clarify what exactly breaks in which way without this change?
The ability to "git clone git://xen && cd xen/xen && make" because I couldn't pick the correct defconfig to use. See the rules just below this reply in xen/Makefile where they are used.
Quoted 19 lines
Quoted 19 lines
Quoted 18 lines
Quoted 4 lines
xen/Makefile +0
-0@@ -216,3 +220,16 @@ FORCE: %/: FORCExen/Makefile FORCE: · line 231
Quoted 10 lines
xen/Makefile +9
-0$(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + +kconfig := silentoldconfig oldconfig config menuconfig defconfig \ + nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig +.PHONY: $(kconfig) +$(kconfig): + $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ + +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfigOkay, I have found the Linux original to this and it's the same there, but I'd like to ask anyway: How can this work without $* getting passed on?
Quoted 6 lines
Quoted 3 lines
silentoldconfig is the step that actually takes the .config and generates out all the files like auto.conf and
generated/config.hIt should be in xen/scripts/kconfig/Makefile.linux I believe.Not sure what you're trying to tell me, but in any event I don't see this to answer the question.
So maybe I'm not understanding your question. I don't understand why $* would need to be passed on. The target "silentoldconfig" in the kconfig Makefile takes care of building all of the files that the rule could match. That's what I tried to say in my original response. I believe your point is that I would have to pass the target file on like the below implicit case?
.PHONY: all
all: something otherthing foo.c
@echo "all = $*"
.PHONY: %thing
%thing:
@echo "implicit = $*"
.PHONY: foo.cfoo.c:
@echo "explicit = $*"
$ make implicit = some implicit = other explicit = foo all =
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
xen/Makefile FORCE: · line 235
Quoted 4 lines
xen/Makefile +3
-0+# Allow people to just run `make` as before and not force them to configure +$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfigIs this correct? If I have xen/.config but no xen/include/config/auto.conf.cmd I surely don't want "defconfig" to be run (unless "defconfig" honors xen/.config, in which case the goal's name would be questionable)?
Also do you really need all the explicit $(BASEDIR) references in the rules above?
Quoted 7 lines
Quoted 3 lines
I was asked to make the build work with out of tree builds and that's why I went this route. The rest of the Xen build system doesn't support out of tree builds so one can argue that's not needed.
That can't be right - $(BASEDIR) can't possibly refer to both the source and object trees, yet the code above clearly references both.
I can drop it in as many places as possible if that's desirable.
Quoted 36 lines
Quoted 14 lines
Quoted 13 lines
xen/arch/arm/configs/arm64_defconfig
Quoted 9 lines
xen/arch/arm/configs/arm32_defconfig new file +1
-0@@ -0,0 +1 @@ +CONFIG_64BIT=nxen/arch/arm/configs/arm64_defconfig new file +0
-0As said before I'm not really up to speed with defconfigs, but the arm64 variant being empty but the arm32 one disabling 64BIT seems backwards: You don't even have a choice on arm32.
Quoted 4 lines
I agree its squirrelly here. I believe I followed Linux and it only seems to come into play when you don't specify you're target arch and are running natively on the platform but want to build for the other arch. It likely can be dropped if its too confusing.
Unless you can explain this apparent backwardness, yes please.
Quoted 4 lines
Quoted 2 lines
Also - not 64BIT here, yet this - if added to ARM - should be added here too so it can be used in common code.
That can fold into the above drop of 64BIT as configurable.
Iiuc on ARM you explicitly want this to be configurable. And even if you make it a non-configurable setting, it should still be mirrored to x86.
Quoted 6 lines
Quoted 5 lines
xen/arch/arm/configs/arm64_defconfig
Quoted 3 lines
xen/arch/arm/configs/arm64_defconfig new file +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?
Quoted 6 lines
Quoted 2 lines
No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
x86 != 32-bit. I think you're mixing this up with ix86 or x86-32. Here I consider x86 as to basic architecture without any particular bit width in mind.
ok. Well the syntax is still "arch/SUBARCH/configs/ARCH_defconfig" so the original is correct. There is no defconfig for the ambiguous x86 family. You're either building for x86_64 or x86_32 (which I referred to as x86 in my original response).
This defconfig is for the 64-bit architecture of x86 (x86_64) and there for its named correctly.
Quoted 14 lines
Quoted 10 lines
Quoted 9 lines
xen/scripts/kconfig/Makefile line 3
Quoted 7 lines
xen/scripts/kconfig/Makefile new file +3
-0@@ -0,0 +1,77 @@ +# xen/scripts/kconfig + +MAKEFLAGS += -rRWhy?
Quoted 3 lines
kconfig in Linux makes the assumption that implicit rules and variables are turned off for the whole build process. Xen (oddly) does not do this.
Quoted 7 lines
Mind pointing out where this is being enforced? I've never run across this.
Quoted 2 lines
I sent another patch a while back that I planned on resending that disables the implicit rules and implicit variables.
That would be a prereq one then as it seems.
I've sent this an its landed now so I'll remove that.
Quoted 37 lines
Quoted 37 lines
Quoted 36 lines
Quoted 22 lines
xen/scripts/kconfig/Makefile new file +21
-0+# default rule to do nothing +all: + +XEN_ROOT = $(CURDIR)/.. + +# Xen doesn't have a silent build flag +quiet := silent_ +Q := @ +kecho := : + +# eventually you'll want to do out of tree builds +srctree = $(XEN_ROOT)/xen +objtree = $(srctree) +src := scripts/kconfig +obj := $(src) +KBUILD_SRC := + +# handle functions (most of these lifted from different Linux makefiles +dot-target = $(dir $@).$(notdir $@) +depfile = $(subst $(comma),,$(dot-target).d) +basetarget = $(basename $(notdir $@))xen/scripts/kconfig/Makefile line 35
Quoted 10 lines
xen/scripts/kconfig/Makefile new file +10
-0+cmd = $(cmd_$(1)) +if_changed = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + ) + +if_changed_dep = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + )Considering how much you stripped these fro their Linux original, why did you leave the always true $(if ...) in here, and why did you not consolidate things only single lines (helping readability).
Quoted 7 lines
Quoted 2 lines
Funny story about GNU Make but it clears up build problems between 3.81 and 4.0 on machines that I tested this on.
Then you'd have to explain the issue in a comment, since otherwise the first one to seriously look at this would be tempted to clean it up. (But I guess a better solution could be found than making both of these 4-line constructs.)
I've made a note to recreate the test that I had to write with makefiles (unfortunately I've deleted it once I came up with the solution) and attach it here.
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
xen/scripts/kconfig/Makefile line 51
Quoted 10 lines
xen/scripts/kconfig/Makefile new file +9
-0+# Set our default defconfig file +KBUILD_DEFCONFIG := $(ARCH)_defconfig + +# provide our shell +CONFIG_SHELL := $(SHELL) + +# provide the host compiler +HOSTCC := gcc +HOSTCXX := g++Why is the C setting from ./Config.mk not good enough (the C++ one should then be added there if indeed needed, which I doubt)?
Quoted 9 lines
Quoted 3 lines
From an earlier review I dropped the usage of Config.mk because I was told the hypervisor (xen/) should build without ./configure being run. The C++ is needed for the kconfig frontends.
But Config.mk has nothing to do with top level configure, and is e.g. being included from
xen/Rules.mk.Jan
I'm not including Config.mk in those build files because it includes a lot and many of them are redefinitions of what kconfig does. All I would get out of it would be HOSTCC.
$ wc -l config/x86_64.mk config/Linux.mk config/StdGNU.mk Config.mk
32 config/x86_64.mk
3 config/Linux.mk
50 config/StdGNU.mk
287 Config.mk
372 totalIf there was a bit more granularity (config/host.mk) it wouldn't be so bad.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 37 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:34, <[email protected]> wrote:
Quoted 35 lines · Jan Beulich
Quoted 34 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 19 lines · Jan Beulich
Quoted 19 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Kconfig new file +18
-0+mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" + +config SRCARCH + string + option env="SRCARCH" + +config ARCH + string + option env="ARCH" + +source "arch/$SRCARCH/Kconfig" + +config XEN_FULLVERSION + string + option env="XEN_FULLVERSION" + +config DEFCONFIG_LIST + stringQuoted 8 lines
xen/Kconfig line 26
Quoted 3 lines
xen/Kconfig new file +3
-0+ option defconfig_list + default "$ARCH_DEFCONFIG" + default "arch/$SRCARCH/defconfig"Linux'es variant has just SRCARCH and the source directive. Why do we need so much more here? In any even I again think you should at least briefly explain any extensions you do in the commit message.
I'm not understanding the question here. Linux has 5 items in their list. The last two are identical to the 2 that I retained. Given other evolutions of the patchset I can drop the last one and keep it as just $ARCH_DEFCONFIG since I've always got that defined for arm and x86.
Quoted 7 lines
Quoted 3 lines
Oh, the context was ambiguous: The comment related to everything quoted, not just the last option. I.e. I'm being irritated by there being quite a few more config options here compared to Linux.
So all these items are in Linux. And they seem to actually be necessary. You'll just find them in different files (e.g. init/Kconfig) that I didn't import because we really didn't need them for anything.
Okay, this makes sense. Remains the question on the XEN_FULLVERSION name: Doesn't this collide with the identically named make variable? Or is it intentionally named the same? In which case - what's the purpose? There's no CONFIG_KERNELVERSION resulting from this in Linux (which seems in line with documentation).
Quoted 25 lines
Quoted 25 lines
Quoted 15 lines
Quoted 6 lines
Quoted 6 lines
xen/Makefile +0
-0@@ -17,6 +17,9 @@ export XEN_ROOT := $(BASEDIR)/.. EFI_MOUNTPOINT ?= $(BOOT_DIR)/efiQuoted 8 lines
xen/Makefile export XEN_ROOT := $(BASEDIR)/.. · line 21
Quoted 2 lines
xen/Makefile +2
-0+# Don't break if the build process wasn't called from the top level +XEN_TARGET_ARCH ?= $(shell uname -m)I don't see the need for this. We already require setting this on the command line when invoking a build process bypassing the top level directory. Later in the series, when actually using the produced xen/.config, I could see this becoming a nice enhancement (by reading the value from the file).
Quoted 3 lines
One of the early on reviews told me it was not required (and I can confirm that I can run "git clean -xdf && cd xen && make" and it will build). This change makes that behavior still work.
Yes, non-cross builds of course have been working without setting that variable. I was (not clearly enough) referring to cross builds, including hypervisor builds on ix86 distros (which I consider at best kind of cross, but would really deem to be native with there not being any 32-bit hypervisor anymore).
Quoted 6 lines
Quoted 2 lines
So can you clarify what exactly breaks in which way without this change?
The ability to "git clone
git://xen&& cd xen/xen && make" because I couldn't pick the correct defconfig to use. See the rules just below this reply in xen/Makefile where they are used.
Okay. But - does "uname -m" really produce e.g. "arm32" and "arm64" respectively, and not, as I would expect, "armv..." and "aarch64"? See the setup of XEN_COMPILE_ARCH in ./Config.mk.
Quoted 25 lines
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
xen/Makefile FORCE: · line 231
Quoted 13 lines
xen/Makefile +9
-0@@ -216,3 +220,16 @@ FORCE: %/: FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + +kconfig := silentoldconfig oldconfig config menuconfig defconfig \ + nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig +.PHONY: $(kconfig) +$(kconfig): + $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ + +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfigOkay, I have found the Linux original to this and it's the same there, but I'd like to ask anyway: How can this work without $* getting passed on?
Quoted 6 lines
Quoted 3 lines
silentoldconfig is the step that actually takes the .config and generates out all the files like auto.conf and
generated/config.hIt should be in xen/scripts/kconfig/Makefile.linux I believe.Not sure what you're trying to tell me, but in any event I don't see this to answer the question.
Quoted 6 lines
So maybe I'm not understanding your question. I don't understand why $* would need to be passed on. The target "silentoldconfig" in the kconfig
Makefiletakes care of building all of the files that the rule could match. That's what I tried to say in my original response. I believe your point is that I would have to pass the target file on like the below implicit case?
Yes, that's what one would expect from a pattern rule. And yes, now I understand your answer to the original question.
Quoted 13 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
xen/Makefile FORCE: · line 234
Quoted 3 lines
xen/Makefile +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?Quoted 6 lines
Quoted 2 lines
No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
x86 != 32-bit. I think you're mixing this up with ix86 or x86-32. Here I consider x86 as to basic architecture without any particular bit width in mind.
Quoted 7 lines
ok. Well the syntax is still "
arch/SUBARCH/configs/ARCH_defconfig" so the original is correct. There is no defconfig for the ambiguous x86 family. You're either building forx86_64orx86_32(which I referred to as x86 in my original response).This defconfig is for the 64-bit architecture of x86 (
x86_64) and there for its named correctly.
But there is no x86_32 architecture form the hypervisor build's point of view, and hence x86 isn't ambiguous. In fact the mid-term plan is to remove leftovers of references to x86_64 (like the arch/x86/x86_64/ or include/asm-x86/x86_64/ directories) where possible. The only place they need to be kept are in the public interface.
Quoted 24 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
xen/Makefile FORCE:
Quoted 9 lines
xen/Makefile +9
-0+# Set our default defconfig file +KBUILD_DEFCONFIG := $(ARCH)_defconfig + +# provide our shell +CONFIG_SHELL := $(SHELL) + +# provide the host compiler +HOSTCC := gcc +HOSTCXX := g++Why is the C setting from ./Config.mk not good enough (the C++ one should then be added there if indeed needed, which I doubt)?
Quoted 6 lines
Quoted 3 lines
From an earlier review I dropped the usage of Config.mk because I was told the hypervisor (xen/) should build without ./configure being run. The C++ is needed for the kconfig frontends.
But Config.mk has nothing to do with top level configure, and is e.g. being included from
xen/Rules.mk.I'm not including Config.mk in those build files because it includes a lot and many of them are redefinitions of what kconfig does. All I would get out of it would be HOSTCC.
Quoted 8 lines
$ wc -l config/x86_64.mk config/Linux.mk config/StdGNU.mk Config.mk 32 config/x86_64.mk 3 config/Linux.mk 50 config/StdGNU.mk 287 Config.mk 372 totalIf there was a bit more granularity (
config/host.mk) it wouldn't be so bad.
Indeed introducing that would seem like a useful intermediate step. No multiple points of defining the same thing please (because of someone actually needing to fiddle with them will quite likely touch only one instance, resulting in time wasted figuring out why things no longer work uniformly).
Jan
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 45 lines · Jan Beulich
Quoted 37 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:34, <[email protected]> wrote:
Quoted 35 lines · Jan Beulich
Quoted 34 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 19 lines · Jan Beulich
Quoted 19 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Kconfig new file +18
-0+mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" + +config SRCARCH + string + option env="SRCARCH" + +config ARCH + string + option env="ARCH" + +source "arch/$SRCARCH/Kconfig" + +config XEN_FULLVERSION + string + option env="XEN_FULLVERSION" + +config DEFCONFIG_LIST + stringQuoted 8 lines
xen/Kconfig line 26
Quoted 3 lines
xen/Kconfig new file +3
-0+ option defconfig_list + default "$ARCH_DEFCONFIG" + default "arch/$SRCARCH/defconfig"Linux'es variant has just SRCARCH and the source directive. Why do we need so much more here? In any even I again think you should at least briefly explain any extensions you do in the commit message.
I'm not understanding the question here. Linux has 5 items in their list. The last two are identical to the 2 that I retained. Given other evolutions of the patchset I can drop the last one and keep it as just $ARCH_DEFCONFIG since I've always got that defined for arm and x86.
Quoted 7 lines
Quoted 3 lines
Oh, the context was ambiguous: The comment related to everything quoted, not just the last option. I.e. I'm being irritated by there being quite a few more config options here compared to Linux.
So all these items are in Linux. And they seem to actually be necessary. You'll just find them in different files (e.g. init/Kconfig) that I didn't import because we really didn't need them for anything.
Quoted 6 lines
Okay, this makes sense. Remains the question on the
XEN_FULLVERSIONname: Doesn't this collide with the identically named make variable? Or is it intentionally named the same? In which case - what's the purpose? There's noCONFIG_KERNELVERSIONresulting from this in Linux (which seems in line with documentation).
This is intentional. Its for when you run "make {menu,n,g,x}config" and it'll show the version info at the top. It also puts the version info as a comment inside the .config. Just cosmetic stuff.
Quoted 29 lines
Quoted 29 lines
Quoted 28 lines
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
xen/Makefile +0
-0@@ -17,6 +17,9 @@ export XEN_ROOT := $(BASEDIR)/.. EFI_MOUNTPOINT ?= $(BOOT_DIR)/efiQuoted 8 lines
xen/Makefile export XEN_ROOT := $(BASEDIR)/.. · line 21
Quoted 2 lines
xen/Makefile +2
-0+# Don't break if the build process wasn't called from the top level +XEN_TARGET_ARCH ?= $(shell uname -m)I don't see the need for this. We already require setting this on the command line when invoking a build process bypassing the top level directory. Later in the series, when actually using the produced xen/.config, I could see this becoming a nice enhancement (by reading the value from the file).
Quoted 3 lines
One of the early on reviews told me it was not required (and I can confirm that I can run "git clean -xdf && cd xen && make" and it will build). This change makes that behavior still work.
Yes, non-cross builds of course have been working without setting that variable. I was (not clearly enough) referring to cross builds, including hypervisor builds on ix86 distros (which I consider at best kind of cross, but would really deem to be native with there not being any 32-bit hypervisor anymore).
So can you clarify what exactly breaks in which way without this change?
Quoted 7 lines
Quoted 3 lines
The ability to "git clone
git://xen&& cd xen/xen && make" because I couldn't pick the correct defconfig to use. See the rules just below this reply in xen/Makefile where they are used.Okay. But - does "uname -m" really produce e.g. "arm32" and "arm64" respectively, and not, as I would expect, "armv..." and "aarch64"? See the setup of
XEN_COMPILE_ARCHin ./Config.mk.
I've switched to pulling in Config.mk
Quoted 57 lines
Quoted 26 lines
Quoted 19 lines
Quoted 19 lines
Quoted 18 lines
Quoted 4 lines
xen/Makefile +0
-0@@ -216,3 +220,16 @@ FORCE: %/: FORCExen/Makefile FORCE: · line 231
Quoted 10 lines
xen/Makefile +9
-0$(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + +kconfig := silentoldconfig oldconfig config menuconfig defconfig \ + nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig +.PHONY: $(kconfig) +$(kconfig): + $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ + +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd + $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfigOkay, I have found the Linux original to this and it's the same there, but I'd like to ask anyway: How can this work without $* getting passed on?
Quoted 6 lines
Quoted 3 lines
silentoldconfig is the step that actually takes the .config and generates out all the files like auto.conf and
generated/config.hIt should be in xen/scripts/kconfig/Makefile.linux I believe.Not sure what you're trying to tell me, but in any event I don't see this to answer the question.
Quoted 6 lines
So maybe I'm not understanding your question. I don't understand why $* would need to be passed on. The target "silentoldconfig" in the kconfig
Makefiletakes care of building all of the files that the rule could match. That's what I tried to say in my original response. I believe your point is that I would have to pass the target file on like the below implicit case?Yes, that's what one would expect from a pattern rule. And yes, now I understand your answer to the original question.
Quoted 13 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
xen/Makefile FORCE: · line 234
Quoted 3 lines
xen/Makefile +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?Quoted 6 lines
Quoted 2 lines
No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
x86 != 32-bit. I think you're mixing this up with ix86 or x86-32. Here I consider x86 as to basic architecture without any particular bit width in mind.
Quoted 7 lines
ok. Well the syntax is still "
arch/SUBARCH/configs/ARCH_defconfig" so the original is correct. There is no defconfig for the ambiguous x86 family. You're either building forx86_64orx86_32(which I referred to as x86 in my original response).This defconfig is for the 64-bit architecture of x86 (
x86_64) and there for its named correctly.
Quoted 6 lines
But there is no
x86_32architecture form the hypervisor build's point of view, and hence x86 isn't ambiguous. In fact the mid-term plan is to remove leftovers of references tox86_64(like thearch/x86/x86_64/orinclude/asm-x86/x86_64/directories) where possible. The only place they need to be kept are in the public interface.
That's fine but you don't build things for "x86". You build them for "x86_64". XEN_TARGET_ARCH takes in "x86_64".
Quoted 34 lines
Quoted 25 lines
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
xen/Makefile FORCE:
Quoted 10 lines
xen/Makefile +9
-0+# Set our default defconfig file +KBUILD_DEFCONFIG := $(ARCH)_defconfig + +# provide our shell +CONFIG_SHELL := $(SHELL) + +# provide the host compiler +HOSTCC := gcc +HOSTCXX := g++Why is the C setting from ./Config.mk not good enough (the C++ one should then be added there if indeed needed, which I doubt)?
Quoted 6 lines
Quoted 3 lines
From an earlier review I dropped the usage of Config.mk because I was told the hypervisor (xen/) should build without ./configure being run. The C++ is needed for the kconfig frontends.
But Config.mk has nothing to do with top level configure, and is e.g. being included from
xen/Rules.mk.I'm not including Config.mk in those build files because it includes a lot and many of them are redefinitions of what kconfig does. All I would get out of it would be HOSTCC.
Quoted 8 lines
$ wc -l config/x86_64.mk config/Linux.mk config/StdGNU.mk Config.mk 32 config/x86_64.mk 3 config/Linux.mk 50 config/StdGNU.mk 287 Config.mk 372 totalIf there was a bit more granularity (
config/host.mk) it wouldn't be so bad.
Quoted 8 lines
Indeed introducing that would seem like a useful intermediate step. No multiple points of defining the same thing please (because of someone actually needing to fiddle with them will quite likely touch only one instance, resulting in time wasted figuring out why things no longer work uniformly).
Jan
I can submit that outside of this series before the next repost.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 35 lines
Quoted 1 line
Quoted 1 line · On 07.12.15 at 22:27, <[email protected]> wrote:
Quoted 26 lines · Jan Beulich
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:34, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
Review
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
(quoted diff) +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?Quoted 6 lines
Quoted 2 lines
No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
x86 != 32-bit. I think you're mixing this up with ix86 or x86-32. Here I consider x86 as to basic architecture without any particular bit width in mind.
Quoted 7 lines
ok. Well the syntax is still "
arch/SUBARCH/configs/ARCH_defconfig" so the original is correct. There is no defconfig for the ambiguous x86 family. You're either building forx86_64orx86_32(which I referred to as x86 in my original response).This defconfig is for the 64-bit architecture of x86 (
x86_64) and there for its named correctly.Quoted 6 lines
But there is no
x86_32architecture form the hypervisor build's point of view, and hence x86 isn't ambiguous. In fact the mid-term plan is to remove leftovers of references tox86_64(like thearch/x86/x86_64/orinclude/asm-x86/x86_64/directories) where possible. The only place they need to be kept are in the public interface.
Quoted 2 lines
That's fine but you don't build things for "x86". You build them for "
x86_64".XEN_TARGET_ARCHtakes in "x86_64".
The XEN_TARGET_ARCH value is of no interest here. The only fact that I care about is that there's only one x86 configuration, and hence I can't see why it shouldn't be named x86_defconfig.
Jan
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 35 lines · Jan Beulich
Quoted 35 lines
Quoted 1 line
Quoted 1 line · On 07.12.15 at 22:27, <[email protected]> wrote:
Quoted 32 lines · Jan Beulich
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:34, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
Review
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
(quoted diff) +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?Quoted 6 lines
Quoted 2 lines
No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
x86 != 32-bit. I think you're mixing this up with ix86 or x86-32. Here I consider x86 as to basic architecture without any particular bit width in mind.
Quoted 7 lines
ok. Well the syntax is still "
arch/SUBARCH/configs/ARCH_defconfig" so the original is correct. There is no defconfig for the ambiguous x86 family. You're either building forx86_64orx86_32(which I referred to as x86 in my original response).This defconfig is for the 64-bit architecture of x86 (
x86_64) and there for its named correctly.But there is no
x86_32architecture form the hypervisor build's point of view, and hence x86 isn't ambiguous. In fact the mid-term plan is to remove leftovers of references tox86_64(like thearch/x86/x86_64/orinclude/asm-x86/x86_64/directories) where possible. The only place they need to be kept are in the public interface.
Quoted 9 lines
Quoted 2 lines
That's fine but you don't build things for "x86". You build them for "
x86_64".XEN_TARGET_ARCHtakes in "x86_64".The
XEN_TARGET_ARCHvalue is of no interest here. The only fact that I care about is that there's only one x86 configuration, and hence I can't see why it shouldn't be namedx86_defconfig.Jan
This is just how the upstream stuff works. Are we forking upstream's kconfig just so we can call it "x86" instead of "x86_64"?
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 40 lines
Quoted 1 line
Quoted 1 line · On 08.12.15 at 15:16, <[email protected]> wrote:
Quoted 38 lines · Jan Beulich
Quoted 37 lines
Quoted 1 line
Quoted 1 line · On 07.12.15 at 22:27, <[email protected]> wrote:
Quoted 26 lines · Jan Beulich
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:34, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
Review
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
(quoted diff) +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?Quoted 6 lines
Quoted 2 lines
No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
x86 != 32-bit. I think you're mixing this up with ix86 or x86-32. Here I consider x86 as to basic architecture without any particular bit width in mind.
Quoted 7 lines
ok. Well the syntax is still "
arch/SUBARCH/configs/ARCH_defconfig" so the original is correct. There is no defconfig for the ambiguous x86 family. You're either building forx86_64orx86_32(which I referred to as x86 in my original response).This defconfig is for the 64-bit architecture of x86 (
x86_64) and there for its named correctly.Quoted 6 lines
But there is no
x86_32architecture form the hypervisor build's point of view, and hence x86 isn't ambiguous. In fact the mid-term plan is to remove leftovers of references tox86_64(like thearch/x86/x86_64/orinclude/asm-x86/x86_64/directories) where possible. The only place they need to be kept are in the public interface.That's fine but you don't build things for "x86". You build them for "
x86_64".XEN_TARGET_ARCHtakes in "x86_64".
Quoted 6 lines
Quoted 3 lines
The
XEN_TARGET_ARCHvalue is of no interest here. The only fact that I care about is that there's only one x86 configuration, and hence I can't see why it shouldn't be namedx86_defconfig.This is just how the upstream stuff works. Are we forking upstream's kconfig just so we can call it "x86" instead of "
x86_64"?
I don't think using
config ARCH_DEFCONFIG
string
default "arch/x86/configs/x86_defconfig"
instead of
config ARCH_DEFCONFIG
string default "arch/x86/configs/x86_64_defconfig"
in a Kconfig file of ours is a fork. Or am I overlooking some other aspect?
Jan
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 55 lines · Jan Beulich
Quoted 40 lines
Quoted 1 line
Quoted 1 line · On 08.12.15 at 15:16, <[email protected]> wrote:
Quoted 38 lines · Jan Beulich
Quoted 37 lines
Quoted 1 line
Quoted 1 line · On 07.12.15 at 22:27, <[email protected]> wrote:
Quoted 26 lines · Jan Beulich
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:34, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
Review
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
(quoted diff) +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?Quoted 6 lines
Quoted 2 lines
No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
x86 != 32-bit. I think you're mixing this up with ix86 or x86-32. Here I consider x86 as to basic architecture without any particular bit width in mind.
Quoted 7 lines
ok. Well the syntax is still "
arch/SUBARCH/configs/ARCH_defconfig" so the original is correct. There is no defconfig for the ambiguous x86 family. You're either building forx86_64orx86_32(which I referred to as x86 in my original response).This defconfig is for the 64-bit architecture of x86 (
x86_64) and there for its named correctly.Quoted 6 lines
But there is no
x86_32architecture form the hypervisor build's point of view, and hence x86 isn't ambiguous. In fact the mid-term plan is to remove leftovers of references tox86_64(like thearch/x86/x86_64/orinclude/asm-x86/x86_64/directories) where possible. The only place they need to be kept are in the public interface.That's fine but you don't build things for "x86". You build them for "
x86_64".XEN_TARGET_ARCHtakes in "x86_64".Quoted 6 lines
Quoted 3 lines
The
XEN_TARGET_ARCHvalue is of no interest here. The only fact that I care about is that there's only one x86 configuration, and hence I can't see why it shouldn't be namedx86_defconfig.This is just how the upstream stuff works. Are we forking upstream's kconfig just so we can call it "x86" instead of "
x86_64"?I don't think using
config
ARCH_DEFCONFIG
string
default "arch/x86/configs/x86_defconfig"instead of
Quoted 9 lines
config
ARCH_DEFCONFIGstring default "arch/x86/configs/x86_64_defconfig"in a
Kconfigfile of ours is a fork. Or am I overlooking some other aspect?Jan
Its not that simple. When you run "make defconfig" it will default to using "arch/$(SRCARCH)/configs/$(ARCH)_defconfig". Where SRCARCH = TARGET_ARCH and ARCH = TARGET_SUBARCH = XEN_TARGET_ARCH. So to use real values from the documentation how to build Xen:
- XEN_TARGET_ARCH=x86_64 make defconfig
- XEN_TARGET_ARCH=arm32 make defconfig
- XEN_TARGET_ARCH=arm64 make defconfig
The result is things build correctly. To make the variable build ups change for x86 vs arm would require us to fork xen/tools/kconfig/Makefile line 101 (potentially others).
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 61 lines · Doug Goldstein
Quoted 46 lines · Jan Beulich
Quoted 31 lines
Quoted 1 line
Quoted 1 line · On 08.12.15 at 15:16, <[email protected]> wrote:
Quoted 29 lines · Jan Beulich
Quoted 29 lines
Quoted 1 line
Quoted 1 line · On 07.12.15 at 22:27, <[email protected]> wrote:
Quoted 27 lines · Jan Beulich
Quoted 14 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:34, <[email protected]> wrote:
Quoted 7 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Review
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
(quoted diff) +3
-0+config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?Quoted 5 lines
Quoted 2 lines
No. I was told to drop support for x86 entirely in an earlier review. Its not possible to configure for 32-bit x86 in v6.
x86 != 32-bit. I think you're mixing this up with ix86 or x86-32. Here I consider x86 as to basic architecture without any particular bit width in mind.
Quoted 7 lines
ok. Well the syntax is still "
arch/SUBARCH/configs/ARCH_defconfig" so the original is correct. There is no defconfig for the ambiguous x86 family. You're either building forx86_64orx86_32(which I referred to as x86 in my original response).This defconfig is for the 64-bit architecture of x86 (
x86_64) and there for its named correctly.But there is no
x86_32architecture form the hypervisor build's point of view, and hence x86 isn't ambiguous. In fact the mid-term plan is to remove leftovers of references tox86_64(like thearch/x86/x86_64/orinclude/asm-x86/x86_64/directories) where possible. The only place they need to be kept are in the public interface.Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
That's fine but you don't build things for "x86". You build them for "
x86_64".XEN_TARGET_ARCHtakes in "x86_64".The
XEN_TARGET_ARCHvalue is of no interest here. The only fact that I care about is that there's only one x86 configuration, and hence I can't see why it shouldn't be namedx86_defconfig.This is just how the upstream stuff works. Are we forking upstream's kconfig just so we can call it "x86" instead of "
x86_64"?I don't think using
config
ARCH_DEFCONFIG
string
default "arch/x86/configs/x86_defconfig"instead of
Quoted 9 lines
config
ARCH_DEFCONFIGstring default "arch/x86/configs/x86_64_defconfig"in a
Kconfigfile of ours is a fork. Or am I overlooking some other aspect?Jan
Its not that simple. When you run "make defconfig" it will default to using "arch/$(SRCARCH)/configs/$(ARCH)_defconfig". Where SRCARCH =
TARGET_ARCHand ARCH =TARGET_SUBARCH=XEN_TARGET_ARCH. So to use real values from the documentation how to build Xen:
Quoted 7 lines
- XEN_TARGET_ARCH=x86_64 make defconfig
- XEN_TARGET_ARCH=arm32 make defconfig
- XEN_TARGET_ARCH=arm64 make defconfigThe result is things build correctly. To make the variable build ups change for x86 vs arm would require us to fork xen/tools/kconfig/Makefile line 101 (potentially others).
Frankly, I don't think it is worth worrying that x86_64 could be shortened. It is more important to reduce divergence from upstream Kconfig.
After all, x86_128 is likely to come along sometime.
~Andrew
Re: [PATCHv6] 02/28] build: build Kconfig and config rules
Quoted 80 lines · Andrew Cooper
Quoted 79 lines · Doug Goldstein
Quoted 60 lines · Jan Beulich
Quoted 46 lines
Quoted 1 line
Quoted 1 line · On 08.12.15 at 15:16, <[email protected]> wrote:
Quoted 44 lines · Jan Beulich
Quoted 44 lines
Quoted 1 line
Quoted 1 line · On 07.12.15 at 22:27, <[email protected]> wrote:
Quoted 29 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:34, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 30.11.15 at 18:53, <[email protected]> wrote:
Quoted 7 lines · Jan Beulich
Quoted 6 lines
Quoted 2 lines
On 24.11.15 at 18:51, <[email protected]>
wrote:(quoted diff) +3
-0+config ARCH_DEFCONFIG + string + default"
arch/x86/configs/x86_64_defconfig"
x86_defconfigperhaps?Quoted 7 lines
Quoted 3 lines
No. I was told to drop support for x86 entirely in an earlier review.
Its not possible to configure for 32-bit x86 in v6.x86 != 32-bit. I think you're mixing this up with ix86 or x86-32.
Here I consider x86 as to basic architecture without any particular bit width in mind.ok. Well the syntax is still "
arch/SUBARCH/configs/ARCH_defconfig" so
the original is correct. There is no defconfig for the ambiguous x86
family. You're either building forx86_64orx86_32(which I referred to
as x86 in my original response).Quoted 3 lines
This defconfig is for the 64-bit architecture of x86 (
x86_64) and there
for its named correctly.Quoted 10 lines
But there is no
x86_32architecture form the hypervisor build's
point of view, and hence x86 isn't ambiguous. In fact the mid-term
plan is to remove leftovers of references tox86_64(like thearch/x86/x86_64/orinclude/asm-x86/x86_64/directories) where
possible. The only place they need to be kept are in the public
interface.That's fine but you don't build things for "x86". You build them for
"x86_64".XEN_TARGET_ARCHtakes in "x86_64".Quoted 6 lines
Quoted 3 lines
The
XEN_TARGET_ARCHvalue is of no interest here. The only fact that I care about is that there's only one x86 configuration, and hence I can't see why it shouldn't be namedx86_defconfig.This is just how the upstream stuff works. Are we forking upstream's
kconfig just so we can call it "x86" instead of "x86_64"?I don't think using
config
ARCH_DEFCONFIG
string
default "arch/x86/configs/x86_defconfig"instead of
Quoted 9 lines
config
ARCH_DEFCONFIGstring default "arch/x86/configs/x86_64_defconfig"in a
Kconfigfile of ours is a fork. Or am I overlooking some other aspect?Jan
Its not that simple. When you run "make defconfig" it will default to using "arch/$(SRCARCH)/configs/$(ARCH)_defconfig". Where SRCARCH =
TARGET_ARCHand ARCH =TARGET_SUBARCH=XEN_TARGET_ARCH. So to use real values from the documentation how to build Xen:- XEN_TARGET_ARCH=x86_64 make defconfig
- XEN_TARGET_ARCH=arm32 make defconfig
- XEN_TARGET_ARCH=arm64 make defconfig
Quoted 7 lines
Quoted 3 lines
The result is things build correctly. To make the variable build ups change for x86 vs arm would require us to fork xen/tools/kconfig/Makefile line 101 (potentially others).
Frankly, I don't think it is worth worrying that
x86_64could be shortened. It is more important to reduce divergence from upstreamKconfig.
Agreed.
Quoted 1 line
After all,
x86_128is likely to come along sometime.
You owe me a new keyboard and a new cup of coffee.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v6 1/1 03/28] build: use generated Kconfig options for Xen
In reply to Doug GoldsteinSwitches the build system to rely on the options and flags generated by Kconfig to control what gets built and how. Follow on patches will convert items to be prefixed with CONFIG_. Additionally remove a #define that resulted in a redefined variable when building for arm.
--- xen/Makefile | 12 ++++++++++-- xen/Rules.mk | 2 ++ xen/drivers/passthrough/arm/smmu.c | 4 ---- xen/include/xen/config.h | 2 ++ 4 files changed, 14 insertions(+), 6 deletions(-)
xen/Makefile +10 -2
@@ -26,6 +26,9 @@ default: build .PHONY: dist dist: install +.PHONY: build +build:: $(BASEDIR)/include/config/auto.conf + .PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtags build install uninstall debug clean distclean cscope TAGS tags MAP gtags:: ifneq ($(XEN_TARGET_ARCH),x86_32)
@@ -227,9 +230,14 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ -$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd $(BASEDIR)/.config $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfig # Allow people to just run `make` as before and not force them to configure -$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; +$(BASEDIR)/.config: $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfig + +# Break the dependency chain for the first run +$(BASEDIR)/include/config/auto.conf.cmd: ; + +-include $(BASEDIR)/include/config/auto.conf.cmd
xen/Rules.mk +2 -0
@@ -12,6 +12,8 @@ frame_pointer ?= n lto ?= n kexec ?= y +-include $(BASEDIR)/include/config/auto.conf + include $(XEN_ROOT)/Config.mk # Hardcoded configuration implications and dependencies.
xen/drivers/passthrough/arm/smmu.c +0 -4
@@ -196,10 +196,6 @@ static inline int pci_for_each_dma_alias(struct pci_dev *pdev,#define PHYS_MASK_SHIFT PADDR_BITStypedef paddr_t phys_addr_t ; -#ifdef CONFIG_ARM_64 -# define CONFIG_64BIT -#endif -#define VA_BITS 0/* Only used for configuring stage-1 input size */ /* The macro ACCESS_ONCE start to be replaced in Linux in favor of
xen/include/xen/config.h +2 -0
@@ -12,6 +12,8 @@#endif #include <asm/config.h> +#include <generated/autoconf.h> +#define EXPORT_SYMBOL (var)#define EXPORT_SYMBOL_GPL (var)
Signature · 1 line
2.4.10
Re: [PATCHv6] 03/28] build: use generated Kconfig options for Xen
xen/Makefile default: build · line 32
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Makefile +3
-0@@ -26,6 +26,9 @@ default: build .PHONY: dist dist: install +.PHONY: build +build:: $(BASEDIR)/include/config/auto.conf + .PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtags
I do not see why you need to add build to PHONY's dependencies another time.
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 238
Quoted 12 lines
xen/Makefile +2
-2@@ -227,9 +230,14 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ -$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd $(BASEDIR)/.config $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfig # Allow people to just run `make` as before and not force them to configure -$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; +$(BASEDIR)/.config: $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfig
This should be one of the oldconfig targets now, shouldn't it?
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 243
Quoted 4 lines
xen/Makefile +4
-0+# Break the dependency chain for the first run +$(BASEDIR)/include/config/auto.conf.cmd: ; + +-include $(BASEDIR)/include/config/auto.conf.cmd
The comment is quite a bit different in Linux, and seems to make more sense. Also note how Linux has an empty rule for $(KCONFIG_CONFIG), a variable which iirc you defined in an earlier patch and hence perhaps you should be using here.
xen/include/xen/config.h line 15
Quoted 7 lines
xen/include/xen/config.h +1
-0@@ -12,6 +12,8 @@#endif #include <asm/config.h> +#include <generated/autoconf.h>
First thing perhaps?
Jan
Re: [PATCHv6] 03/28] build: use generated Kconfig options for Xen
Quoted 23 lines · Jan Beulich
xen/Makefile default: build · line 32
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Makefile +3
-0@@ -26,6 +26,9 @@ default: build .PHONY: dist dist: install +.PHONY: build +build:: $(BASEDIR)/include/config/auto.conf + .PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtagsI do not see why you need to add build to PHONY's dependencies another time.
Quoted 8 lines
xen/Makefile +1
-1@@ -227,9 +230,14 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ -$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd $(BASEDIR)/.config $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfig
Quoted 6 lines
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 238
Quoted 4 lines
xen/Makefile +1
-1# Allow people to just run `make` as before and not force them to configure -$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; +$(BASEDIR)/.config: $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfigThis should be one of the oldconfig targets now, shouldn't it?
oldconfig uses .config. This is the case when the user has checked out the tree fresh. Its there to not change the workflow of "git clone ... && cd xen/xen && make"
Quoted 10 lines
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 243
Quoted 5 lines
xen/Makefile +4
-0+# Break the dependency chain for the first run +$(BASEDIR)/include/config/auto.conf.cmd: ; + +-include $(BASEDIR)/include/config/auto.conf.cmdThe comment is quite a bit different in Linux, and seems to make more sense. Also note how Linux has an empty rule for $(KCONFIG_CONFIG), a variable which iirc you defined in an earlier patch and hence perhaps you should be using here.
I don't see where that's defined.
Quoted 7 lines
Quoted 7 lines
xen/include/xen/config.h +0
-0@@ -12,6 +12,8 @@#endif #include <asm/config.h>
Quoted 6 lines
xen/include/xen/config.h line 15
Quoted 1 line
xen/include/xen/config.h +1
-0+#include <generated/autoconf.h> First thing perhaps?
Jan
Done.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 03/28] build: use generated Kconfig options for Xen
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 08.12.15 at 20:53, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Makefile +1
-1@@ -227,9 +230,14 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ -$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd $(BASEDIR)/.config $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfigQuoted 6 lines
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 238
Quoted 4 lines
xen/Makefile +1
-1# Allow people to just run `make` as before and not force them to configure -$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; +$(BASEDIR)/.config: $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfigThis should be one of the oldconfig targets now, shouldn't it?
Quoted 3 lines
oldconfig uses .config. This is the case when the user has checked out the tree fresh. Its there to not change the workflow of "git clone ... && cd xen/xen && make"
Okay. But then this is meant to only support the simplest possible form, i.e. without honoring any make command line or ./.config overrides like debug=y or kexec=n? If that understanding of mine is correct, at least the comment should mention such a limitation (even better would be if in such cases unexpected results would be prevented by - as the most trivial solution - failing the build with a meaningful error message).
Quoted 11 lines
Quoted 9 lines
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 243
Quoted 4 lines
xen/Makefile +4
-0+# Break the dependency chain for the first run +$(BASEDIR)/include/config/auto.conf.cmd: ; + +-include $(BASEDIR)/include/config/auto.conf.cmdThe comment is quite a bit different in Linux, and seems to make more sense. Also note how Linux has an empty rule for $(KCONFIG_CONFIG), a variable which iirc you defined in an earlier patch and hence perhaps you should be using here.
I don't see where that's defined.
"That" may have multiple meanings in this context. The empty rule is in ./Makefile:
# To avoid any implicit rule to kick in, define an empty command $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
And if I was wrong with seeing you define KCONFIG_CONFIG somewhere, it would kind of imply that you probably should be inheriting this level of abstraction from Linux.
Jan
Re: [PATCHv6] 03/28] build: use generated Kconfig options for Xen
Quoted 22 lines · Jan Beulich
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 08.12.15 at 20:53, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Makefile +1
-1@@ -227,9 +230,14 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ -$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd $(BASEDIR)/.config $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfigQuoted 6 lines
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 238
Quoted 4 lines
xen/Makefile +1
-1# Allow people to just run `make` as before and not force them to configure -$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; +$(BASEDIR)/.config: $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfigThis should be one of the oldconfig targets now, shouldn't it?
Quoted 3 lines
oldconfig uses .config. This is the case when the user has checked out the tree fresh. Its there to not change the workflow of "git clone ... && cd xen/xen && make"
Quoted 7 lines
Okay. But then this is meant to only support the simplest possible form, i.e. without honoring any make command line or ./.config overrides like debug=y or kexec=n? If that understanding of mine is correct, at least the comment should mention such a limitation (even better would be if in such cases unexpected results would be prevented by - as the most trivial solution - failing the build with a meaningful error message).
So you would like me to add code into xen/Makefile to detect if someone ran "make kexec=X" or added "kexec=X" into top level .config and give them a meaningful error message to tell them to use "make config" instead?
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 243
Quoted 5 lines
xen/Makefile +4
-0+# Break the dependency chain for the first run +$(BASEDIR)/include/config/auto.conf.cmd: ; + +-include $(BASEDIR)/include/config/auto.conf.cmdThe comment is quite a bit different in Linux, and seems to make more sense. Also note how Linux has an empty rule for $(KCONFIG_CONFIG), a variable which iirc you defined in an earlier patch and hence perhaps you should be using here.
Quoted 4 lines
Quoted 1 line
I don't see where that's defined.
"That" may have multiple meanings in this context. The empty rule is in ./Makefile:
"That" was KCONFIG_CONFIG. Which was not anywhere in this patchset and was always .config.
Quoted 10 lines
# To avoid any implicit rule to kick in, define an empty command $(KCONFIG_CONFIG)
include/config/auto.conf.cmd: ;And if I was wrong with seeing you define
KCONFIG_CONFIGsomewhere, it would kind of imply that you probably should be inheriting this level of abstraction from Linux.Jan
Ok. I'll add a variable called KCONFIG_CONFIG. It'll default to .config. Arguably someone can override "make menuconfig KCONFIG_CONFIG=/some/place/I/stored/my/config" in Linux which they call "Load Alternate Config". Googling searching doesn't show this is a commonly used option/behavior since people usually copy their .config in.
The other places this variable matters are in the building of the dependencies in kbuild but Xen doesn't use kbuild.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 03/28] build: use generated Kconfig options for Xen
Quoted 31 lines · Doug Goldstein
Quoted 22 lines · Jan Beulich
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 08.12.15 at 20:53, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Makefile +1
-1@@ -227,9 +230,14 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ -$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd $(BASEDIR)/.config $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfigQuoted 6 lines
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 238
Quoted 4 lines
xen/Makefile +1
-1# Allow people to just run `make` as before and not force them to configure -$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; +$(BASEDIR)/.config: $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfigThis should be one of the oldconfig targets now, shouldn't it?
Quoted 3 lines
oldconfig uses .config. This is the case when the user has checked out the tree fresh. Its there to not change the workflow of "git clone ... && cd xen/xen && make"
Quoted 7 lines
Okay. But then this is meant to only support the simplest possible form, i.e. without honoring any make command line or ./.config overrides like debug=y or kexec=n? If that understanding of mine is correct, at least the comment should mention such a limitation (even better would be if in such cases unexpected results would be prevented by - as the most trivial solution - failing the build with a meaningful error message).
Quoted 3 lines
So you would like me to add code into xen/Makefile to detect if someone ran "make kexec=X" or added "kexec=X" into top level .config and give them a meaningful error message to tell them to use "make config" instead?
So I need to clarify here. If you do want this, then do you have a suggestion how I can detect when someone uses the .config file to override this? $(origin) returns the same value for me in that case. For "make kexec=n" I can detect that with $(origin).
Quoted 40 lines
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 243
Quoted 6 lines
xen/Makefile +4
-0+# Break the dependency chain for the first run +$(BASEDIR)/include/config/auto.conf.cmd: ; + +-include $(BASEDIR)/include/config/auto.conf.cmdThe comment is quite a bit different in Linux, and seems to make more sense. Also note how Linux has an empty rule for $(KCONFIG_CONFIG), a variable which iirc you defined in an earlier patch and hence perhaps you should be using here.
Quoted 4 lines
Quoted 1 line
I don't see where that's defined.
"That" may have multiple meanings in this context. The empty rule is in ./Makefile:
"That" was
KCONFIG_CONFIG. Which was not anywhere in this patchset and was always .config.Quoted 10 lines
# To avoid any implicit rule to kick in, define an empty command $(KCONFIG_CONFIG)
include/config/auto.conf.cmd: ;And if I was wrong with seeing you define
KCONFIG_CONFIGsomewhere, it would kind of imply that you probably should be inheriting this level of abstraction from Linux.Jan
Ok. I'll add a variable called
KCONFIG_CONFIG. It'll default to .config. Arguably someone can override "make menuconfig KCONFIG_CONFIG=/some/place/I/stored/my/config" in Linux which they call "Load Alternate Config". Googling searching doesn't show this is a commonly used option/behavior since people usually copy their .config in.The other places this variable matters are in the building of the dependencies in kbuild but Xen doesn't use kbuild.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 03/28] build: use generated Kconfig options for Xen
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 09.12.15 at 21:53, <[email protected]> wrote:
Quoted 3 lines · Doug Goldstein
So you would like me to add code into xen/Makefile to detect if someone ran "make kexec=X" or added "kexec=X" into top level .config and give them a meaningful error message to tell them to use "make config" instead?
So I need to clarify here. If you do want this, then do you have a suggestion how I can detect when someone uses the .config file to override this? $(origin) returns the same value for me in that case. For "make kexec=n" I can detect that with $(origin).
Well, it would seem to me that checking for just the non-default case would be sufficient, i.e. without any $(origin ...), but just looking at the values.
Jan
Re: [PATCHv6] 03/28] build: use generated Kconfig options for Xen
In reply to Doug GoldsteinQuoted 32 lines
Quoted 1 line
Quoted 1 line · On 09.12.15 at 21:34, <[email protected]> wrote:
Quoted 22 lines · Jan Beulich
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 08.12.15 at 20:53, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/Makefile +1
-1@@ -227,9 +230,14 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) $@ -$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd +$(BASEDIR)/include/config/%.conf: $(BASEDIR)/include/config/auto.conf.cmd $(BASEDIR)/.config $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) silentoldconfigQuoted 6 lines
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 238
Quoted 4 lines
xen/Makefile +1
-1# Allow people to just run `make` as before and not force them to configure -$(BASEDIR)/.config $(BASEDIR)/include/config/auto.conf.cmd: ; +$(BASEDIR)/.config: $(Q)$(MAKE) -f $(BASEDIR)/scripts/kconfig/Makefile ARCH=$(XEN_TARGET_ARCH) defconfigThis should be one of the oldconfig targets now, shouldn't it?
Quoted 3 lines
oldconfig uses .config. This is the case when the user has checked out the tree fresh. Its there to not change the workflow of "git clone ... && cd xen/xen && make"
Quoted 7 lines
Okay. But then this is meant to only support the simplest possible form, i.e. without honoring any make command line or ./.config overrides like debug=y or kexec=n? If that understanding of mine is correct, at least the comment should mention such a limitation (even better would be if in such cases unexpected results would be prevented by - as the most trivial solution - failing the build with a meaningful error message).
Quoted 3 lines
So you would like me to add code into xen/Makefile to detect if someone ran "make kexec=X" or added "kexec=X" into top level .config and give them a meaningful error message to tell them to use "make config" instead?
If you want to do the "(even better ...)" form, yes.
Jan
PATCH v6 1/1 04/28] build: convert HAS_PASSTHROUGH use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated HAS_PASSTHROUGH defines for the code base.
--- xen/Rules.mk | 1 - xen/arch/arm/Kconfig | 1 + xen/arch/arm/Rules.mk | 1 - xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/common/compat/memory.c | 4 ++-- xen/common/memory.c | 8 ++++---- xen/drivers/Kconfig | 1 + xen/drivers/Makefile | 2 +- xen/drivers/passthrough/Kconfig | 4 ++++ xen/include/xen/sched.h | 4 ++-- xen/include/xsm/dummy.h | 8 ++++---- xen/include/xsm/xsm.h | 12 ++++++------ xen/xsm/dummy.c | 4 ++-- xen/xsm/flask/hooks.c | 14 +++++++------- 15 files changed, 35 insertions(+), 31 deletions(-) create mode 100644 xen/drivers/passthrough/Kconfig
xen/Rules.mk +0 -1
@@ -58,7 +58,6 @@ CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_ACPI) += -DHAS_ACPI CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX -CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH CFLAGS-$(HAS_DEVICE_TREE) += -DHAS_DEVICE_TREE CFLAGS-$(HAS_MEM_ACCESS) += -DHAS_MEM_ACCESS CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING
xen/arch/arm/Kconfig +1 -0
@@ -16,6 +16,7 @@ config ARM_64 config ARM def_bool y + select HAS_PASSTHROUGH config ARCH_DEFCONFIG string
xen/arch/arm/Rules.mk +0 -1
@@ -9,7 +9,6 @@ HAS_DEVICE_TREE := y HAS_VIDEO := y HAS_ARM_HDLCD := y -HAS_PASSTHROUGH := y HAS_PDX := y CFLAGS += -I$(BASEDIR)/include
xen/arch/x86/Kconfig +1 -0
@@ -3,6 +3,7 @@ config X86_64 config X86 def_bool y + select HAS_PASSTHROUGH select HAS_GDBSX config ARCH_DEFCONFIG
xen/arch/x86/Rules.mk +0 -1
@@ -8,7 +8,6 @@ HAS_VGA := y HAS_VIDEO := y HAS_CPUFREQ := y HAS_PCI := y -HAS_PASSTHROUGH := y HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y
xen/common/compat/memory.c +2 -2
@@ -18,7 +18,7 @@ CHECK_TYPE(domid); CHECK_mem_access_op; CHECK_vmemrange; -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH struct get_reserved_device_memory { struct compat_reserved_device_memory_map map; unsigned int used_entries;
@@ -340,7 +340,7 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)break ; } -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH case XENMEM_reserved_device_memory_map: {struct get_reserved_device_memory grdm;
xen/common/memory.c +4 -4
@@ -610,7 +610,7 @@ static int xenmem_add_to_physmap(struct domain *d, xatp->gpfn += start; xatp->size -= start; -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH if (need_iommu (d) )this_cpu (iommu_dont_flush_iotlb) =1 ;#endif
@@ -633,7 +633,7 @@ static int xenmem_add_to_physmap(struct domain *d, } } -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH if (need_iommu (d) ) {this_cpu (iommu_dont_flush_iotlb) =0 ;
@@ -760,7 +760,7 @@ static int construct_memop_from_reservation(return 0 ; } -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH struct get_reserved_device_memory { struct xen_reserved_device_memory_map map; unsigned int used_entries;
@@ -1204,7 +1204,7 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)break ; } -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH case XENMEM_reserved_device_memory_map: {struct get_reserved_device_memory grdm;
xen/drivers/Kconfig +1 -0
@@ -1,3 +1,4 @@ menu "Device Drivers" +source "drivers/passthrough/Kconfig" endmenu
xen/drivers/Makefile +1 -1
@@ -1,6 +1,6 @@ subdir-y += char subdir-$(HAS_CPUFREQ) += cpufreq subdir-$(HAS_PCI) += pci -subdir-$(HAS_PASSTHROUGH) += passthrough +subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough subdir-$(HAS_ACPI) += acpi subdir-$(HAS_VIDEO) += video
xen/drivers/passthrough/Kconfig new file +4 -0
@@ -0,0 +1,4 @@ + +# Select HAS_PASSTHROUGH if PCI pass through is supported +config HAS_PASSTHROUGH + bool
xen/include/xen/sched.h +2 -2
@@ -366,7 +366,7 @@ struct domainint64_t time_offset_seconds; -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH /* Does this guest need iommu mappings (-1 meaning "being set up")? */ s8 need_iommu;#endif
@@ -839,7 +839,7 @@ void watchdog_domain_destroy(struct domain *d);#define has_hvm_container_vcpu (v) (has_hvm_container_domain((v)->domain))#define is_pinned_vcpu (v) ((v)->domain->is_pinned || \ cpumask_weight((v)->cpu_hard_affinity) == 1) -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH #define need_iommu (d) ((d)->need_iommu)#else #define need_iommu (d) (0)
xen/include/xsm/dummy.h +4 -4
@@ -323,7 +323,7 @@ static XSM_INLINE int xsm_get_vnumainfo(XSM_DEFAULT_ARG struct domain *d)return xsm_default_action (action, current->domain, d); } -#if defined(HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI ) static XSM_INLINE int xsm_get_device_group(XSM_DEFAULT_ARG uint32_t machine_bdf) {XSM_ASSERT_ACTION (XSM_HOOK );
@@ -348,9 +348,9 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uintreturn xsm_default_action (action, current->domain, d); } -#endif /* HAS_PASSTHROUGH && HAS_PCI */ +#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */ -#if defined(HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) static XSM_INLINE int xsm_test_assign_dtdevice(XSM_DEFAULT_ARG const char *dtpath) {XSM_ASSERT_ACTION (XSM_HOOK );
@@ -371,7 +371,7 @@ static XSM_INLINE int xsm_deassign_dtdevice(XSM_DEFAULT_ARG struct domain *d,return xsm_default_action (action, current->domain, d); } -#endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE */ +#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */ static XSM_INLINE int xsm_resource_plug_core(XSM_DEFAULT_VOID) {
xen/include/xsm/xsm.h +6 -6
@@ -114,14 +114,14 @@ struct xsm_operations {int (*iomem_mapping) (struct domain *d,uint64_t s,uint64_t e,uint8_t allow);int (*pci_config_permission) (struct domain *d,uint32_t machine_bdf,uint16_t start,uint16_t end,uint8_t access); -#if defined(HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI )int (*get_device_group) (uint32_t machine_bdf);int (*test_assign_device) (uint32_t machine_bdf);int (*assign_device) (struct domain *d,uint32_t machine_bdf);int (*deassign_device) (struct domain *d,uint32_t machine_bdf);#endif -#if defined(HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE )int (*test_assign_dtdevice) (const char *dtpath);int (*assign_dtdevice) (struct domain *d,const char *dtpath);int (*deassign_dtdevice) (struct domain *d,const char *dtpath);
@@ -468,7 +468,7 @@ static inline int xsm_pci_config_permission (xsm_default_t def, struct domain *dreturn xsm_ops->pci_config_permission (d, machine_bdf, start, end, access); } -#if defined(HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI )static inline int xsm_get_device_group (xsm_default_t def,uint32_t machine_bdf) {return xsm_ops->get_device_group (machine_bdf);
@@ -488,9 +488,9 @@ static inline int xsm_deassign_device(xsm_default_t def, struct domain *d, uint3 {return xsm_ops->deassign_device (d, machine_bdf); } -#endif /* HAS_PASSTHROUGH && HAS_PCI) */ +#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI) */ -#if defined(HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE )static inline int xsm_assign_dtdevice (xsm_default_t def,struct domain *d,const char *dtpath) {
@@ -509,7 +509,7 @@ static inline int xsm_deassign_dtdevice(xsm_default_t def, struct domain *d, return xsm_ops->deassign_dtdevice(d, dtpath); } -#endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE */ +#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */ static inline int xsm_resource_plug_pci (xsm_default_t def,uint32_t machine_bdf) {
xen/xsm/dummy.c +2 -2
@@ -89,14 +89,14 @@ void xsm_fixup_ops (struct xsm_operations *ops)set_to_dummy_if_null (ops, pci_config_permission);set_to_dummy_if_null (ops, get_vnumainfo); -#if defined(HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI )set_to_dummy_if_null (ops, get_device_group);set_to_dummy_if_null (ops, test_assign_device);set_to_dummy_if_null (ops, assign_device);set_to_dummy_if_null (ops, deassign_device);#endif -#if defined(HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE )set_to_dummy_if_null (ops, test_assign_dtdevice);set_to_dummy_if_null (ops, assign_dtdevice);set_to_dummy_if_null (ops, deassign_dtdevice);
xen/xsm/flask/hooks.c +7 -7
@@ -588,7 +588,7 @@ static int flask_domctl(struct domain *d, int cmd)case XEN_DOMCTL_ioport_permission:case XEN_DOMCTL_ioport_mapping:#endif -#ifdef HAS_PASSTHROUGH +#ifdef CONFIG_HAS_PASSTHROUGH /* * These have individual XSM hooks * (drivers/passthrough/{pci,device_tree.c)
@@ -1213,7 +1213,7 @@ static int flask_mem_sharing(struct domain *d) }#endif -#if defined(HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI )static int flask_get_device_group (uint32_t machine_bdf) {u32 rsid;
@@ -1277,9 +1277,9 @@ static int flask_deassign_device(struct domain *d, uint32_t machine_bdf)return avc_current_has_perm (rsid,SECCLASS_RESOURCE ,RESOURCE__REMOVE_DEVICE ,NULL ); } -#endif /* HAS_PASSTHROUGH && HAS_PCI */ +#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */ -#if defined(HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE )static int flask_test_assign_dtdevice (const char *dtpath) {u32 rsid;
@@ -1333,7 +1333,7 @@ static int flask_deassign_dtdevice(struct domain *d, const char *dtpath)return avc_current_has_perm (rsid,SECCLASS_RESOURCE ,RESOURCE__REMOVE_DEVICE , NULL); } -#endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE */ +#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */ #ifdef CONFIG_X86 static int flask_do_mca (void )
@@ -1725,14 +1725,14 @@ static struct xsm_operations flask_ops = { .remove_from_physmap = flask_remove_from_physmap, .map_gmfn_foreign = flask_map_gmfn_foreign, -#if defined(HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI ) .get_device_group = flask_get_device_group, .test_assign_device = flask_test_assign_device, .assign_device = flask_assign_device, .deassign_device = flask_deassign_device,#endif -#if defined(HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) .test_assign_dtdevice = flask_test_assign_dtdevice, .assign_dtdevice = flask_assign_dtdevice, .deassign_dtdevice = flask_deassign_dtdevice,
Signature · 1 line
2.4.10
Re: [PATCHv6] 04/28] build: convert HAS_PASSTHROUGH use to Kconfig
xen/arch/x86/Kconfig config X86_64 · line 7
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/arch/x86/Kconfig +1
-0@@ -3,6 +3,7 @@ config X86_64 config X86 def_bool y + select HAS_PASSTHROUGH select HAS_GDBSX
Please get these sorted alphabetically from the beginning.
xen/drivers/passthrough/Kconfig line 4
Quoted 7 lines
xen/drivers/passthrough/Kconfig new file +4
-0@@ -0,0 +1,4 @@ + +# Select HAS_PASSTHROUGH if PCI pass through is supported +config HAS_PASSTHROUGH + bool
s/PCI/device/ in the comment please.
xen/drivers/passthrough/Kconfig static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint · line 351
Quoted 6 lines
xen/drivers/passthrough/Kconfig new file +1
-1@@ -348,9 +348,9 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint return xsm_default_action(action, current->domain, d); } -#endif /* HAS_PASSTHROUGH && HAS_PCI */ +#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */
I don't think fiddling with trailing comments like this one is really useful - the connection is clear also without CONFIG_ prefix.
Jan
Re: [PATCHv6] 04/28] build: convert HAS_PASSTHROUGH use to Kconfig
Quoted 26 lines · Jan Beulich
xen/arch/x86/Kconfig config X86_64 · line 7
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/arch/x86/Kconfig +1
-0@@ -3,6 +3,7 @@ config X86_64 config X86 def_bool y + select HAS_PASSTHROUGH select HAS_GDBSXPlease get these sorted alphabetically from the beginning.
xen/drivers/passthrough/Kconfig line 4
Quoted 7 lines
xen/drivers/passthrough/Kconfig new file +4
-0@@ -0,0 +1,4 @@ + +# Select HAS_PASSTHROUGH if PCI pass through is supported +config HAS_PASSTHROUGH + bools/PCI/device/ in the comment please.
Quoted 4 lines
xen/drivers/passthrough/Kconfig new file +0
-0@@ -348,9 +348,9 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint return xsm_default_action(action, current->domain, d); }
Quoted 8 lines
xen/drivers/passthrough/Kconfig static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint · line 351
Quoted 2 lines
xen/drivers/passthrough/Kconfig new file +1
-1-#endif /* HAS_PASSTHROUGH && HAS_PCI */ +#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */I don't think fiddling with trailing comments like this one is really useful - the connection is clear also without
CONFIG_prefix.Jan
Most of this series was mechanical early on (e.g. sed). I can selectively undo updating the comments if that's desirable.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 04/28] build: convert HAS_PASSTHROUGH use to Kconfig
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:36, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/include/xsm/dummy.h +0
-0@@ -348,9 +348,9 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uintreturn xsm_default_action (action, current->domain, d); }
Quoted 8 lines
Quoted 5 lines
Review static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint · line 351
Quoted 2 lines
(quoted diff) +1
-1-#endif /* HAS_PASSTHROUGH && HAS_PCI */ +#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */I don't think fiddling with trailing comments like this one is really useful - the connection is clear also without
CONFIG_prefix.Most of this series was mechanical early on (e.g. sed). I can selectively undo updating the comments if that's desirable.
While I agree this makes it more work for you, it would certainly ease review (simply by shrinking the amount of changes to look at).
Jan
PATCH v6 1/1 05/28] build: convert HAS_DEVICE_TREE use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_DEVICE_TREE defines in the code base.
--- xen/Rules.mk | 1 - xen/arch/arm/Kconfig | 1 + xen/arch/arm/Rules.mk | 1 - xen/common/Kconfig | 4 ++++ xen/common/Makefile | 4 ++-- xen/drivers/char/ns16550.c | 6 +++--- xen/drivers/passthrough/Makefile | 2 +- xen/drivers/passthrough/iommu.c | 2 +- xen/include/asm-arm/device.h | 2 +- xen/include/xen/hvm/iommu.h | 2 +- xen/include/xen/iommu.h | 4 ++-- xen/include/xsm/dummy.h | 4 ++-- xen/include/xsm/xsm.h | 10 +++++----- xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 6 +++--- xen/xsm/xsm_core.c | 2 +- xen/xsm/xsm_policy.c | 4 ++-- 17 files changed, 30 insertions(+), 27 deletions(-)
xen/Rules.mk +0 -1
@@ -58,7 +58,6 @@ CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_ACPI) += -DHAS_ACPI CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX -CFLAGS-$(HAS_DEVICE_TREE) += -DHAS_DEVICE_TREE CFLAGS-$(HAS_MEM_ACCESS) += -DHAS_MEM_ACCESS CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
xen/arch/arm/Kconfig +1 -0
@@ -16,6 +16,7 @@ config ARM_64 config ARM def_bool y + select HAS_DEVICE_TREE select HAS_PASSTHROUGH config ARCH_DEFCONFIG
xen/arch/arm/Rules.mk +0 -1
@@ -6,7 +6,6 @@ # 'make clean' before rebuilding. # -HAS_DEVICE_TREE := y HAS_VIDEO := y HAS_ARM_HDLCD := y HAS_PDX := y
xen/common/Kconfig +4 -0
@@ -1,4 +1,8 @@ menu "Common Features" +# Select HAS_DEVICE_TREE if device tree is supported +config HAS_DEVICE_TREE + bool + endmenu
xen/common/Makefile +2 -2
@@ -2,7 +2,7 @@ obj-y += bitmap.o obj-$(HAS_CORE_PARKING) += core_parking.o obj-y += cpu.o obj-y += cpupool.o -obj-$(HAS_DEVICE_TREE) += device_tree.o +obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o obj-y += domctl.o obj-y += domain.o obj-y += event_2l.o
@@ -70,4 +70,4 @@ subdir-$(x86_64) += hvm subdir-$(coverage) += gcov subdir-y += libelf -subdir-$(HAS_DEVICE_TREE) += libfdt +subdir-$(CONFIG_HAS_DEVICE_TREE) += libfdt
xen/drivers/char/ns16550.c +3 -3
@@ -24,7 +24,7 @@#include <xen/8250-uart.h> #include <xen/vmap.h> #include <asm/io.h> -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE #include <asm/device.h> #endif #ifdef CONFIG_X86
@@ -1131,7 +1131,7 @@ void __init ns16550_init(int index, struct ns16550_defaults *defaults)ns16550_parse_port_config (uart, (index ==0 ) ? opt_com1 : opt_com2); } -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE static int __init ns16550_uart_dt_init (struct dt_device_node *dev,const void *data) {
@@ -1206,7 +1206,7 @@ DT_DEVICE_START(ns16550, "NS16550 UART", DEVICE_SERIAL) .init = ns16550_uart_dt_init, DT_DEVICE_END -#endif /* HAS_DEVICE_TREE */ +#endif /* CONFIG_HAS_DEVICE_TREE */ /* * Local variables: * mode: C
xen/drivers/passthrough/Makefile +1 -1
@@ -6,4 +6,4 @@ subdir-$(arm) += arm obj-y += iommu.o obj-$(x86) += io.o obj-$(HAS_PCI) += pci.o -obj-$(HAS_DEVICE_TREE) += device_tree.o +obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o
xen/drivers/passthrough/iommu.c +1 -1
@@ -357,7 +357,7 @@ int iommu_do_domctl( ret =iommu_do_pci_domctl (domctl, d, u_domctl);#endif -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE if ( ret == -ENODEV ) ret =iommu_do_dt_domctl (domctl, d, u_domctl);#endif
xen/include/asm-arm/device.h +1 -1
@@ -16,7 +16,7 @@ struct dev_archdata {struct device {enum device_type type; -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE struct dt_device_node *of_node;/* Used by drivers imported from Linux */ #endif struct dev_archdata archdata;
xen/include/xen/hvm/iommu.h +1 -1
@@ -29,7 +29,7 @@ struct hvm_iommu {/* iommu_ops */ const struct iommu_ops *platform_ops; -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE /* List of DT devices assigned to this domain */ struct list_head dt_devices;#endif
xen/include/xen/iommu.h +2 -2
@@ -109,7 +109,7 @@ void iommu_read_msi_from_ire(struct msi_desc *msi_desc, struct msi_msg *msg);#define PT_IRQ_TIME_OUT MILLISECS(8)#endif /* HAS_PCI */ -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE #include <xen/device_tree.h> int iommu_assign_dt_device (struct domain *d,struct dt_device_node *dev);
@@ -120,7 +120,7 @@ int iommu_release_dt_devices(struct domain *d);int iommu_do_dt_domctl (struct xen_domctl *,struct domain *,XEN_GUEST_HANDLE_PARAM (xen_domctl_t )); -#endif /* HAS_DEVICE_TREE */ +#endif /* CONFIG_HAS_DEVICE_TREE */ struct page_info ;
xen/include/xsm/dummy.h +2 -2
@@ -350,7 +350,7 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */ -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_DEVICE_TREE ) static XSM_INLINE int xsm_test_assign_dtdevice(XSM_DEFAULT_ARG const char *dtpath) {XSM_ASSERT_ACTION (XSM_HOOK );
@@ -371,7 +371,7 @@ static XSM_INLINE int xsm_deassign_dtdevice(XSM_DEFAULT_ARG struct domain *d,return xsm_default_action (action, current->domain, d); } -#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */ +#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_DEVICE_TREE */ static XSM_INLINE int xsm_resource_plug_core(XSM_DEFAULT_VOID) {
xen/include/xsm/xsm.h +5 -5
@@ -121,7 +121,7 @@ struct xsm_operations {int (*deassign_device) (struct domain *d,uint32_t machine_bdf);#endif -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_DEVICE_TREE )int (*test_assign_dtdevice) (const char *dtpath);int (*assign_dtdevice) (struct domain *d,const char *dtpath);int (*deassign_dtdevice) (struct domain *d,const char *dtpath);
@@ -490,7 +490,7 @@ static inline int xsm_deassign_device(xsm_default_t def, struct domain *d, uint3 }#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI) */ -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_DEVICE_TREE )static inline int xsm_assign_dtdevice (xsm_default_t def,struct domain *d,const char *dtpath) {
@@ -509,7 +509,7 @@ static inline int xsm_deassign_dtdevice(xsm_default_t def, struct domain *d, return xsm_ops->deassign_dtdevice(d, dtpath); } -#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */ +#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_DEVICE_TREE */ static inline int xsm_resource_plug_pci (xsm_default_t def,uint32_t machine_bdf) {
@@ -740,7 +740,7 @@ extern int xsm_multiboot_policy_init(unsigned long *module_map, void *(*bootstrap_map)(const module_t *));#endif -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE extern int xsm_dt_init (void );extern int xsm_dt_policy_init (void );#endif
@@ -764,7 +764,7 @@ static inline int xsm_multiboot_init (unsigned long *module_map, }#endif -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE static inline int xsm_dt_init (void ) {return 0 ;
xen/xsm/dummy.c +1 -1
@@ -96,7 +96,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)set_to_dummy_if_null (ops, deassign_device);#endif -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_DEVICE_TREE )set_to_dummy_if_null (ops, test_assign_dtdevice);set_to_dummy_if_null (ops, assign_dtdevice);set_to_dummy_if_null (ops, deassign_dtdevice);
xen/xsm/flask/hooks.c +3 -3
@@ -1279,7 +1279,7 @@ static int flask_deassign_device(struct domain *d, uint32_t machine_bdf) }#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */ -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_DEVICE_TREE )static int flask_test_assign_dtdevice (const char *dtpath) {u32 rsid;
@@ -1333,7 +1333,7 @@ static int flask_deassign_dtdevice(struct domain *d, const char *dtpath)return avc_current_has_perm (rsid,SECCLASS_RESOURCE ,RESOURCE__REMOVE_DEVICE , NULL); } -#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */ +#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_DEVICE_TREE */ #ifdef CONFIG_X86 static int flask_do_mca (void )
@@ -1732,7 +1732,7 @@ static struct xsm_operations flask_ops = { .deassign_device = flask_deassign_device,#endif -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_DEVICE_TREE ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_DEVICE_TREE ) .test_assign_dtdevice = flask_test_assign_dtdevice, .assign_dtdevice = flask_assign_dtdevice, .deassign_dtdevice = flask_deassign_dtdevice,
xen/xsm/xsm_core.c +1 -1
@@ -85,7 +85,7 @@ int __init xsm_multiboot_init(unsigned long *module_map, }#endif -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE int __init xsm_dt_init (void ) {int ret =0 ;
xen/xsm/xsm_policy.c +2 -2
@@ -23,7 +23,7 @@#include <xen/multiboot.h> #endif #include <xen/bitops.h> -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE # include <asm/setup.h> # include <xen/device_tree.h> #endif
@@ -74,7 +74,7 @@ int __init xsm_multiboot_policy_init(unsigned long *module_map, }#endif -#ifdef HAS_DEVICE_TREE +#ifdef CONFIG_HAS_DEVICE_TREE int __init xsm_dt_policy_init (void ) {struct bootmodule *mod =boot_module_find_by_kind (BOOTMOD_XSM );
Signature · 1 line
2.4.10
PATCH v6 1/1 06/28] build: convert HAS_PCI use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_PCI defines in the code base.
--- xen/Rules.mk | 1 - xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/common/sysctl.c | 2 +- xen/drivers/Kconfig | 3 +++ xen/drivers/Makefile | 2 +- xen/drivers/char/ns16550.c | 24 ++++++++++++------------ xen/drivers/passthrough/Makefile | 2 +- xen/drivers/passthrough/iommu.c | 2 +- xen/drivers/pci/Kconfig | 4 ++++ xen/include/xen/iommu.h | 10 +++++----- xen/include/xsm/dummy.h | 4 ++-- xen/include/xsm/xsm.h | 6 +++--- xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 14 +++++++------- 15 files changed, 42 insertions(+), 36 deletions(-) create mode 100644 xen/drivers/pci/Kconfig
xen/Rules.mk +0 -1
@@ -61,7 +61,6 @@ CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_MEM_ACCESS) += -DHAS_MEM_ACCESS CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING -CFLAGS-$(HAS_PCI) += -DHAS_PCI CFLAGS-$(HAS_IOPORTS) += -DHAS_IOPORTS CFLAGS-$(HAS_PDX) += -DHAS_PDX CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
xen/arch/x86/Kconfig +1 -0
@@ -4,6 +4,7 @@ config X86_64 config X86 def_bool y select HAS_PASSTHROUGH + select HAS_PCI select HAS_GDBSX config ARCH_DEFCONFIG
xen/arch/x86/Rules.mk +0 -1
@@ -7,7 +7,6 @@ HAS_NUMA := y HAS_VGA := y HAS_VIDEO := y HAS_CPUFREQ := y -HAS_PCI := y HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y
xen/common/sysctl.c +1 -1
@@ -401,7 +401,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)break ;#endif -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI case XEN_SYSCTL_pcitopoinfo: {xen_sysctl_pcitopoinfo_t *ti = &op->u.pcitopoinfo;
xen/drivers/Kconfig +3 -0
@@ -1,4 +1,7 @@ menu "Device Drivers" source "drivers/passthrough/Kconfig" + +source "drivers/pci/Kconfig" + endmenu
xen/drivers/Makefile +1 -1
@@ -1,6 +1,6 @@ subdir-y += char subdir-$(HAS_CPUFREQ) += cpufreq -subdir-$(HAS_PCI) += pci +subdir-$(CONFIG_HAS_PCI) += pci subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough subdir-$(HAS_ACPI) += acpi subdir-$(HAS_VIDEO) += video
xen/drivers/char/ns16550.c +12 -12
@@ -16,7 +16,7 @@#include <xen/timer.h> #include <xen/serial.h> #include <xen/iocap.h> -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI #include <xen/pci.h> #include <xen/pci_regs.h> #include <xen/pci_ids.h>
@@ -64,7 +64,7 @@ static struct ns16550 {unsigned int timeout_ms;bool_t intr_works;bool_t dw_usr_bsy; -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI /* PCI card parameters. */ bool_t pb_bdf_enable;/* if =1, pb-bdf effective, port behind bridge */ bool_t ps_bdf_enable;/* if =1, ps_bdf effective, port on pci card */
@@ -97,7 +97,7 @@ struct ns16550_config_param { }; -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI enum { param_default =0 , param_trumanage,
@@ -475,7 +475,7 @@ static int ns16550_getc(struct serial_port *port, char *pc)static void pci_serial_early_init (struct ns16550 *uart) { -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI if ( !uart->ps_bdf_enable || uart->io_base >=0x10000 )return ;
@@ -621,7 +621,7 @@ static void __init ns16550_init_postirq(struct serial_port *port)ns16550_setup_postirq (uart); -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI if ( uart->bar || uart->ps_bdf_enable ) {if ( !uart->enable_ro )
@@ -650,7 +650,7 @@ static void ns16550_suspend(struct serial_port *port)stop_timer (&uart->timer); -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI if ( uart->bar ) uart->cr =pci_conf_read16 (0 , uart->ps_bdf[0 ], uart->ps_bdf[1 ], uart->ps_bdf[2 ],PCI_COMMAND );
@@ -659,7 +659,7 @@ static void ns16550_suspend(struct serial_port *port)static void _ns16550_resume (struct serial_port *port) { -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI struct ns16550 *uart = port->uart;if ( uart->bar )
@@ -797,7 +797,7 @@ static int __init check_existence(struct ns16550 *uart)return 1 ;/* Everything is MMIO */ #endif -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI pci_serial_early_init (uart);#endif
@@ -828,7 +828,7 @@ static int __init check_existence(struct ns16550 *uart)return (status ==0x90 ); } -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI static int __init pci_uart_config (struct ns16550 *uart,bool_t skip_amt,unsigned int bar_idx) {
@@ -1030,7 +1030,7 @@ static void __init ns16550_parse_port_config(if ( *conf ==',' && *++conf !=',' ) { -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI if (strncmp (conf,"pci" ,3 ) ==0 ) {if (pci_uart_config (uart,1 /* skip AMT */ , uart - ns16550_com) )
@@ -1053,7 +1053,7 @@ static void __init ns16550_parse_port_config(if ( *conf ==',' && *++conf !=',' ) uart->irq =simple_strtol (conf, &conf,10 ); -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI if ( *conf ==',' && *++conf !=',' ) { conf = parse_pci(conf, NULL, &uart->ps_bdf[0],
@@ -1094,7 +1094,7 @@ static void ns16550_init_common(struct ns16550 *uart) { uart->clock_hz =UART_CLOCK_HZ ; -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI uart->enable_ro =0 ;#endif
xen/drivers/passthrough/Makefile +1 -1
@@ -5,5 +5,5 @@ subdir-$(arm) += arm obj-y += iommu.o obj-$(x86) += io.o -obj-$(HAS_PCI) += pci.o +obj-$(CONFIG_HAS_PCI) += pci.o obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o
xen/drivers/passthrough/iommu.c +1 -1
@@ -353,7 +353,7 @@ int iommu_do_domctl(if ( !iommu_enabled )return -ENOSYS ; -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI ret =iommu_do_pci_domctl (domctl, d, u_domctl);#endif
xen/drivers/pci/Kconfig new file +4 -0
@@ -0,0 +1,4 @@ + +# Select HAS_PCI if PCI is supported +config HAS_PCI + bool
xen/include/xen/iommu.h +5 -5
@@ -87,7 +87,7 @@ enum iommu_featurebool_t iommu_has_feature (struct domain *d,enum iommu_feature feature); -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI void pt_pci_init (void );struct pirq ;
@@ -107,7 +107,7 @@ int iommu_update_ire_from_msi(struct msi_desc *msi_desc, struct msi_msg *msg);void iommu_read_msi_from_ire (struct msi_desc *msi_desc,struct msi_msg *msg);#define PT_IRQ_TIME_OUT MILLISECS(8) -#endif /* HAS_PCI */ +#endif /* CONFIG_HAS_PCI */ #ifdef CONFIG_HAS_DEVICE_TREE #include <xen/device_tree.h>
@@ -141,11 +141,11 @@ struct iommu_ops {int (*assign_device)(struct domain *,u8 devfn,device_t *dev,u32 flag);int (*reassign_device)(struct domain *s,struct domain *t,u8 devfn,device_t *dev); -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI int (*get_device_group_id)(u16 seg,u8 bus,u8 devfn);int (*update_ire_from_msi)(struct msi_desc *msi_desc,struct msi_msg *msg);void (*read_msi_from_ire)(struct msi_desc *msi_desc,struct msi_msg *msg); -#endif /* HAS_PCI */ +#endif /* CONFIG_HAS_PCI */ void (*teardown)(struct domain *d); int (*map_page)(struct domain *d, unsigned long gfn, unsigned long mfn,
@@ -174,7 +174,7 @@ int iommu_get_reserved_device_memory(iommu_grdm_t *, void *);void iommu_share_p2m_table (struct domain *d); -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI int iommu_do_pci_domctl (struct xen_domctl *,struct domain *d,XEN_GUEST_HANDLE_PARAM (xen_domctl_t ));#endif
xen/include/xsm/dummy.h +2 -2
@@ -323,7 +323,7 @@ static XSM_INLINE int xsm_get_vnumainfo(XSM_DEFAULT_ARG struct domain *d)return xsm_default_action (action, current->domain, d); } -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_PCI ) static XSM_INLINE int xsm_get_device_group(XSM_DEFAULT_ARG uint32_t machine_bdf) {XSM_ASSERT_ACTION (XSM_HOOK );
@@ -348,7 +348,7 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uintreturn xsm_default_action (action, current->domain, d); } -#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */ +#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_PCI */ #if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_DEVICE_TREE ) static XSM_INLINE int xsm_test_assign_dtdevice(XSM_DEFAULT_ARG const char *dtpath)
xen/include/xsm/xsm.h +3 -3
@@ -114,7 +114,7 @@ struct xsm_operations {int (*iomem_mapping) (struct domain *d,uint64_t s,uint64_t e,uint8_t allow);int (*pci_config_permission) (struct domain *d,uint32_t machine_bdf,uint16_t start,uint16_t end,uint8_t access); -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_PCI )int (*get_device_group) (uint32_t machine_bdf);int (*test_assign_device) (uint32_t machine_bdf);int (*assign_device) (struct domain *d,uint32_t machine_bdf);
@@ -468,7 +468,7 @@ static inline int xsm_pci_config_permission (xsm_default_t def, struct domain *dreturn xsm_ops->pci_config_permission (d, machine_bdf, start, end, access); } -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_PCI )static inline int xsm_get_device_group (xsm_default_t def,uint32_t machine_bdf) {return xsm_ops->get_device_group (machine_bdf);
@@ -488,7 +488,7 @@ static inline int xsm_deassign_device(xsm_default_t def, struct domain *d, uint3 {return xsm_ops->deassign_device (d, machine_bdf); } -#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI) */ +#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_PCI) */ #if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_DEVICE_TREE ) static inline int xsm_assign_dtdevice(xsm_default_t def, struct domain *d,
xen/xsm/dummy.c +1 -1
@@ -89,7 +89,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)set_to_dummy_if_null (ops, pci_config_permission);set_to_dummy_if_null (ops, get_vnumainfo); -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_PCI )set_to_dummy_if_null (ops, get_device_group);set_to_dummy_if_null (ops, test_assign_device);set_to_dummy_if_null (ops, assign_device);
xen/xsm/flask/hooks.c +7 -7
@@ -20,7 +20,7 @@#include <xen/errno.h> #include <xen/guest_access.h> #include <xen/xenoprof.h> -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI #include <asm/msi.h> #endif #include <public/xen.h>
@@ -111,7 +111,7 @@ static int get_irq_sid(int irq, u32 *sid, struct avc_audit_data *ad) }return security_irq_sid (irq, sid); } -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI {struct irq_desc *desc =irq_to_desc (irq);if ( desc->msi_desc && desc->msi_desc->dev ) {
@@ -853,7 +853,7 @@ static int flask_map_domain_pirq (struct domain *d)static int flask_map_domain_msi (struct domain *d,int irq,void *data,u32 *sid,struct avc_audit_data *ad) { -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI struct msi_info *msi = data;u32 machine_bdf = (msi->seg <<16 ) | (msi->bus <<8 ) | msi->devfn;
@@ -899,7 +899,7 @@ static int flask_unmap_domain_pirq (struct domain *d)static int flask_unmap_domain_msi (struct domain *d,int irq,void *data,u32 *sid,struct avc_audit_data *ad) { -#ifdef HAS_PCI +#ifdef CONFIG_HAS_PCI struct msi_info *msi = data;u32 machine_bdf = (msi->seg <<16 ) | (msi->bus <<8 ) | msi->devfn;
@@ -1213,7 +1213,7 @@ static int flask_mem_sharing(struct domain *d) }#endif -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_PCI )static int flask_get_device_group (uint32_t machine_bdf) {u32 rsid;
@@ -1277,7 +1277,7 @@ static int flask_deassign_device(struct domain *d, uint32_t machine_bdf) return avc_current_has_perm(rsid, SECCLASS_RESOURCE, RESOURCE__REMOVE_DEVICE, NULL); } -#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */ +#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_PCI */ #if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_DEVICE_TREE )static int flask_test_assign_dtdevice (const char *dtpath)
@@ -1725,7 +1725,7 @@ static struct xsm_operations flask_ops = { .remove_from_physmap = flask_remove_from_physmap, .map_gmfn_foreign = flask_map_gmfn_foreign, -#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(HAS_PCI ) +#if defined(CONFIG_HAS_PASSTHROUGH ) && defined(CONFIG_HAS_PCI ) .get_device_group = flask_get_device_group, .test_assign_device = flask_test_assign_device, .assign_device = flask_assign_device,
Signature · 1 line
2.4.10
PATCH v6 1/1 07/28] build: convert HAS_NS16550 use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_NS16550 defines in the code base.
--- config/arm32.mk | 1 - config/arm64.mk | 1 - xen/arch/arm/configs/arm32_defconfig | 1 + xen/arch/arm/configs/arm64_defconfig | 1 + xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/drivers/Kconfig | 2 ++ xen/drivers/char/Kconfig | 5 +++++ xen/drivers/char/Makefile | 2 +- 9 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 xen/drivers/char/Kconfig
config/arm32.mk +0 -1
@@ -13,7 +13,6 @@ HAS_PL011 := y HAS_EXYNOS4210 := y HAS_OMAP := y HAS_SCIF := y -HAS_NS16550 := y HAS_MEM_ACCESS := y # Use only if calling $(LD) directly.
config/arm64.mk +0 -1
@@ -8,7 +8,6 @@ CFLAGS += #-marm -march= -mcpu= etc HAS_PL011 := y HAS_CADENCE_UART := y -HAS_NS16550 := y HAS_MEM_ACCESS := y HAS_GICV3 := y
xen/arch/arm/configs/arm32_defconfig +1 -0
@@ -1 +1,2 @@ CONFIG_64BIT=n +CONFIG_UART_NS16550=y
xen/arch/arm/configs/arm64_defconfig +1 -0
@@ -0,0 +1 @@ +CONFIG_UART_NS16550=y
xen/arch/x86/Kconfig +1 -0
@@ -5,6 +5,7 @@ config X86 def_bool y select HAS_PASSTHROUGH select HAS_PCI + select UART_NS16550 select HAS_GDBSX config ARCH_DEFCONFIG
xen/arch/x86/Rules.mk +0 -1
@@ -7,7 +7,6 @@ HAS_NUMA := y HAS_VGA := y HAS_VIDEO := y HAS_CPUFREQ := y -HAS_NS16550 := y HAS_EHCI := y HAS_KEXEC := y HAS_GDBSX := y
xen/drivers/Kconfig +2 -0
@@ -1,5 +1,7 @@ menu "Device Drivers" +source "drivers/char/Kconfig" + source "drivers/passthrough/Kconfig" source "drivers/pci/Kconfig"
xen/drivers/char/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ + +config UART_NS16550 + bool "16550-series UART support" + help + This selects the 16550-series UART support. For most systems, say Y.
xen/drivers/char/Makefile +1 -1
@@ -1,5 +1,5 @@ obj-y += console.o -obj-$(HAS_NS16550) += ns16550.o +obj-$(CONFIG_UART_NS16550) += ns16550.o obj-$(HAS_CADENCE_UART) += cadence-uart.o obj-$(HAS_PL011) += pl011.o obj-$(HAS_EXYNOS4210) += exynos4210-uart.o
Signature · 1 line
2.4.10
Re: [PATCHv6] 07/28] build: convert HAS_NS16550 use to Kconfig
xen/drivers/char/Kconfig line 3
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/drivers/char/Kconfig new file +3
-0@@ -0,0 +1,5 @@ + +config UART_NS16550 + bool "16550-series UART support"
Iirc we agreed not to have any user visible prompts for the moment; I think Ian was quite explicit about this. The 32- vs 64-bit selection on ARM is really an exception to that rule I think.
Jan
PATCH v6 1/1 08/28] build: convert HAS_IOPORTS use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_IOPORTS defines in the code base.
--- xen/Rules.mk | 1 - xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/drivers/char/Kconfig | 5 +++++ xen/drivers/char/ns16550.c | 10 +++++----- 5 files changed, 11 insertions(+), 7 deletions(-)
xen/Rules.mk +0 -1
@@ -61,7 +61,6 @@ CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_MEM_ACCESS) += -DHAS_MEM_ACCESS CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING -CFLAGS-$(HAS_IOPORTS) += -DHAS_IOPORTS CFLAGS-$(HAS_PDX) += -DHAS_PDX CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
xen/arch/x86/Kconfig +1 -0
@@ -3,6 +3,7 @@ config X86_64 config X86 def_bool y + select HAS_IOPORTS select HAS_PASSTHROUGH select HAS_PCI select UART_NS16550
xen/arch/x86/Rules.mk +0 -1
@@ -1,7 +1,6 @@ ######################################## # x86-specific definitions -HAS_IOPORTS := y HAS_ACPI := y HAS_NUMA := y HAS_VGA := y
xen/drivers/char/Kconfig +5 -0
@@ -3,3 +3,8 @@ config UART_NS16550 bool "16550-series UART support" help This selects the 16550-series UART support. For most systems, say Y. + +# Select HAS_IOPORTS if 16550 has I/O ports +config HAS_IOPORTS + bool + depends on UART_NS16550
xen/drivers/char/ns16550.c +5 -5
@@ -348,7 +348,7 @@ static void ns16550_delayed_resume(void *data);static u8 ns_read_reg (struct ns16550 *uart,unsigned int reg) {void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift); -#ifdef HAS_IOPORTS +#ifdef CONFIG_HAS_IOPORTS if ( uart->remapped_io_base ==NULL )return inb (uart->io_base + reg);#endif
@@ -366,7 +366,7 @@ static u8 ns_read_reg(struct ns16550 *uart, unsigned int reg)static void ns_write_reg (struct ns16550 *uart,unsigned int reg,u8 c) {void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift); -#ifdef HAS_IOPORTS +#ifdef CONFIG_HAS_IOPORTS if ( uart->remapped_io_base ==NULL )return outb (c, uart->io_base + reg);#endif
@@ -552,7 +552,7 @@ static void __init ns16550_init_preirq(struct serial_port *port) {struct ns16550 *uart = port->uart; -#ifdef HAS_IOPORTS +#ifdef CONFIG_HAS_IOPORTS /* I/O ports are distinguished by their size (16 bits). */ if ( uart->io_base >= 0x10000 )#endif
@@ -722,7 +722,7 @@ static void ns16550_resume(struct serial_port *port)static void __init ns16550_endboot (struct serial_port *port) { -#ifdef HAS_IOPORTS +#ifdef CONFIG_HAS_IOPORTS struct ns16550 *uart = port->uart;int rv;
@@ -786,7 +786,7 @@ static int __init check_existence(struct ns16550 *uart) {unsigned char status, scratch, scratch2, scratch3; -#ifdef HAS_IOPORTS +#ifdef CONFIG_HAS_IOPORTS /* * We can't poke MMIO UARTs until they get I/O remapped later. Assume that * if we're getting MMIO UARTs, the arch code knows what it's doing.
Signature · 1 line
2.4.10
Re: [PATCHv6] 08/28] build: convert HAS_IOPORTS use to Kconfig
xen/drivers/char/Kconfig config UART_NS16550 · line 10
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/drivers/char/Kconfig +5
-0@@ -3,3 +3,8 @@ config UART_NS16550 bool "16550-series UART support" help This selects the 16550-series UART support. For most systems, say Y. + +# Select HAS_IOPORTS if 16550 has I/O ports +config HAS_IOPORTS + bool + depends on UART_NS16550
Even if only used in ns16550.c, this is a generic setting and hence belongs in common/Kconfig and should be selected by the arches as needed.
Jan
Re: [PATCHv6] 08/28] build: convert HAS_IOPORTS use to Kconfig
Quoted 17 lines
xen/drivers/char/Kconfig config UART_NS16550 · line 10
Quoted 13 lines
Quoted 2 lines · On 30.11.15 at 15:56, <[email protected]> wrote:
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/drivers/char/Kconfig +5
-0@@ -3,3 +3,8 @@ config UART_NS16550 bool "16550-series UART support" help This selects the 16550-series UART support. For most systems, say Y. + +# Select HAS_IOPORTS if 16550 has I/O ports +config HAS_IOPORTS + bool + depends on UART_NS16550Even if only used in
ns16550.c, this is a generic setting and hence belongs in common/Kconfig and should be selected by the arches as needed.
I see it is being selected, but the "depends" here is bogus: When there is no prompt and no default, there should also not be any dependency.
Jan
Re: [PATCHv6] 08/28] build: convert HAS_IOPORTS use to Kconfig
Quoted 18 lines · Jan Beulich
Quoted 17 lines
xen/drivers/char/Kconfig config UART_NS16550 · line 10
Quoted 13 lines
Quoted 2 lines · On 30.11.15 at 15:56, <[email protected]> wrote:
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/drivers/char/Kconfig +5
-0@@ -3,3 +3,8 @@ config UART_NS16550 bool "16550-series UART support" help This selects the 16550-series UART support. For most systems, say Y. + +# Select HAS_IOPORTS if 16550 has I/O ports +config HAS_IOPORTS + bool + depends on UART_NS16550Even if only used in
ns16550.c, this is a generic setting and hence belongs in common/Kconfig and should be selected by the arches as needed.
Quoted 6 lines
I see it is being selected, but the "depends" here is bogus: When there is no prompt and no default, there should also not be any dependency.
Jan
The dependency just means it can't be enabled unless the dependency is met. I believe its valid for the case when the config system starts and the user disables UART_NS16550, then HAS_IOPORTS would need to be disabled. Without the dependency then this wouldn't be turned off when UART_NS16550 is turned off. There are a number of examples of this in the Linux kernel's usage of kconfig.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 08/28] build: convert HAS_IOPORTS use to Kconfig
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 01:39, <[email protected]> wrote:
Quoted 18 lines · Jan Beulich
Quoted 17 lines
xen/drivers/char/Kconfig config UART_NS16550 · line 10
Quoted 13 lines
Quoted 2 lines · On 30.11.15 at 15:56, <[email protected]> wrote:
Quoted 1 line · On 24.11.15 at 18:51, <[email protected]> wrote:
xen/drivers/char/Kconfig +5
-0@@ -3,3 +3,8 @@ config UART_NS16550 bool "16550-series UART support" help This selects the 16550-series UART support. For most systems, say Y. + +# Select HAS_IOPORTS if 16550 has I/O ports +config HAS_IOPORTS + bool + depends on UART_NS16550Even if only used in
ns16550.c, this is a generic setting and hence belongs in common/Kconfig and should be selected by the arches as needed.
Quoted 6 lines
Quoted 3 lines
I see it is being selected, but the "depends" here is bogus: When there is no prompt and no default, there should also not be any dependency.
The dependency just means it can't be enabled unless the dependency is met.
I don't think that's true. All you get when "select"-ing it without also having selected the dependency is a warning. I've frequently seen this on Linux - people just don't seem to look at those warnings (and I admit they're not always easy to spot, since they might scroll off before one even has a chance to look).
Quoted 5 lines
I believe its valid for the case when the config system starts and the user disables
UART_NS16550, thenHAS_IOPORTSwould need to be disabled. Without the dependency then this wouldn't be turned off whenUART_NS16550is turned off. There are a number of examples of this in the Linux kernel's usage of kconfig.
Question is whether these are good examples, which I doubt. In fact I recall discussions to that effect. Forward dependencies make sense when controlling user selectable options (i.e. such with visible prompts). Reverse dependencies should be used when dealing with automatic selections (i.e. options without visible prompts).
But regardless of these abstract considerations the dependency you introduce above is (as said) wrong anyway: HAS_IOPORTS is a property or the architecture, not something that results from enabling UART_NS16550. You simply got misled by ns16550.c being the only file using that symbol.
Jan
PATCH v6 1/1 09/28] build: convert HAS_ACPI use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_ACPI defines in the code base.
--- xen/Rules.mk | 1 - xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/common/sysctl.c | 2 +- xen/drivers/Kconfig | 2 ++ xen/drivers/Makefile | 2 +- xen/drivers/acpi/Kconfig | 4 ++++ 7 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 xen/drivers/acpi/Kconfig
xen/Rules.mk +0 -1
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug) += -DCRASH_DEBUG CFLAGS-$(perfc) += -DPERF_COUNTERS CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE -CFLAGS-$(HAS_ACPI) += -DHAS_ACPI CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_MEM_ACCESS) += -DHAS_MEM_ACCESS CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING
xen/arch/x86/Kconfig +1 -0
@@ -4,6 +4,7 @@ config X86_64 config X86 def_bool y select HAS_IOPORTS + select HAS_ACPI select HAS_PASSTHROUGH select HAS_PCI select UART_NS16550
xen/arch/x86/Rules.mk +0 -1
@@ -1,7 +1,6 @@ ######################################## # x86-specific definitions -HAS_ACPI := y HAS_NUMA := y HAS_VGA := y HAS_VIDEO := y
xen/common/sysctl.c +1 -1
@@ -171,7 +171,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) op->u.availheap.avail_bytes <<=PAGE_SHIFT ;break ; -#ifdef HAS_ACPI +#ifdef CONFIG_HAS_ACPI case XEN_SYSCTL_get_pmstat: ret =do_get_pm_info (&op->u.get_pmstat);break ;
xen/drivers/Kconfig +2 -0
@@ -1,5 +1,7 @@ menu "Device Drivers" +source "drivers/acpi/Kconfig" + source "drivers/char/Kconfig" source "drivers/passthrough/Kconfig"
xen/drivers/Makefile +1 -1
@@ -2,5 +2,5 @@ subdir-y += char subdir-$(HAS_CPUFREQ) += cpufreq subdir-$(CONFIG_HAS_PCI) += pci subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough -subdir-$(HAS_ACPI) += acpi +subdir-$(CONFIG_HAS_ACPI) += acpi subdir-$(HAS_VIDEO) += video
xen/drivers/acpi/Kconfig new file +4 -0
@@ -0,0 +1,4 @@ + +# Select HAS_ACPI if ACPI is supported +config HAS_ACPI + bool
Signature · 1 line
2.4.10
PATCH v6 1/1 10/28] build: convert HAS_VIDEO use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_VIDEO defines in the code base.
--- xen/arch/arm/Kconfig | 1 + xen/arch/arm/Rules.mk | 1 - xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/drivers/Kconfig | 2 ++ xen/drivers/Makefile | 2 +- xen/drivers/video/Kconfig | 13 +++++++++++++ xen/drivers/video/Makefile | 8 ++++---- 8 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 xen/drivers/video/Kconfig
xen/arch/arm/Kconfig +1 -0
@@ -17,6 +17,7 @@ config ARM_64 config ARM def_bool y select HAS_DEVICE_TREE + select HAS_VIDEO select HAS_PASSTHROUGH config ARCH_DEFCONFIG
xen/arch/arm/Rules.mk +0 -1
@@ -6,7 +6,6 @@ # 'make clean' before rebuilding. # -HAS_VIDEO := y HAS_ARM_HDLCD := y HAS_PDX := y
xen/arch/x86/Kconfig +1 -0
@@ -6,6 +6,7 @@ config X86 select HAS_IOPORTS select HAS_ACPI select HAS_PASSTHROUGH + select HAS_VIDEO select HAS_PCI select UART_NS16550 select HAS_GDBSX
xen/arch/x86/Rules.mk +0 -1
@@ -3,7 +3,6 @@ HAS_NUMA := y HAS_VGA := y -HAS_VIDEO := y HAS_CPUFREQ := y HAS_EHCI := y HAS_KEXEC := y
xen/drivers/Kconfig +2 -0
@@ -8,4 +8,6 @@ source "drivers/passthrough/Kconfig" source "drivers/pci/Kconfig" +source "drivers/video/Kconfig" + endmenu
xen/drivers/Makefile +1 -1
@@ -3,4 +3,4 @@ subdir-$(HAS_CPUFREQ) += cpufreq subdir-$(CONFIG_HAS_PCI) += pci subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough subdir-$(CONFIG_HAS_ACPI) += acpi -subdir-$(HAS_VIDEO) += video +subdir-$(CONFIG_HAS_VIDEO) += video
xen/drivers/video/Kconfig new file +13 -0
@@ -0,0 +1,13 @@ + +# Select HAS_VIDEO if video is supported +config HAS_VIDEO + bool + +# Select HAS_VGA if VGA is supported +config HAS_VGA + bool + depends on HAS_VIDEO + +# Select HAS_ARM_HDLCD if ARM HDLCD is supported +config HAS_ARM_HDLCD + bool
xen/drivers/video/Makefile +4 -4
@@ -1,7 +1,7 @@ obj-$(HAS_VGA) := vga.o -obj-$(HAS_VIDEO) += font_8x14.o -obj-$(HAS_VIDEO) += font_8x16.o -obj-$(HAS_VIDEO) += font_8x8.o -obj-$(HAS_VIDEO) += lfb.o +obj-$(CONFIG_HAS_VIDEO) += font_8x14.o +obj-$(CONFIG_HAS_VIDEO) += font_8x16.o +obj-$(CONFIG_HAS_VIDEO) += font_8x8.o +obj-$(CONFIG_HAS_VIDEO) += lfb.o obj-$(HAS_VGA) += vesa.o obj-$(HAS_ARM_HDLCD) += arm_hdlcd.o
Signature · 1 line
2.4.10
Re: [PATCHv6] 10/28] build: convert HAS_VIDEO use to Kconfig
xen/drivers/video/Kconfig line 9
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:52, <[email protected]> wrote:
xen/drivers/video/Kconfig new file +9
-0@@ -0,0 +1,13 @@ + +# Select HAS_VIDEO if video is supported +config HAS_VIDEO + bool + +# Select HAS_VGA if VGA is supported +config HAS_VGA + bool + depends on HAS_VIDEO
As said in reply to another patch - such dependencies are bogus. You really mean select here, allowing the arch itself to just "select HAS_VGA", implicitly also selecting HAS_VIDEO.
Jan
PATCH v6 1/1 11/28] build: convert HAS_VGA use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_VGA defines in the code base.
--- xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/drivers/video/Makefile | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-)
xen/arch/x86/Kconfig +1 -0
@@ -7,6 +7,7 @@ config X86 select HAS_ACPI select HAS_PASSTHROUGH select HAS_VIDEO + select HAS_VGA select HAS_PCI select UART_NS16550 select HAS_GDBSX
xen/arch/x86/Rules.mk +0 -1
@@ -2,7 +2,6 @@ # x86-specific definitions HAS_NUMA := y -HAS_VGA := y HAS_CPUFREQ := y HAS_EHCI := y HAS_KEXEC := y
xen/drivers/video/Makefile +2 -2
@@ -1,7 +1,7 @@ -obj-$(HAS_VGA) := vga.o +obj-$(CONFIG_HAS_VGA) := vga.o obj-$(CONFIG_HAS_VIDEO) += font_8x14.o obj-$(CONFIG_HAS_VIDEO) += font_8x16.o obj-$(CONFIG_HAS_VIDEO) += font_8x8.o obj-$(CONFIG_HAS_VIDEO) += lfb.o -obj-$(HAS_VGA) += vesa.o +obj-$(CONFIG_HAS_VGA) += vesa.o obj-$(HAS_ARM_HDLCD) += arm_hdlcd.o
Signature · 1 line
2.4.10
Re: [PATCHv6] 11/28] build: convert HAS_VGA use to Kconfig
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:52, <[email protected]> wrote:
Use the
KconfiggeneratedCONFIG_HAS_VGAdefines in the code base.
This should be folded with the previous patch, or the VGA parts done there be moved here.
Jan
PATCH v6 1/1 12/28] build: convert HAS_CPUFREQ use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_CPUFREQ defines in the code base.
--- xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/drivers/Kconfig | 2 ++ xen/drivers/Makefile | 2 +- xen/drivers/cpufreq/Kconfig | 4 ++++ 5 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 xen/drivers/cpufreq/Kconfig
xen/arch/x86/Kconfig +1 -0
@@ -8,6 +8,7 @@ config X86 select HAS_PASSTHROUGH select HAS_VIDEO select HAS_VGA + select HAS_CPUFREQ select HAS_PCI select UART_NS16550 select HAS_GDBSX
xen/arch/x86/Rules.mk +0 -1
@@ -2,7 +2,6 @@ # x86-specific definitions HAS_NUMA := y -HAS_CPUFREQ := y HAS_EHCI := y HAS_KEXEC := y HAS_GDBSX := y
xen/drivers/Kconfig +2 -0
@@ -4,6 +4,8 @@ source "drivers/acpi/Kconfig" source "drivers/char/Kconfig" +source "drivers/cpufreq/Kconfig" + source "drivers/passthrough/Kconfig" source "drivers/pci/Kconfig"
xen/drivers/Makefile +1 -1
@@ -1,5 +1,5 @@ subdir-y += char -subdir-$(HAS_CPUFREQ) += cpufreq +subdir-$(CONFIG_HAS_CPUFREQ) += cpufreq subdir-$(CONFIG_HAS_PCI) += pci subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough subdir-$(CONFIG_HAS_ACPI) += acpi
xen/drivers/cpufreq/Kconfig new file +4 -0
@@ -0,0 +1,4 @@ + +# Select HAS_CPUFREQ if CPU frequency scaling is supported +config HAS_CPUFREQ + bool
Signature · 1 line
2.4.10
PATCH v6 1/1 13/28] build: convert HAS_GDBSX use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_GDBSX defines in the code base.
--- xen/Rules.mk | 1 - xen/arch/x86/Rules.mk | 1 - xen/common/Kconfig | 4 ++++ xen/common/domain.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-)
xen/Rules.mk +0 -1
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug) += -DCRASH_DEBUG CFLAGS-$(perfc) += -DPERF_COUNTERS CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE -CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX CFLAGS-$(HAS_MEM_ACCESS) += -DHAS_MEM_ACCESS CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
xen/arch/x86/Rules.mk +0 -1
@@ -4,7 +4,6 @@ HAS_NUMA := y HAS_EHCI := y HAS_KEXEC := y -HAS_GDBSX := y HAS_PDX := y HAS_CORE_PARKING := y xenoprof := y
xen/common/Kconfig +4 -0
@@ -5,4 +5,8 @@ menu "Common Features" config HAS_DEVICE_TREE bool +# Select HAS_GDBSX if GDBSX is supported +config HAS_GDBSX + bool + endmenu
xen/common/domain.c +1 -1
@@ -772,7 +772,7 @@ void vcpu_end_shutdown_deferral(struct vcpu *v)vcpu_check_shutdown (v); } -#ifdef HAS_GDBSX +#ifdef CONFIG_HAS_GDBSX void domain_pause_for_debugger (void ) {struct vcpu *curr = current;
Signature · 1 line
2.4.10
Re: [PATCHv6] 13/28] build: convert HAS_GDBSX use to Kconfig
xen/common/Kconfig menu "Common Features" · line 10
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:52, <[email protected]> wrote:
xen/common/Kconfig +3
-0@@ -5,4 +5,8 @@ menu "Common Features" config HAS_DEVICE_TREE bool +# Select HAS_GDBSX if GDBSX is supported +config HAS_GDBSX + bool
Wasn't there a select of this option way earlier in the series?
Jan
PATCH v6 1/1 14/28] build: convert HAS_PDX use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_PDX defines in the code base.
--- xen/Rules.mk | 1 - xen/arch/arm/Kconfig | 1 + xen/arch/arm/Rules.mk | 1 - xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/common/Kconfig | 4 ++++ xen/common/Makefile | 2 +- xen/include/xen/pdx.h | 4 ++-- 8 files changed, 9 insertions(+), 6 deletions(-)
xen/Rules.mk +0 -1
@@ -59,7 +59,6 @@ CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(HAS_MEM_ACCESS) += -DHAS_MEM_ACCESS CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING -CFLAGS-$(HAS_PDX) += -DHAS_PDX CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER ifneq ($(max_phys_cpus),)
xen/arch/arm/Kconfig +1 -0
@@ -19,6 +19,7 @@ config ARM select HAS_DEVICE_TREE select HAS_VIDEO select HAS_PASSTHROUGH + select HAS_PDX config ARCH_DEFCONFIG string
xen/arch/arm/Rules.mk +0 -1
@@ -7,7 +7,6 @@ # HAS_ARM_HDLCD := y -HAS_PDX := y CFLAGS += -I$(BASEDIR)/include
xen/arch/x86/Kconfig +1 -0
@@ -12,6 +12,7 @@ config X86 select HAS_PCI select UART_NS16550 select HAS_GDBSX + select HAS_PDX config ARCH_DEFCONFIG string
xen/arch/x86/Rules.mk +0 -1
@@ -4,7 +4,6 @@ HAS_NUMA := y HAS_EHCI := y HAS_KEXEC := y -HAS_PDX := y HAS_CORE_PARKING := y xenoprof := y
xen/common/Kconfig +4 -0
@@ -5,6 +5,10 @@ menu "Common Features" config HAS_DEVICE_TREE bool +# Select HAS_PDX if PDX is supported +config HAS_PDX + bool + # Select HAS_GDBSX if GDBSX is supported config HAS_GDBSX bool
xen/common/Makefile +1 -1
@@ -23,7 +23,7 @@ obj-y += memory.o obj-y += multicall.o obj-y += notifier.o obj-y += page_alloc.o -obj-$(HAS_PDX) += pdx.o +obj-$(CONFIG_HAS_PDX) += pdx.o obj-y += preempt.o obj-y += random.o obj-y += rangeset.o
xen/include/xen/pdx.h +2 -2
@@ -1,7 +1,7 @@#ifndef __XEN_PDX_H__#define __XEN_PDX_H__ -#ifdef HAS_PDX +#ifdef CONFIG_HAS_PDX extern unsigned long max_pdx;extern unsigned long pfn_pdx_bottom_mask, ma_va_bottom_mask;
@@ -37,7 +37,7 @@ static inline unsigned long pdx_to_pfn(unsigned long pdx)extern void pfn_pdx_hole_setup (unsigned long ); -#endif /* HAS_PDX */ +#endif /* CONFIG_HAS_PDX */ #endif /* __XEN_PDX_H__ */ /*
Signature · 1 line
2.4.10
PATCH v6 1/1 15/28] build: convert HAS_KEXEC use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_KEXEC defines in the code base.
--- xen/Rules.mk | 2 +- xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/common/Kconfig | 4 ++++ 4 files changed, 6 insertions(+), 2 deletions(-)
xen/Rules.mk +1 -1
@@ -68,7 +68,7 @@ ifneq ($(max_phys_irqs),) CFLAGS-y += -DMAX_PHYS_IRQS=$(max_phys_irqs) endif -CONFIG_KEXEC-$(HAS_KEXEC) := $(kexec) +CONFIG_KEXEC-$(CONFIG_HAS_KEXEC) := $(kexec) CONFIG_KEXEC := $(CONFIG_KEXEC-y) CFLAGS-$(CONFIG_KEXEC) += -DCONFIG_KEXEC
xen/arch/x86/Kconfig +1 -0
@@ -13,6 +13,7 @@ config X86 select UART_NS16550 select HAS_GDBSX select HAS_PDX + select HAS_KEXEC config ARCH_DEFCONFIG string
xen/arch/x86/Rules.mk +0 -1
@@ -3,7 +3,6 @@ HAS_NUMA := y HAS_EHCI := y -HAS_KEXEC := y HAS_CORE_PARKING := y xenoprof := y
xen/common/Kconfig +4 -0
@@ -9,6 +9,10 @@ config HAS_DEVICE_TREE config HAS_PDX bool +# Select HAS_KEXEC if kexec is supported +config HAS_KEXEC + bool + # Select HAS_GDBSX if GDBSX is supported config HAS_GDBSX bool
Signature · 1 line
2.4.10
Re: [PATCHv6] 15/28] build: convert HAS_KEXEC use to Kconfig
xen/Rules.mk ifneq ($(max_phys_irqs),) · line 72
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:52, <[email protected]> wrote:
xen/Rules.mk +1
-1@@ -68,7 +68,7 @@ ifneq ($(max_phys_irqs),) CFLAGS-y += -DMAX_PHYS_IRQS=$(max_phys_irqs) endif -CONFIG_KEXEC-$(HAS_KEXEC) := $(kexec) +CONFIG_KEXEC-$(CONFIG_HAS_KEXEC) := $(kexec) CONFIG_KEXEC := $(CONFIG_KEXEC-y)
This may be another exception to the "no prompts" rule, since we already allow the feature to be turned of from the make command line. However, you should do away with the old method then (and the option then likely should be KEXEC, not HAS_KEXEC, since I don't think HAS_KEXEC but !KEXEC would produce anything useful).
Jan
PATCH v6 1/1 16/28] build: convert HAS_ARM_HDLCD use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_ARM_HDLCD defines in the code base.
--- xen/arch/arm/Kconfig | 1 + xen/arch/arm/Rules.mk | 2 -- xen/drivers/video/Makefile | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-)
xen/arch/arm/Kconfig +1 -0
@@ -18,6 +18,7 @@ config ARM def_bool y select HAS_DEVICE_TREE select HAS_VIDEO + select HAS_ARM_HDLCD select HAS_PASSTHROUGH select HAS_PDX
xen/arch/arm/Rules.mk +0 -2
@@ -6,8 +6,6 @@ # 'make clean' before rebuilding. # -HAS_ARM_HDLCD := y - CFLAGS += -I$(BASEDIR)/include $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
xen/drivers/video/Makefile +1 -1
@@ -4,4 +4,4 @@ obj-$(CONFIG_HAS_VIDEO) += font_8x16.o obj-$(CONFIG_HAS_VIDEO) += font_8x8.o obj-$(CONFIG_HAS_VIDEO) += lfb.o obj-$(CONFIG_HAS_VGA) += vesa.o -obj-$(HAS_ARM_HDLCD) += arm_hdlcd.o +obj-$(CONFIG_HAS_ARM_HDLCD) += arm_hdlcd.o
Signature · 1 line
2.4.10
PATCH v6 1/1 17/28] build: convert HAS_CADENCE_UART use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_CADENCE_UART defines in the code base.
--- config/arm64.mk | 1 - xen/arch/arm/configs/arm64_defconfig | 1 + xen/drivers/char/Kconfig | 7 +++++++ xen/drivers/char/Makefile | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-)
config/arm64.mk +0 -1
@@ -7,7 +7,6 @@ CONFIG_XEN_INSTALL_SUFFIX := CFLAGS += #-marm -march= -mcpu= etc HAS_PL011 := y -HAS_CADENCE_UART := y HAS_MEM_ACCESS := y HAS_GICV3 := y
xen/arch/arm/configs/arm64_defconfig +1 -0
@@ -1 +1,2 @@ CONFIG_UART_NS16550=y +CONFIG_UART_CADENCE=y
xen/drivers/char/Kconfig +7 -0
@@ -8,3 +8,10 @@ config UART_NS16550 config HAS_IOPORTS bool depends on UART_NS16550 + +config UART_CADENCE + bool "Xilinx Zynq Cadence UART support" + depends on ARM_64 + help + This selects the Xilinx Zynq Cadence UART. If you have a Xilinx Zynq + based board, say Y.
xen/drivers/char/Makefile +1 -1
@@ -1,6 +1,6 @@ obj-y += console.o obj-$(CONFIG_UART_NS16550) += ns16550.o -obj-$(HAS_CADENCE_UART) += cadence-uart.o +obj-$(CONFIG_UART_CADENCE) += cadence-uart.o obj-$(HAS_PL011) += pl011.o obj-$(HAS_EXYNOS4210) += exynos4210-uart.o obj-$(HAS_OMAP) += omap-uart.o
Signature · 1 line
2.4.10
PATCH v6 1/1 18/28] build: convert HAS_PL011 use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_UART_PL011 defines in the code base. The prefix HAS_ does not make sense in this case because these are intended to be user selected options while HAS_ just states that the hardware has this support and is controlled by Xen maintainers.
--- config/arm32.mk | 1 - config/arm64.mk | 1 - xen/arch/arm/configs/arm32_defconfig | 1 + xen/arch/arm/configs/arm64_defconfig | 1 + xen/drivers/char/Kconfig | 7 +++++++ xen/drivers/char/Makefile | 2 +- 6 files changed, 10 insertions(+), 3 deletions(-)
config/arm32.mk +0 -1
@@ -9,7 +9,6 @@ CONFIG_XEN_INSTALL_SUFFIX := # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: CFLAGS += -marm -HAS_PL011 := y HAS_EXYNOS4210 := y HAS_OMAP := y HAS_SCIF := y
config/arm64.mk +0 -1
@@ -6,7 +6,6 @@ CONFIG_XEN_INSTALL_SUFFIX := CFLAGS += #-marm -march= -mcpu= etc -HAS_PL011 := y HAS_MEM_ACCESS := y HAS_GICV3 := y
xen/arch/arm/configs/arm32_defconfig +1 -0
@@ -1,2 +1,3 @@ CONFIG_64BIT=n CONFIG_UART_NS16550=y +CONFIG_UART_PL011=y
xen/arch/arm/configs/arm64_defconfig +1 -0
@@ -1,2 +1,3 @@ CONFIG_UART_NS16550=y CONFIG_UART_CADENCE=y +CONFIG_UART_PL011=y
xen/drivers/char/Kconfig +7 -0
@@ -15,3 +15,10 @@ config UART_CADENCE help This selects the Xilinx Zynq Cadence UART. If you have a Xilinx Zynq based board, say Y. + +config UART_PL011 + bool "ARM AMBA PL011 UART support" + depends on ARM + help + This selects the ARM(R) AMBA(R) PrimeCell PL011 UART. If you have + an Integrator/PP2, Integrator/CP or Versatile platform, say Y.
xen/drivers/char/Makefile +1 -1
@@ -1,7 +1,7 @@ obj-y += console.o obj-$(CONFIG_UART_NS16550) += ns16550.o obj-$(CONFIG_UART_CADENCE) += cadence-uart.o -obj-$(HAS_PL011) += pl011.o +obj-$(CONFIG_UART_PL011) += pl011.o obj-$(HAS_EXYNOS4210) += exynos4210-uart.o obj-$(HAS_OMAP) += omap-uart.o obj-$(HAS_SCIF) += scif-uart.o
Signature · 1 line
2.4.10
PATCH v6 1/1 19/28] build: convert HAS_EXYNOS4210 use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_UART_EXYNOS4210 defines in the code base.
--- config/arm32.mk | 1 - xen/arch/arm/configs/arm32_defconfig | 1 + xen/drivers/char/Kconfig | 7 +++++++ xen/drivers/char/Makefile | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-)
config/arm32.mk +0 -1
@@ -9,7 +9,6 @@ CONFIG_XEN_INSTALL_SUFFIX := # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: CFLAGS += -marm -HAS_EXYNOS4210 := y HAS_OMAP := y HAS_SCIF := y HAS_MEM_ACCESS := y
xen/arch/arm/configs/arm32_defconfig +1 -0
@@ -1,3 +1,4 @@ CONFIG_64BIT=n CONFIG_UART_NS16550=y CONFIG_UART_PL011=y +CONFIG_UART_EXYNOS4210=y
xen/drivers/char/Kconfig +7 -0
@@ -22,3 +22,10 @@ config UART_PL011 help This selects the ARM(R) AMBA(R) PrimeCell PL011 UART. If you have an Integrator/PP2, Integrator/CP or Versatile platform, say Y. + +config UART_EXYNOS4210 + bool "Samsung Exynos 4210 UART support" + depends on ARM_32 + help + This selects the Samsung Exynos 4210 UART. If you have a Samsung + Exynos based board, say Y.
xen/drivers/char/Makefile +1 -1
@@ -2,7 +2,7 @@ obj-y += console.o obj-$(CONFIG_UART_NS16550) += ns16550.o obj-$(CONFIG_UART_CADENCE) += cadence-uart.o obj-$(CONFIG_UART_PL011) += pl011.o -obj-$(HAS_EXYNOS4210) += exynos4210-uart.o +obj-$(CONFIG_UART_EXYNOS4210) += exynos4210-uart.o obj-$(HAS_OMAP) += omap-uart.o obj-$(HAS_SCIF) += scif-uart.o obj-$(HAS_EHCI) += ehci-dbgp.o
Signature · 1 line
2.4.10
PATCH v6 1/1 20/28] build: convert HAS_OMAP use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_UART_OMAP defines in the code base.
--- config/arm32.mk | 1 - xen/arch/arm/configs/arm32_defconfig | 1 + xen/drivers/char/Kconfig | 7 +++++++ xen/drivers/char/Makefile | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-)
config/arm32.mk +0 -1
@@ -9,7 +9,6 @@ CONFIG_XEN_INSTALL_SUFFIX := # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: CFLAGS += -marm -HAS_OMAP := y HAS_SCIF := y HAS_MEM_ACCESS := y
xen/arch/arm/configs/arm32_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_64BIT=n CONFIG_UART_NS16550=y CONFIG_UART_PL011=y CONFIG_UART_EXYNOS4210=y +CONFIG_UART_OMAP=y
xen/drivers/char/Kconfig +7 -0
@@ -29,3 +29,10 @@ config UART_EXYNOS4210 help This selects the Samsung Exynos 4210 UART. If you have a Samsung Exynos based board, say Y. + +config UART_OMAP + bool "OMAP UART support" + depends on ARM_32 + help + This selects the Texas Instruments OMAP UART. If you have a Texas + Instruments based CPU, say Y.
xen/drivers/char/Makefile +1 -1
@@ -3,7 +3,7 @@ obj-$(CONFIG_UART_NS16550) += ns16550.o obj-$(CONFIG_UART_CADENCE) += cadence-uart.o obj-$(CONFIG_UART_PL011) += pl011.o obj-$(CONFIG_UART_EXYNOS4210) += exynos4210-uart.o -obj-$(HAS_OMAP) += omap-uart.o +obj-$(CONFIG_UART_OMAP) += omap-uart.o obj-$(HAS_SCIF) += scif-uart.o obj-$(HAS_EHCI) += ehci-dbgp.o obj-$(CONFIG_ARM) += dt-uart.o
Signature · 1 line
2.4.10
PATCH v6 1/1 21/28] build: convert HAS_SCIF use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_UART_SCIF defines in the code base.
--- config/arm32.mk | 1 - xen/drivers/char/Kconfig | 7 +++++++ xen/drivers/char/Makefile | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-)
config/arm32.mk +0 -1
@@ -9,7 +9,6 @@ CONFIG_XEN_INSTALL_SUFFIX := # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: CFLAGS += -marm -HAS_SCIF := y HAS_MEM_ACCESS := y # Use only if calling $(LD) directly.
xen/drivers/char/Kconfig +7 -0
@@ -36,3 +36,10 @@ config UART_OMAP help This selects the Texas Instruments OMAP UART. If you have a Texas Instruments based CPU, say Y. + +config UART_SCIF + bool "SuperH SCI(F) UART support" + depends on ARM_32 + help + This selects the SuperH SCI(F) UART. If you have a SuperH based board, + say Y.
xen/drivers/char/Makefile +1 -1
@@ -4,7 +4,7 @@ obj-$(CONFIG_UART_CADENCE) += cadence-uart.o obj-$(CONFIG_UART_PL011) += pl011.o obj-$(CONFIG_UART_EXYNOS4210) += exynos4210-uart.o obj-$(CONFIG_UART_OMAP) += omap-uart.o -obj-$(HAS_SCIF) += scif-uart.o +obj-$(CONFIG_UART_SCIF) += scif-uart.o obj-$(HAS_EHCI) += ehci-dbgp.o obj-$(CONFIG_ARM) += dt-uart.o obj-y += serial.o
Signature · 1 line
2.4.10
PATCH v6 1/1 22/28] build: convert HAS_EHCI use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_UART_EHCI defines in the code base.
--- xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/drivers/char/Kconfig | 7 +++++++ xen/drivers/char/Makefile | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-)
xen/arch/x86/Kconfig +1 -0
@@ -11,6 +11,7 @@ config X86 select HAS_CPUFREQ select HAS_PCI select UART_NS16550 + select UART_EHCI select HAS_GDBSX select HAS_PDX select HAS_KEXEC
xen/arch/x86/Rules.mk +0 -1
@@ -2,7 +2,6 @@ # x86-specific definitions HAS_NUMA := y -HAS_EHCI := y HAS_CORE_PARKING := y xenoprof := y
xen/drivers/char/Kconfig +7 -0
@@ -43,3 +43,10 @@ config UART_SCIF help This selects the SuperH SCI(F) UART. If you have a SuperH based board, say Y. + +config UART_EHCI + bool "USB EHCI debug port support" + depends on X86 + help + This selects the USB based EHCI debug port to be used as a UART. If + you have an x86 based system with USB, say Y.
xen/drivers/char/Makefile +1 -1
@@ -5,6 +5,6 @@ obj-$(CONFIG_UART_PL011) += pl011.o obj-$(CONFIG_UART_EXYNOS4210) += exynos4210-uart.o obj-$(CONFIG_UART_OMAP) += omap-uart.o obj-$(CONFIG_UART_SCIF) += scif-uart.o -obj-$(HAS_EHCI) += ehci-dbgp.o +obj-$(CONFIG_UART_EHCI) += ehci-dbgp.o obj-$(CONFIG_ARM) += dt-uart.o obj-y += serial.o
Signature · 1 line
2.4.10
Re: [PATCHv6] 22/28] build: convert HAS_EHCI use to Kconfig
xen/arch/x86/Kconfig config X86 · line 14
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:52, <[email protected]> wrote:
xen/arch/x86/Kconfig +1
-0@@ -11,6 +11,7 @@ config X86 select HAS_CPUFREQ select HAS_PCI select UART_NS16550 + select UART_EHCI
I don't think this is a reasonable name. We're talking about EHCI debug ports here. HAS_EHCI or HAS_EHCI_DEBUG_PORT or some such please.
Jan
PATCH v6 1/1 23/28] build: convert HAS_MEM_ACCESS use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_MEM_ACCESS defines in the code base.
--- xen/Rules.mk | 1 - xen/arch/arm/Kconfig | 1 + xen/arch/x86/Kconfig | 1 + xen/common/Kconfig | 4 ++++ xen/common/Makefile | 2 +- xen/common/domctl.c | 2 +- xen/common/vm_event.c | 2 +- xen/include/xen/mem_access.h | 4 ++-- xen/include/xsm/dummy.h | 2 +- xen/include/xsm/xsm.h | 4 ++-- xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 4 ++-- 12 files changed, 17 insertions(+), 12 deletions(-)
xen/Rules.mk +0 -1
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug) += -DCRASH_DEBUG CFLAGS-$(perfc) += -DPERF_COUNTERS CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE -CFLAGS-$(HAS_MEM_ACCESS) += -DHAS_MEM_ACCESS CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
xen/arch/arm/Kconfig +1 -0
@@ -21,6 +21,7 @@ config ARM select HAS_ARM_HDLCD select HAS_PASSTHROUGH select HAS_PDX + select HAS_MEM_ACCESS config ARCH_DEFCONFIG string
xen/arch/x86/Kconfig +1 -0
@@ -15,6 +15,7 @@ config X86 select HAS_GDBSX select HAS_PDX select HAS_KEXEC + select HAS_MEM_ACCESS config ARCH_DEFCONFIG string
xen/common/Kconfig +4 -0
@@ -5,6 +5,10 @@ menu "Common Features" config HAS_DEVICE_TREE bool +# Select HAS_MEM_ACCESS if mem access is supported +config HAS_MEM_ACCESS + bool + # Select HAS_PDX if PDX is supported config HAS_PDX bool
xen/common/Makefile +1 -1
@@ -18,7 +18,7 @@ obj-$(CONFIG_KEXEC) += kexec.o obj-$(CONFIG_KEXEC) += kimage.o obj-y += lib.o obj-y += lzo.o -obj-$(HAS_MEM_ACCESS) += mem_access.o +obj-$(CONFIG_HAS_MEM_ACCESS) += mem_access.o obj-y += memory.o obj-y += multicall.o obj-y += notifier.o
xen/common/domctl.c +1 -1
@@ -1130,7 +1130,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) d->disable_migrate = op->u.disable_migrate.disable;break ; -#ifdef HAS_MEM_ACCESS +#ifdef CONFIG_HAS_MEM_ACCESS case XEN_DOMCTL_set_access_required:if (unlikely (current->domain == d) ) ret = -EPERM ;
xen/common/vm_event.c +1 -1
@@ -397,7 +397,7 @@ void vm_event_resume(struct domain *d, struct vm_event_domain *ved)vm_event_register_write_resume (v, &rsp);break ; -#ifdef HAS_MEM_ACCESS +#ifdef CONFIG_HAS_MEM_ACCESS case VM_EVENT_REASON_MEM_ACCESS :mem_access_resume (v, &rsp);break ;
xen/include/xen/mem_access.h +2 -2
@@ -25,7 +25,7 @@#include <public/memory.h> #include <asm/p2m.h> -#ifdef HAS_MEM_ACCESS +#ifdef CONFIG_HAS_MEM_ACCESS int mem_access_memop (unsigned long cmd,XEN_GUEST_HANDLE_PARAM (xen_mem_access_op_t) arg);
@@ -58,7 +58,7 @@ void mem_access_resume(struct vcpu *vcpu, vm_event_response_t *rsp)/* Nothing to do. */ } -#endif /* HAS_MEM_ACCESS */ +#endif /* CONFIG_HAS_MEM_ACCESS */ #endif /* _XEN_ASM_MEM_ACCESS_H */
xen/include/xsm/dummy.h +1 -1
@@ -560,7 +560,7 @@ static XSM_INLINE int xsm_vm_event_control(XSM_DEFAULT_ARG struct domain *d, intreturn xsm_default_action (action, current->domain, d); } -#ifdef HAS_MEM_ACCESS +#ifdef CONFIG_HAS_MEM_ACCESS static XSM_INLINE int xsm_mem_access(XSM_DEFAULT_ARG struct domain *d) {XSM_ASSERT_ACTION (XSM_DM_PRIV );
xen/include/xsm/xsm.h +2 -2
@@ -152,7 +152,7 @@ struct xsm_operations {int (*vm_event_control) (struct domain *d,int mode,int op); -#ifdef HAS_MEM_ACCESS +#ifdef CONFIG_HAS_MEM_ACCESS int (*mem_access) (struct domain *d);#endif
@@ -603,7 +603,7 @@ static inline int xsm_vm_event_control (xsm_default_t def, struct domain *d, intreturn xsm_ops->vm_event_control (d, mode, op); } -#ifdef HAS_MEM_ACCESS +#ifdef CONFIG_HAS_MEM_ACCESS static inline int xsm_mem_access (xsm_default_t def,struct domain *d) {return xsm_ops->mem_access (d);
xen/xsm/dummy.c +1 -1
@@ -129,7 +129,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)set_to_dummy_if_null (ops, vm_event_control); -#ifdef HAS_MEM_ACCESS +#ifdef CONFIG_HAS_MEM_ACCESS set_to_dummy_if_null (ops, mem_access);#endif
xen/xsm/flask/hooks.c +2 -2
@@ -1192,7 +1192,7 @@ static int flask_vm_event_control(struct domain *d, int mode, int op)return current_has_perm (d,SECCLASS_DOMAIN2 ,DOMAIN2__VM_EVENT ); } -#ifdef HAS_MEM_ACCESS +#ifdef CONFIG_HAS_MEM_ACCESS static int flask_mem_access (struct domain *d) {return current_has_perm (d,SECCLASS_DOMAIN2 ,DOMAIN2__MEM_ACCESS );
@@ -1705,7 +1705,7 @@ static struct xsm_operations flask_ops = { .vm_event_control = flask_vm_event_control, -#ifdef HAS_MEM_ACCESS +#ifdef CONFIG_HAS_MEM_ACCESS .mem_access = flask_mem_access,#endif
Signature · 1 line
2.4.10
PATCH v6 1/1 24/28] build: convert HAS_MEM_PAGING use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_MEM_PAGING defines in the code base.
--- config/x86_32.mk | 1 - config/x86_64.mk | 1 - xen/Rules.mk | 1 - xen/arch/x86/Kconfig | 1 + xen/common/Kconfig | 4 ++++ xen/common/memory.c | 2 +- xen/common/vm_event.c | 8 ++++---- xen/include/xsm/dummy.h | 2 +- xen/include/xsm/xsm.h | 4 ++-- xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 4 ++-- 11 files changed, 16 insertions(+), 14 deletions(-)
config/x86_32.mk +0 -1
@@ -6,7 +6,6 @@ CONFIG_MIGRATE := y CONFIG_XCUTILS := y HAS_MEM_ACCESS := y -HAS_MEM_PAGING := y HAS_MEM_SHARING := y CFLAGS += -m32 -march=i686
config/x86_64.mk +0 -1
@@ -7,7 +7,6 @@ CONFIG_MIGRATE := y CONFIG_XCUTILS := y HAS_MEM_ACCESS := y -HAS_MEM_PAGING := y HAS_MEM_SHARING := y CONFIG_XEN_INSTALL_SUFFIX := .gz
xen/Rules.mk +0 -1
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug) += -DCRASH_DEBUG CFLAGS-$(perfc) += -DPERF_COUNTERS CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE -CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
xen/arch/x86/Kconfig +1 -0
@@ -16,6 +16,7 @@ config X86 select HAS_PDX select HAS_KEXEC select HAS_MEM_ACCESS + select HAS_MEM_PAGING config ARCH_DEFCONFIG string
xen/common/Kconfig +4 -0
@@ -9,6 +9,10 @@ config HAS_DEVICE_TREE config HAS_MEM_ACCESS bool +# Select HAS_MEM_PAGING if mem paging is supported +config HAS_MEM_PAGING + bool + # Select HAS_PDX if PDX is supported config HAS_PDX bool
xen/common/memory.c +1 -1
@@ -1282,7 +1282,7 @@ int prepare_ring_for_helper( page =get_page_from_gfn (d, gmfn, &p2mt,P2M_UNSHARE ); -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING if (p2m_is_paging (p2mt) ) {if ( page )
xen/common/vm_event.c +4 -4
@@ -403,7 +403,7 @@ void vm_event_resume(struct domain *d, struct vm_event_domain *ved)break ;#endif -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING case VM_EVENT_REASON_MEM_PAGING :p2m_mem_paging_resume (d, &rsp);break ;
@@ -502,7 +502,7 @@ int __vm_event_claim_slot(struct domain *d, struct vm_event_domain *ved,return vm_event_grab_slot (ved, (current->domain != d)); } -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING /* Registered with Xen-bound event channel for incoming notifications. */ static void mem_paging_notification (struct vcpu *v,unsigned int port) {
@@ -530,7 +530,7 @@ static void mem_sharing_notification(struct vcpu *v, unsigned int port)/* Clean up on domain destruction */ void vm_event_cleanup (struct domain *d) { -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING if ( d->vm_event->paging.ring_page ) {/* Destroying the wait queue head means waking up all
@@ -592,7 +592,7 @@ int vm_event_domctl(struct domain *d, xen_domctl_vm_event_op_t *vec,switch ( vec->mode ) { -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING case XEN_DOMCTL_VM_EVENT_OP_PAGING : {struct vm_event_domain *ved = &d->vm_event->paging;
xen/include/xsm/dummy.h +1 -1
@@ -568,7 +568,7 @@ static XSM_INLINE int xsm_mem_access(XSM_DEFAULT_ARG struct domain *d) }#endif -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING static XSM_INLINE int xsm_mem_paging(XSM_DEFAULT_ARG struct domain *d) {XSM_ASSERT_ACTION (XSM_DM_PRIV );
xen/include/xsm/xsm.h +2 -2
@@ -156,7 +156,7 @@ struct xsm_operations {int (*mem_access) (struct domain *d);#endif -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING int (*mem_paging) (struct domain *d);#endif
@@ -610,7 +610,7 @@ static inline int xsm_mem_access (xsm_default_t def, struct domain *d) }#endif -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING static inline int xsm_mem_paging (xsm_default_t def,struct domain *d) {return xsm_ops->mem_paging (d);
xen/xsm/dummy.c +1 -1
@@ -133,7 +133,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)set_to_dummy_if_null (ops, mem_access);#endif -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING set_to_dummy_if_null (ops, mem_paging);#endif
xen/xsm/flask/hooks.c +2 -2
@@ -1199,7 +1199,7 @@ static int flask_mem_access(struct domain *d) }#endif -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING static int flask_mem_paging (struct domain *d) {return current_has_perm (d,SECCLASS_DOMAIN2 ,DOMAIN2__MEM_PAGING );
@@ -1709,7 +1709,7 @@ static struct xsm_operations flask_ops = { .mem_access = flask_mem_access,#endif -#ifdef HAS_MEM_PAGING +#ifdef CONFIG_HAS_MEM_PAGING .mem_paging = flask_mem_paging,#endif
Signature · 1 line
2.4.10
Re: [PATCHv6] 24/28] build: convert HAS_MEM_PAGING use to Kconfig
config/x86_32.mk CONFIG_MIGRATE := y · line 9
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:52, <[email protected]> wrote:
config/x86_32.mk +0
-1@@ -6,7 +6,6 @@ CONFIG_MIGRATE := y CONFIG_XCUTILS := y HAS_MEM_ACCESS := y -HAS_MEM_PAGING := y
Considering that the previous patch supposedly eliminated HAS_MEM_ACCESS, the context here looks suspicious.
config/x86_64.mk CONFIG_MIGRATE := y · line 10
Quoted 7 lines
config/x86_64.mk +0
-1@@ -7,7 +7,6 @@ CONFIG_MIGRATE := y CONFIG_XCUTILS := y HAS_MEM_ACCESS := y -HAS_MEM_PAGING := y
Same here.
Jan
PATCH v6 1/1 25/28] build: convert HAS_MEM_SHARING use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_MEM_SHARING defines in the code base.
--- config/x86_32.mk | 1 - config/x86_64.mk | 1 - xen/Rules.mk | 1 - xen/arch/x86/Kconfig | 1 + xen/common/Kconfig | 4 ++++ xen/common/memory.c | 2 +- xen/common/vm_event.c | 6 +++--- xen/include/xsm/dummy.h | 2 +- xen/include/xsm/xsm.h | 4 ++-- xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 4 ++-- 11 files changed, 15 insertions(+), 13 deletions(-)
config/x86_32.mk +0 -1
@@ -6,7 +6,6 @@ CONFIG_MIGRATE := y CONFIG_XCUTILS := y HAS_MEM_ACCESS := y -HAS_MEM_SHARING := y CFLAGS += -m32 -march=i686
config/x86_64.mk +0 -1
@@ -7,7 +7,6 @@ CONFIG_MIGRATE := y CONFIG_XCUTILS := y HAS_MEM_ACCESS := y -HAS_MEM_SHARING := y CONFIG_XEN_INSTALL_SUFFIX := .gz
xen/Rules.mk +0 -1
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug) += -DCRASH_DEBUG CFLAGS-$(perfc) += -DPERF_COUNTERS CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE -CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER ifneq ($(max_phys_cpus),)
xen/arch/x86/Kconfig +1 -0
@@ -17,6 +17,7 @@ config X86 select HAS_KEXEC select HAS_MEM_ACCESS select HAS_MEM_PAGING + select HAS_MEM_SHARING config ARCH_DEFCONFIG string
xen/common/Kconfig +4 -0
@@ -13,6 +13,10 @@ config HAS_MEM_ACCESS config HAS_MEM_PAGING bool +# Select HAS_MEM_SHARING if mem sharing is supported +config HAS_MEM_SHARING + bool + # Select HAS_PDX if PDX is supported config HAS_PDX bool
xen/common/memory.c +1 -1
@@ -1291,7 +1291,7 @@ int prepare_ring_for_helper(return -ENOENT ; }#endif -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING if (p2m_is_shared (p2mt) ) {if ( page )
xen/common/vm_event.c +3 -3
@@ -518,7 +518,7 @@ static void monitor_notification(struct vcpu *v, unsigned int port)vm_event_resume (v->domain, &v->domain->vm_event->monitor); } -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING /* Registered with Xen-bound event channel for incoming notifications. */ static void mem_sharing_notification (struct vcpu *v,unsigned int port) {
@@ -549,7 +549,7 @@ void vm_event_cleanup(struct domain *d)destroy_waitqueue_head (&d->vm_event->monitor.wq); (void )vm_event_disable (d, &d->vm_event->monitor); } -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING if ( d->vm_event->share.ring_page ) {destroy_waitqueue_head (&d->vm_event->share.wq);
@@ -682,7 +682,7 @@ int vm_event_domctl(struct domain *d, xen_domctl_vm_event_op_t *vec, }break ; -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING case XEN_DOMCTL_VM_EVENT_OP_SHARING : {struct vm_event_domain *ved = &d->vm_event->share;
xen/include/xsm/dummy.h +1 -1
@@ -576,7 +576,7 @@ static XSM_INLINE int xsm_mem_paging(XSM_DEFAULT_ARG struct domain *d) }#endif -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING static XSM_INLINE int xsm_mem_sharing(XSM_DEFAULT_ARG struct domain *d) {XSM_ASSERT_ACTION (XSM_DM_PRIV );
xen/include/xsm/xsm.h +2 -2
@@ -160,7 +160,7 @@ struct xsm_operations {int (*mem_paging) (struct domain *d);#endif -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING int (*mem_sharing) (struct domain *d);#endif
@@ -617,7 +617,7 @@ static inline int xsm_mem_paging (xsm_default_t def, struct domain *d) }#endif -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING static inline int xsm_mem_sharing (xsm_default_t def,struct domain *d) {return xsm_ops->mem_sharing (d);
xen/xsm/dummy.c +1 -1
@@ -137,7 +137,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)set_to_dummy_if_null (ops, mem_paging);#endif -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING set_to_dummy_if_null (ops, mem_sharing);#endif
xen/xsm/flask/hooks.c +2 -2
@@ -1206,7 +1206,7 @@ static int flask_mem_paging(struct domain *d) }#endif -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING static int flask_mem_sharing (struct domain *d) {return current_has_perm (d,SECCLASS_DOMAIN2 ,DOMAIN2__MEM_SHARING );
@@ -1713,7 +1713,7 @@ static struct xsm_operations flask_ops = { .mem_paging = flask_mem_paging,#endif -#ifdef HAS_MEM_SHARING +#ifdef CONFIG_HAS_MEM_SHARING .mem_sharing = flask_mem_sharing,#endif
Signature · 1 line
2.4.10
PATCH v6 1/1 26/28] build: convert HAS_GICV3 use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_GICV3 defines in the code base.
--- config/arm64.mk | 1 - xen/arch/arm/Kconfig | 5 +++++ xen/arch/arm/Makefile | 2 +- xen/arch/arm/Rules.mk | 2 -- xen/arch/arm/vgic.c | 2 +- xen/include/asm-arm/domain.h | 2 +- xen/include/asm-arm/gic.h | 4 ++-- xen/include/asm-arm/vgic.h | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-)
config/arm64.mk +0 -1
@@ -7,7 +7,6 @@ CONFIG_XEN_INSTALL_SUFFIX := CFLAGS += #-marm -march= -mcpu= etc HAS_MEM_ACCESS := y -HAS_GICV3 := y # Use only if calling $(LD) directly. LDFLAGS_DIRECT += -EL
xen/arch/arm/Kconfig +5 -0
@@ -13,6 +13,7 @@ config ARM_32 config ARM_64 def_bool y depends on 64BIT + select HAS_GICV3 config ARM def_bool y
@@ -30,6 +31,10 @@ config ARCH_DEFCONFIG menu "Architecture Features" +# Select HAS_GICV3 if GICv3 is supported +config HAS_GICV3 + bool + endmenu source "common/Kconfig"
xen/arch/arm/Makefile +1 -1
@@ -13,7 +13,7 @@ obj-y += sysctl.o obj-y += domain_build.o obj-y += gic.o gic-v2.o obj-$(CONFIG_ARM_32) += gic-hip04.o -obj-$(HAS_GICV3) += gic-v3.o +obj-$(CONFIG_HAS_GICV3) += gic-v3.o obj-y += io.o obj-y += irq.o obj-y += kernel.o
xen/arch/arm/Rules.mk +0 -2
@@ -32,8 +32,6 @@ ifneq ($(call cc-option,$(CC),-fvisibility=hidden,n),n) CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE endif -CFLAGS-$(HAS_GICV3) += -DHAS_GICV3 - EARLY_PRINTK := n ifeq ($(debug),y)
xen/arch/arm/vgic.c +1 -1
@@ -90,7 +90,7 @@ int domain_vgic_init(struct domain *d, unsigned int nr_spis)switch ( d->arch.vgic.version ) { -#ifdef HAS_GICV3 +#ifdef CONFIG_HAS_GICV3 case GIC_V3 :if (vgic_v3_init (d) )return -ENODEV ;
xen/include/asm-arm/domain.h +1 -1
@@ -102,7 +102,7 @@ struct arch_domainstruct pending_irq *pending_irqs;/* Base address for guest GIC */ paddr_t dbase;/* Distributor base address */ -#ifdef HAS_GICV3 +#ifdef CONFIG_HAS_GICV3 /* GIC V3 addressing */ /* List of contiguous occupied by the redistributors */ struct vgic_rdist_region {
xen/include/asm-arm/gic.h +2 -2
@@ -163,7 +163,7 @@#define DT_MATCH_GIC_V3 DT_MATCH_COMPATIBLE("arm,gic-v3") -#ifdef HAS_GICV3 +#ifdef CONFIG_HAS_GICV3 /* * GICv3 registers that needs to be saved/restored */
@@ -191,7 +191,7 @@ struct gic_v2 {*/ union gic_state_data {struct gic_v2 v2; -#ifdef HAS_GICV3 +#ifdef CONFIG_HAS_GICV3 struct gic_v3 v3;#endif };
xen/include/asm-arm/vgic.h +1 -1
@@ -251,7 +251,7 @@ extern void vgic_free_virq(struct domain *d, unsigned int virq);void vgic_v2_setup_hw (paddr_t dbase,paddr_t cbase,paddr_t csize,paddr_t vbase,uint32_t aliased_offset); -#ifdef HAS_GICV3 +#ifdef CONFIG_HAS_GICV3 struct rdist_region ; void vgic_v3_setup_hw(paddr_t dbase, unsigned int nr_rdist_regions,
Signature · 1 line
2.4.10
PATCH v6 1/1 27/28] build: convert CONFIG_COMPAT to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_COMPAT defines in the code base.
--- xen/arch/x86/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+)
xen/arch/x86/Kconfig +7 -0
@@ -25,6 +25,13 @@ config ARCH_DEFCONFIG menu "Architecture Features" +config COMPAT + def_bool y + help + 32-bit interface support on 64-bit Xen which is used for both + HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective + of the destination runmode of the guest. + endmenu source "common/Kconfig"
Signature · 1 line
2.4.10
Re: [PATCHv6] 27/28] build: convert CONFIG_COMPAT to Kconfig
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:52, <[email protected]> wrote:
--- xen/arch/x86/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+)
This can't be complete - you ought to be deleting the current definition.
xen/arch/x86/Kconfig config ARCH_DEFCONFIG · line 33
Quoted 12 lines
xen/arch/x86/Kconfig +6
-0@@ -25,6 +25,13 @@ config ARCH_DEFCONFIG menu "Architecture Features" +config COMPAT + def_bool y + help + 32-bit interface support on 64-bit Xen which is used for both + HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective + of the destination runmode of the guest.
I also don't think help text is very useful here, as it won't appear anywhere (and due to the hvmloader needs it's also not very likely to become a user selectable option going forward).
Jan
Re: [PATCHv6] 27/28] build: convert CONFIG_COMPAT to Kconfig
Quoted 6 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:52, <[email protected]> wrote:
--- xen/arch/x86/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+)This can't be complete - you ought to be deleting the current definition.
I don't understand?
Quoted 18 lines
xen/arch/x86/Kconfig config ARCH_DEFCONFIG · line 33
Quoted 13 lines
xen/arch/x86/Kconfig +6
-0@@ -25,6 +25,13 @@ config ARCH_DEFCONFIG menu "Architecture Features" +config COMPAT + def_bool y + help + 32-bit interface support on 64-bit Xen which is used for both + HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective + of the destination runmode of the guest.I also don't think help text is very useful here, as it won't appear anywhere (and due to the hvmloader needs it's also not very likely to become a user selectable option going forward).
Quoted 2 lines
Jan
This wasn't meant to be a user-selectable option. The help text is actually based on a conversation I had with Andrew Cooper on IRC. During the RFC of the kconfig patch series I had suggested (and it seemed like some liked it), that even for options that were not user facing that the Kconfig file, that defines the CONFIG_ variable could hold information about what it does since there is often a lack of information about what a CONFIG_ variable is for. This is my attempt at starting that. I can convert it to a plain comment. But it seems better to have some kind of documentation on these variables in one place and that place would make sense to be where they are defined.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCHv6] 27/28] build: convert CONFIG_COMPAT to Kconfig
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 13:52, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.11.15 at 18:52, <[email protected]> wrote:
--- xen/arch/x86/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+)This can't be complete - you ought to be deleting the current definition.
I don't understand?
I'd expect you to delete the
#define CONFIG_COMPAT
from wherever it currently lives.
Quoted 17 lines
Quoted 6 lines
Quoted 6 lines
xen/arch/x86/Kconfig +0
-0@@ -25,6 +25,13 @@ config ARCH_DEFCONFIG menu "Architecture Features"Quoted 10 lines
xen/arch/x86/Kconfig config ARCH_DEFCONFIG · line 33
Quoted 6 lines
xen/arch/x86/Kconfig +6
-0+config COMPAT + def_bool y + help + 32-bit interface support on 64-bit Xen which is used for both + HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective + of the destination runmode of the guest.I also don't think help text is very useful here, as it won't appear anywhere (and due to the hvmloader needs it's also not very likely to become a user selectable option going forward).
Quoted 10 lines
This wasn't meant to be a user-selectable option. The help text is actually based on a conversation I had with Andrew Cooper on IRC. During the RFC of the kconfig patch series I had suggested (and it seemed like some liked it), that even for options that were not user facing that the
Kconfigfile, that defines theCONFIG_variable could hold information about what it does since there is often a lack of information about what aCONFIG_variable is for. This is my attempt at starting that. I can convert it to a plain comment. But it seems better to have some kind of documentation on these variables in one place and that place would make sense to be where they are defined.
Okay, that's fine if it's meant to be a general goal.
Jan
PATCH v6 1/1 28/28] build: convert kexec options to CONFIG_KEXEC
In reply to Doug GoldsteinReplace kexec := y in Rules.mk with a Kconfig option called CONFIG_KEXEC
--- xen/Rules.mk | 6 ------ xen/common/Kconfig | 12 ++++++++++++ 2 files changed, 12 insertions(+), 6 deletions(-)
xen/Rules.mk +0 -6
@@ -10,7 +10,6 @@ lock_profile ?= n crash_debug ?= n frame_pointer ?= n lto ?= n -kexec ?= y -include $(BASEDIR)/include/config/auto.conf
@@ -65,11 +64,6 @@ ifneq ($(max_phys_irqs),) CFLAGS-y += -DMAX_PHYS_IRQS=$(max_phys_irqs) endif -CONFIG_KEXEC-$(CONFIG_HAS_KEXEC) := $(kexec) -CONFIG_KEXEC := $(CONFIG_KEXEC-y) - -CFLAGS-$(CONFIG_KEXEC) += -DCONFIG_KEXEC - AFLAGS-y += -D__ASSEMBLY__ -include $(BASEDIR)/include/xen/config.h # Clang's built-in assembler can't handle .code16/.code32/.code64 yet
xen/common/Kconfig +12 -0
@@ -29,4 +29,16 @@ config HAS_KEXEC config HAS_GDBSX bool +# Enable/Disable kexec support +config KEXEC + bool "kexec support" + default y + depends on HAS_KEXEC + ---help--- + Allows a running Xen hypervisor to be replaced with another OS + without rebooting. This is primarily used to execute a crash + environment to collect information on a Xen hypervisor or dom0 crash. + + If unsure, say Y. + endmenu
Signature · 1 line
2.4.10
Hi Doug,
Quoted 9 lines · Doug Goldstein
The following series is a follow on to the
Kconfigconversion patch series. There are still more components to convert however this is the bare minimal to get everything working and get the options out of the existing makefiles.The
CONFIG_HAS_variables are there to match the behavior of the LinuxCONFIG_HAVE_variables. The purpose is to say that this hardware/profile/env supports this option while theCONFIG_variable states that this option was requested on/off by user intervention.
Quoted 7 lines
The UARTs are now uniformly prefixed as
CONFIG_UART_and dropping most of theCONFIG_HAS_labeling for them. This means they are now user selectable as requested by Julien Grall in the prior review. The question I've got is the old config was just for selecting defaults. Users could enable the OMAP UART for arm64 for example but I'm not sure if that's valid. Currently this patchset makes those UARTs not user selectable if they were not previously defaulted on. But I would like some feedback on this if possible.
While you know allow the user to enable a specific UART drivers, I still have the same concern, i.e the default config used for ARM32 and ARM64 will have all the UARTs drivers disabled.
This means that when your series will be pushed, all the actual users of ARM (included automated test suite such as osstest) will have to write down a config in order to get Xen boot again on their board.
Quoted 8 lines
Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.
The patch series can be grabbed at:
https://github.com/cardoe/xen/tree/kconfig_v6
I can't find the kconfig_v6 branch on your github.
Regards,
Signature · 1 line
Julien Grall
Quoted 20 lines · Julien Grall
Hi Doug,
Quoted 9 lines · Doug Goldstein
The following series is a follow on to the
Kconfigconversion patch series. There are still more components to convert however this is the bare minimal to get everything working and get the options out of the existing makefiles.The
CONFIG_HAS_variables are there to match the behavior of the LinuxCONFIG_HAVE_variables. The purpose is to say that this hardware/profile/env supports this option while theCONFIG_variable states that this option was requested on/off by user intervention.Quoted 7 lines
The UARTs are now uniformly prefixed as
CONFIG_UART_and dropping most of theCONFIG_HAS_labeling for them. This means they are now user selectable as requested by Julien Grall in the prior review. The question I've got is the old config was just for selecting defaults. Users could enable the OMAP UART for arm64 for example but I'm not sure if that's valid. Currently this patchset makes those UARTs not user selectable if they were not previously defaulted on. But I would like some feedback on this if possible.
Quoted 3 lines
While you know allow the user to enable a specific UART drivers, I still have the same concern, i.e the default config used for ARM32 and ARM64 will have all the UARTs drivers disabled.
Have you actually tested this? I have built it multiple times locally and that's not the case at all. The same UART drivers that are enabled in master today and enabled by default everytime.
Quoted 11 lines
This means that when your series will be pushed, all the actual users of ARM (included automated test suite such as osstest) will have to write down a config in order to get Xen boot again on their board.
Quoted 6 lines
Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.
Quoted 5 lines
Quoted 2 lines
The patch series can be grabbed at:
https://github.com/cardoe/xen/tree/kconfig_v6I can't find the
kconfig_v6branch on your github.
Sorry about that. Pushed. It was the same as kconfig_v5 just rebased up to a more recent version of staging.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 21 lines · Doug Goldstein
Quoted 20 lines · Julien Grall
Hi Doug,
Quoted 16 lines · Doug Goldstein
The following series is a follow on to the
Kconfigconversion patch series. There are still more components to convert however this is the bare minimal to get everything working and get the options out of the existing makefiles.The
CONFIG_HAS_variables are there to match the behavior of the LinuxCONFIG_HAVE_variables. The purpose is to say that this hardware/profile/env supports this option while theCONFIG_variable states that this option was requested on/off by user intervention.The UARTs are now uniformly prefixed as
CONFIG_UART_and dropping most of theCONFIG_HAS_labeling for them. This means they are now user selectable as requested by Julien Grall in the prior review. The question I've got is the old config was just for selecting defaults. Users could enable the OMAP UART for arm64 for example but I'm not sure if that's valid. Currently this patchset makes those UARTs not user selectable if they were not previously defaulted on. But I would like some feedback on this if possible.
Quoted 7 lines
Quoted 3 lines
While you know allow the user to enable a specific UART drivers, I still have the same concern, i.e the default config used for ARM32 and ARM64 will have all the UARTs drivers disabled.
Have you actually tested this? I have built it multiple times locally and that's not the case at all. The same UART drivers that are enabled in master today and enabled by default everytime.
You are right sorry. I didn't build test it but I looked to the code and it wasn't obvious that it was enabled by default.
FWIW, Linux is using "default ..." to document the default value. It may be nice to do the same here too.
config ARM_PATCH_PHYS_VIRT
bool "Patch physical to virtual translations at runtime" if EMBEDDED
default y
depends on !XIP_KERNEL && MMU
depends on !ARCH_REALVIEW || !SPARSEMEMRegards,
Signature · 1 line
Julien Grall
Quoted 47 lines · Doug Goldstein
The following series is a follow on to the
Kconfigconversion patch series. There are still more components to convert however this is the bare minimal to get everything working and get the options out of the existing makefiles.The
CONFIG_HAS_variables are there to match the behavior of the LinuxCONFIG_HAVE_variables. The purpose is to say that this hardware/profile/env supports this option while theCONFIG_variable states that this option was requested on/off by user intervention.The UARTs are now uniformly prefixed as
CONFIG_UART_and dropping most of theCONFIG_HAS_labeling for them. This means they are now user selectable as requested by Julien Grall in the prior review. The question I've got is the old config was just for selecting defaults. Users could enable the OMAP UART for arm64 for example but I'm not sure if that's valid. Currently this patchset makes those UARTs not user selectable if they were not previously defaulted on. But I would like some feedback on this if possible.Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.
The patch series can be grabbed at:
https://github.com/cardoe/xen/tree/kconfig_v6Changes since v5:
- added Andrew Cooper's Acked-by and Tested-by
- rebased to resolve conflict with NUMA changes in staging (minor conflict)Changes since v4:
- v4 was an oops and was a resend of v3. So the 'Changes since v3' apply here.Changes since v3:
- fix dependency inversion causing options to appear to flip back on (hi kexec)
- separate out wiring upKconfigand then using it in the build (added patch 3)
- dropped the old patch 3
- changed UART configs to be prefixed asCONFIG_UART_
- changed ARM UART defaultsChanges since v2:
- dropx86_32support (patch 2)
- fix make defconfig (patch 2)
- fix 'make -C xen' vs 'cd xen && make' behaving differently (patch 2)
- fix for ARM64 builds (added patch 3)
- At this point all targets are tested onx86_64, arm32, and arm64 with fresh clones and rebuilds.
Quoted 7 lines
Changes since v1:
- hopefully addressed all review comments
- added CCs to all maintainers from get_maintainer.pl as requested
- dropKbuildto buildKconfigand instead port theMakefileto the Xen env
- add support for xconfig/gconfig
- includeKconfigdocs from Linux
All,
There's been quite a few comments on this series and I'll admit I'm a bit lost as to the requested direction for the series so just to clear things up I'm going to send this out and address all the items before the next repost. My goal is to save you all time as reviewers so that hopefully you'll only have to review one more series.
1. Remove the KEXEC patch from this series and add it to the follow-on series?
2. Drop UART changes and just go back to the mechanical changes that enable the UARTs on ARM as they are today. The early patches failed to remove the items from config/arm{32,64}.mk but remedy that.
3. sync the (A) entire linux/scripts/kconfig directory or (B) basics from linux/scripts/kconfig or (C) basics + frontends for future series when user-configurable options are presented. Note: Option B will require not just copying files but making modifications (read: forking) until a more complete copy is brought over.
4. Should I rename xen/scripts/kconfig to xen/tools/kconfig?
5. Should I drop as much $(BASEDIR) usage as possible?
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 04:02, <[email protected]> wrote:
There's been quite a few comments on this series and I'll admit I'm a bit lost as to the requested direction for the series so just to clear things up I'm going to send this out and address all the items before the next repost. My goal is to save you all time as reviewers so that hopefully you'll only have to review one more series.
My views (already incorporating changes thereto due to feedback from others):
Quoted 2 lines
1. Remove the KEXEC patch from this series and add it to the follow-on series?
I don't mind it being in the initial series. All I do mind is it being done in two pieces.
Quoted 2 lines
2. Drop UART changes and just go back to the mechanical changes that enable the UARTs on ARM as they are today.
Yes.
Quoted 5 lines
3. sync the (A) entire linux/scripts/kconfig directory or (B) basics from linux/scripts/kconfig or (C) basics + frontends for future series when user-configurable options are presented. Note: Option B will require not just copying files but making modifications (read: forking) until a more complete copy is brought over.
While mostly moot at this point - what's the difference between (A) and (C)? Or is (C) meant to represent (A) split into (B) plus a follow-up?
In any event, with it at the same time getting clarified who is expected to look after pulling in updates, I won't object to (A) anymore. With one caveat: I don't recall you pulling over rules to actually update the *_shipped files if needed. Unless I overlooked these, I'd like to make it a requirement to have these rules in place and working (but, just like in Linux, disabled by default).
Quoted 1 line
4. Should I rename xen/scripts/kconfig to xen/tools/kconfig?
Definitely. kconfig is not a script, it just deals with scripts (which are scattered around the tree).
Quoted 1 line
5. Should I drop as much $(BASEDIR) usage as possible?
Unless they are required for current functionality, yes.
Jan
Quoted 9 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 04:02, <[email protected]> wrote:
There's been quite a few comments on this series and I'll admit I'm a bit lost as to the requested direction for the series so just to clear things up I'm going to send this out and address all the items before the next repost. My goal is to save you all time as reviewers so that hopefully you'll only have to review one more series.
My views (already incorporating changes thereto due to feedback from others):
I agree with your answers, except...
Quoted 5 lines
Quoted 2 lines
1. Remove the KEXEC patch from this series and add it to the follow-on series?
I don't mind it being in the initial series. All I do mind is it being done in two pieces.
... I don't follow the "in two pieces" bit, I suppose Doug will know what that is about, but I neither agree nor disagree since I've no idea what it means.
Ian.
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 10:50, <[email protected]> wrote:
Quoted 4 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 04:02, <[email protected]> wrote:
1. Remove the KEXEC patch from this series and add it to the follow-on series?
Quoted 6 lines
Quoted 2 lines
I don't mind it being in the initial series. All I do mind is it being done in two pieces.
... I don't follow the "in two pieces" bit, I suppose Doug will know what that is about, but I neither agree nor disagree since I've no idea what it means.
This referred to patch 15 converting HAS_KEXEC and patch 28 introducing CONFIG_KEXEC.
Jan
Quoted 11 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 10:50, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 03.12.15 at 04:02, <[email protected]> wrote:
1. Remove the KEXEC patch from this series and add it to the follow-on
series?I don't mind it being in the initial series. All I do mind is it being done
in two pieces.
Quoted 8 lines
Quoted 5 lines
... I don't follow the "in two pieces" bit, I suppose Doug will know what
that is about, but I neither agree nor disagree since I've no idea what it
means.This referred to patch 15 converting
HAS_KEXECand patch 28 introducingCONFIG_KEXEC.
Ah, ok. I have no opinion on that split.
Ian.