Kconfig conversion
v7 cover 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.
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_v7
Change since v6:
- drop UART conversion for ARM to make them selectable
- update to Linux 4.3 copy of kconfig
- sync entire kconfig directory from Linux (not a change but point of order)
- drop changes to #endif comments that added CONFIG_
- add patch to add myself as the maintainer of kconfig bits
- move xen/scripts/kconfig to xen/tools/kconfig
- alphabatized entries in some cases
- dropped Acked-by and Tested-by (minor changes in all to alphabatize)
- added initial x86_128 support
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.3
MAINTAINERS: add myself for kconfig
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 / 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
.gitignore | 6 + MAINTAINERS | 6 + config/arm32.mk | 5 - config/arm64.mk | 4 - config/x86_32.mk | 2 - config/x86_64.mk | 3 - docs/misc/kconfig-language.txt | 395 ++++ docs/misc/kconfig.txt | 237 +++ xen/Kconfig | 24 + xen/Makefile | 29 + xen/Rules.mk | 22 +- xen/arch/arm/Kconfig | 42 + xen/arch/arm/Makefile | 2 +- xen/arch/arm/Rules.mk | 8 - xen/arch/arm/configs/arm32_defconfig | 0 xen/arch/arm/configs/arm64_defconfig | 0 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 | 47 + 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 | 59 + xen/drivers/char/Makefile | 14 +- xen/drivers/char/ns16550.c | 38 +- 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 | 12 + 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/xen/config.h | 2 + xen/include/xen/hvm/iommu.h | 2 +- xen/include/xen/iommu.h | 12 +- xen/include/xen/mem_access.h | 2 +- xen/include/xen/pdx.h | 2 +- xen/include/xen/sched.h | 4 +- xen/include/xsm/dummy.h | 10 +- xen/include/xsm/xsm.h | 24 +- xen/tools/kconfig/.gitignore | 22 + xen/tools/kconfig/Makefile | 317 ++++ xen/tools/kconfig/Makefile.host | 128 ++ xen/tools/kconfig/Makefile.kconfig | 76 + xen/tools/kconfig/POTFILES.in | 12 + xen/tools/kconfig/check.sh | 13 + xen/tools/kconfig/conf.c | 722 +++++++ xen/tools/kconfig/confdata.c | 1245 +++++++++++++ xen/tools/kconfig/expr.c | 1206 ++++++++++++ xen/tools/kconfig/expr.h | 238 +++ xen/tools/kconfig/gconf.c | 1521 +++++++++++++++ xen/tools/kconfig/gconf.glade | 661 +++++++ xen/tools/kconfig/images.c | 326 ++++ xen/tools/kconfig/kxgettext.c | 235 +++ xen/tools/kconfig/list.h | 131 ++ xen/tools/kconfig/lkc.h | 186 ++ xen/tools/kconfig/lkc_proto.h | 52 + xen/tools/kconfig/lxdialog/.gitignore | 4 + xen/tools/kconfig/lxdialog/BIG.FAT.WARNING | 4 + xen/tools/kconfig/lxdialog/check-lxdialog.sh | 91 + xen/tools/kconfig/lxdialog/checklist.c | 332 ++++ xen/tools/kconfig/lxdialog/dialog.h | 257 +++ xen/tools/kconfig/lxdialog/inputbox.c | 301 +++ xen/tools/kconfig/lxdialog/menubox.c | 437 +++++ xen/tools/kconfig/lxdialog/textbox.c | 408 ++++ xen/tools/kconfig/lxdialog/util.c | 713 +++++++ xen/tools/kconfig/lxdialog/yesno.c | 114 ++ xen/tools/kconfig/mconf.c | 1047 +++++++++++ xen/tools/kconfig/menu.c | 697 +++++++ xen/tools/kconfig/merge_config.sh | 162 ++ xen/tools/kconfig/nconf.c | 1561 ++++++++++++++++ xen/tools/kconfig/nconf.gui.c | 656 +++++++ xen/tools/kconfig/nconf.h | 96 + xen/tools/kconfig/qconf.cc | 1798 ++++++++++++++++++ xen/tools/kconfig/qconf.h | 338 ++++ xen/tools/kconfig/streamline_config.pl | 647 +++++++ xen/tools/kconfig/symbol.c | 1376 ++++++++++++++ xen/tools/kconfig/util.c | 147 ++ xen/tools/kconfig/zconf.gperf | 49 + xen/tools/kconfig/zconf.hash.c_shipped | 293 +++ xen/tools/kconfig/zconf.l | 374 ++++ xen/tools/kconfig/zconf.lex.c_shipped | 2473 ++++++++++++++++++++++++ xen/tools/kconfig/zconf.tab.c_shipped | 2580 ++++++++++++++++++++++++++ xen/tools/kconfig/zconf.y | 742 ++++++++ xen/xsm/dummy.c | 10 +- xen/xsm/flask/hooks.c | 30 +- xen/xsm/xsm_core.c | 2 +- xen/xsm/xsm_policy.c | 4 +- 102 files changed, 25847 insertions(+), 178 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/tools/kconfig/.gitignore create mode 100644 xen/tools/kconfig/Makefile create mode 100644 xen/tools/kconfig/Makefile.host create mode 100644 xen/tools/kconfig/Makefile.kconfig create mode 100644 xen/tools/kconfig/POTFILES.in create mode 100755 xen/tools/kconfig/check.sh create mode 100644 xen/tools/kconfig/conf.c create mode 100644 xen/tools/kconfig/confdata.c create mode 100644 xen/tools/kconfig/expr.c create mode 100644 xen/tools/kconfig/expr.h create mode 100644 xen/tools/kconfig/gconf.c create mode 100644 xen/tools/kconfig/gconf.glade create mode 100644 xen/tools/kconfig/images.c create mode 100644 xen/tools/kconfig/kxgettext.c create mode 100644 xen/tools/kconfig/list.h create mode 100644 xen/tools/kconfig/lkc.h create mode 100644 xen/tools/kconfig/lkc_proto.h create mode 100644 xen/tools/kconfig/lxdialog/.gitignore create mode 100644 xen/tools/kconfig/lxdialog/BIG.FAT.WARNING create mode 100755 xen/tools/kconfig/lxdialog/check-lxdialog.sh create mode 100644 xen/tools/kconfig/lxdialog/checklist.c create mode 100644 xen/tools/kconfig/lxdialog/dialog.h create mode 100644 xen/tools/kconfig/lxdialog/inputbox.c create mode 100644 xen/tools/kconfig/lxdialog/menubox.c create mode 100644 xen/tools/kconfig/lxdialog/textbox.c create mode 100644 xen/tools/kconfig/lxdialog/util.c create mode 100644 xen/tools/kconfig/lxdialog/yesno.c create mode 100644 xen/tools/kconfig/mconf.c create mode 100644 xen/tools/kconfig/menu.c create mode 100755 xen/tools/kconfig/merge_config.sh create mode 100644 xen/tools/kconfig/nconf.c create mode 100644 xen/tools/kconfig/nconf.gui.c create mode 100644 xen/tools/kconfig/nconf.h create mode 100644 xen/tools/kconfig/qconf.cc create mode 100644 xen/tools/kconfig/qconf.h create mode 100755 xen/tools/kconfig/streamline_config.pl create mode 100644 xen/tools/kconfig/symbol.c create mode 100644 xen/tools/kconfig/util.c create mode 100644 xen/tools/kconfig/zconf.gperf create mode 100644 xen/tools/kconfig/zconf.hash.c_shipped create mode 100644 xen/tools/kconfig/zconf.l create mode 100644 xen/tools/kconfig/zconf.lex.c_shipped create mode 100644 xen/tools/kconfig/zconf.tab.c_shipped create mode 100644 xen/tools/kconfig/zconf.y
Signature · 1 line
2.4.10
PATCH v7 1/28 build: import Kbuild/Kconfig from Linux 4.3
Import the following files and directories from the Linux v4.3 tag / commit id 6a13feb9c82803e2b815eca72fa7a9f5561d7861.
- scripts/kconfig -> xen/tools/kconfig
- Documentation/kbuild/kconfig{,-language}.txt -> docs/misc/kconfig{-language}.txt
- scripts/Makefile.host -> xen/tools/kconfig/Makefile.host
These files are currently unused but will be used shortly.
--- docs/misc/kconfig-language.txt | 395 ++++ docs/misc/kconfig.txt | 237 +++ xen/tools/kconfig/.gitignore | 22 + xen/tools/kconfig/Makefile | 317 ++++ xen/tools/kconfig/Makefile.host | 128 ++ xen/tools/kconfig/POTFILES.in | 12 + xen/tools/kconfig/check.sh | 13 + xen/tools/kconfig/conf.c | 722 +++++++ xen/tools/kconfig/confdata.c | 1245 +++++++++++++ xen/tools/kconfig/expr.c | 1206 ++++++++++++ xen/tools/kconfig/expr.h | 238 +++ xen/tools/kconfig/gconf.c | 1521 +++++++++++++++ xen/tools/kconfig/gconf.glade | 661 +++++++ xen/tools/kconfig/images.c | 326 ++++ xen/tools/kconfig/kxgettext.c | 235 +++ xen/tools/kconfig/list.h | 131 ++ xen/tools/kconfig/lkc.h | 186 ++ xen/tools/kconfig/lkc_proto.h | 52 + xen/tools/kconfig/lxdialog/.gitignore | 4 + xen/tools/kconfig/lxdialog/BIG.FAT.WARNING | 4 + xen/tools/kconfig/lxdialog/check-lxdialog.sh | 91 + xen/tools/kconfig/lxdialog/checklist.c | 332 ++++ xen/tools/kconfig/lxdialog/dialog.h | 257 +++ xen/tools/kconfig/lxdialog/inputbox.c | 301 +++ xen/tools/kconfig/lxdialog/menubox.c | 437 +++++ xen/tools/kconfig/lxdialog/textbox.c | 408 ++++ xen/tools/kconfig/lxdialog/util.c | 713 +++++++ xen/tools/kconfig/lxdialog/yesno.c | 114 ++ xen/tools/kconfig/mconf.c | 1047 +++++++++++ xen/tools/kconfig/menu.c | 697 +++++++ xen/tools/kconfig/merge_config.sh | 162 ++ xen/tools/kconfig/nconf.c | 1561 ++++++++++++++++ xen/tools/kconfig/nconf.gui.c | 656 +++++++ xen/tools/kconfig/nconf.h | 96 + xen/tools/kconfig/qconf.cc | 1798 ++++++++++++++++++ xen/tools/kconfig/qconf.h | 338 ++++ xen/tools/kconfig/streamline_config.pl | 647 +++++++ xen/tools/kconfig/symbol.c | 1376 ++++++++++++++ xen/tools/kconfig/util.c | 147 ++ xen/tools/kconfig/zconf.gperf | 49 + xen/tools/kconfig/zconf.hash.c_shipped | 293 +++ xen/tools/kconfig/zconf.l | 374 ++++ xen/tools/kconfig/zconf.lex.c_shipped | 2473 ++++++++++++++++++++++++ xen/tools/kconfig/zconf.tab.c_shipped | 2580 ++++++++++++++++++++++++++ xen/tools/kconfig/zconf.y | 742 ++++++++ 45 files changed, 25344 insertions(+) create mode 100644 docs/misc/kconfig-language.txt create mode 100644 docs/misc/kconfig.txt create mode 100644 xen/tools/kconfig/.gitignore create mode 100644 xen/tools/kconfig/Makefile create mode 100644 xen/tools/kconfig/Makefile.host create mode 100644 xen/tools/kconfig/POTFILES.in create mode 100755 xen/tools/kconfig/check.sh create mode 100644 xen/tools/kconfig/conf.c create mode 100644 xen/tools/kconfig/confdata.c create mode 100644 xen/tools/kconfig/expr.c create mode 100644 xen/tools/kconfig/expr.h create mode 100644 xen/tools/kconfig/gconf.c create mode 100644 xen/tools/kconfig/gconf.glade create mode 100644 xen/tools/kconfig/images.c create mode 100644 xen/tools/kconfig/kxgettext.c create mode 100644 xen/tools/kconfig/list.h create mode 100644 xen/tools/kconfig/lkc.h create mode 100644 xen/tools/kconfig/lkc_proto.h create mode 100644 xen/tools/kconfig/lxdialog/.gitignore create mode 100644 xen/tools/kconfig/lxdialog/BIG.FAT.WARNING create mode 100755 xen/tools/kconfig/lxdialog/check-lxdialog.sh create mode 100644 xen/tools/kconfig/lxdialog/checklist.c create mode 100644 xen/tools/kconfig/lxdialog/dialog.h create mode 100644 xen/tools/kconfig/lxdialog/inputbox.c create mode 100644 xen/tools/kconfig/lxdialog/menubox.c create mode 100644 xen/tools/kconfig/lxdialog/textbox.c create mode 100644 xen/tools/kconfig/lxdialog/util.c create mode 100644 xen/tools/kconfig/lxdialog/yesno.c create mode 100644 xen/tools/kconfig/mconf.c create mode 100644 xen/tools/kconfig/menu.c create mode 100755 xen/tools/kconfig/merge_config.sh create mode 100644 xen/tools/kconfig/nconf.c create mode 100644 xen/tools/kconfig/nconf.gui.c create mode 100644 xen/tools/kconfig/nconf.h create mode 100644 xen/tools/kconfig/qconf.cc create mode 100644 xen/tools/kconfig/qconf.h create mode 100755 xen/tools/kconfig/streamline_config.pl create mode 100644 xen/tools/kconfig/symbol.c create mode 100644 xen/tools/kconfig/util.c create mode 100644 xen/tools/kconfig/zconf.gperf create mode 100644 xen/tools/kconfig/zconf.hash.c_shipped create mode 100644 xen/tools/kconfig/zconf.l create mode 100644 xen/tools/kconfig/zconf.lex.c_shipped create mode 100644 xen/tools/kconfig/zconf.tab.c_shipped create mode 100644 xen/tools/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/tools/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/tools/kconfig/Makefile new file +317 -0
317 lines not on this page · raw message
xen/tools/kconfig/Makefile.host new file +128 -0
128 lines not on this page · raw message
xen/tools/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/tools/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/tools/kconfig/conf.c new file +722 -0
722 lines not on this page · raw message
xen/tools/kconfig/confdata.c new file +1245 -0
1,154 lines not on this page · raw message
xen/tools/kconfig/expr.c new file +1206 -0
1,206 lines not on this page · raw message
xen/tools/kconfig/expr.h new file +238 -0
238 lines not on this page · raw message
xen/tools/kconfig/gconf.c new file +1521 -0
1,521 lines not on this page · raw message
xen/tools/kconfig/gconf.glade new file +661 -0
661 lines not on this page · raw message
xen/tools/kconfig/images.c new file +326 -0
326 lines not on this page · raw message
xen/tools/kconfig/kxgettext.c new file +235 -0
235 lines not on this page · raw message
xen/tools/kconfig/list.h new file +131 -0
131 lines not on this page · raw message
xen/tools/kconfig/lkc.h new file +186 -0
186 lines not on this page · raw message
xen/tools/kconfig/lkc_proto.h new file +52 -0
52 lines not on this page · raw message
xen/tools/kconfig/lxdialog/.gitignore new file +4 -0
Lines of this file are not shown. View the raw message.
xen/tools/kconfig/lxdialog/BIG.FAT.WARNING new file +4 -0
Lines of this file are not shown. View the raw message.
xen/tools/kconfig/lxdialog/check-lxdialog.sh new file +91 -0
91 lines not on this page · raw message
xen/tools/kconfig/lxdialog/checklist.c new file +332 -0
332 lines not on this page · raw message
xen/tools/kconfig/lxdialog/dialog.h new file +257 -0
257 lines not on this page · raw message
xen/tools/kconfig/lxdialog/inputbox.c new file +301 -0
301 lines not on this page · raw message
xen/tools/kconfig/lxdialog/menubox.c new file +437 -0
437 lines not on this page · raw message
xen/tools/kconfig/lxdialog/textbox.c new file +408 -0
408 lines not on this page · raw message
xen/tools/kconfig/lxdialog/util.c new file +713 -0
713 lines not on this page · raw message
xen/tools/kconfig/lxdialog/yesno.c new file +114 -0
114 lines not on this page · raw message
xen/tools/kconfig/mconf.c new file +1047 -0
1,047 lines not on this page · raw message
xen/tools/kconfig/menu.c new file +697 -0
697 lines not on this page · raw message
xen/tools/kconfig/merge_config.sh new file +162 -0
162 lines not on this page · raw message
xen/tools/kconfig/nconf.c new file +1561 -0
1,561 lines not on this page · raw message
xen/tools/kconfig/nconf.gui.c new file +656 -0
656 lines not on this page · raw message
xen/tools/kconfig/nconf.h new file +96 -0
96 lines not on this page · raw message
xen/tools/kconfig/qconf.cc new file +1798 -0
1,798 lines not on this page · raw message
xen/tools/kconfig/qconf.h new file +338 -0
338 lines not on this page · raw message
xen/tools/kconfig/streamline_config.pl new file +647 -0
647 lines not on this page · raw message
xen/tools/kconfig/symbol.c new file +1376 -0
1,376 lines not on this page · raw message
xen/tools/kconfig/util.c new file +147 -0
147 lines not on this page · raw message
xen/tools/kconfig/zconf.gperf new file +49 -0
49 lines not on this page · raw message
xen/tools/kconfig/zconf.hash.c_shipped new file +293 -0
293 lines not on this page · raw message
xen/tools/kconfig/zconf.l new file +374 -0
374 lines not on this page · raw message
xen/tools/kconfig/zconf.lex.c_shipped new file +2473 -0
2,473 lines not on this page · raw message
xen/tools/kconfig/zconf.tab.c_shipped new file +2580 -0
2,580 lines not on this page · raw message
xen/tools/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.
PATCH v7 2/28 MAINTAINERS: add myself for kconfig
In reply to Doug GoldsteinAdded myself as the maintainer of kconfig.
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -226,6 +226,12 @@ F: xen/include/{kexec,kimage}.h F: xen/arch/x86/machine_kexec.c F: xen/arch/x86/x86_64/kexec_reloc.S +KCONFIG +M: Doug Goldstein <[email protected]> +S: Supported +F: docs/misc/kconfig{,-language}.txt +F: xen/tools/kconfig/ + MACHINE CHECK (MCA) & RAS M: Christoph Egger <[email protected]> M: Liu Jinsong <[email protected]>
Signature · 1 line
2.4.10
Re: [PATCH v7 02/28] MAINTAINERS: add myself for kconfig
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
MAINTAINERS F: xen/include/{kexec,kimage}.h · line 235
Quoted 10 lines
MAINTAINERS +6
-0@@ -226,6 +226,12 @@ F: xen/include/{kexec,kimage}.h F: xen/arch/x86/machine_kexec.c F: xen/arch/x86/x86_64/kexec_reloc.S +KCONFIG +M: Doug Goldstein <[email protected]> +S: Supported +F: docs/misc/kconfig{,-language}.txt +F: xen/tools/kconfig/ + MACHINE CHECK (MCA) & RAS
Pending the decision for you to be the maintainer of that code, this went one slot too far down (but this can of course be fixed up upon commit).
Jan
Re: [PATCH v7 02/28] MAINTAINERS: add myself for kconfig
Quoted 19 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
MAINTAINERS F: xen/include/{kexec,kimage}.h · line 235
Quoted 10 lines
MAINTAINERS +6
-0@@ -226,6 +226,12 @@ F: xen/include/{kexec,kimage}.h F: xen/arch/x86/machine_kexec.c F: xen/arch/x86/x86_64/kexec_reloc.S +KCONFIG +M: Doug Goldstein <[email protected]> +S: Supported +F: docs/misc/kconfig{,-language}.txt +F: xen/tools/kconfig/ + MACHINE CHECK (MCA) & RASPending the decision for you to be the maintainer of that code, this went one slot too far down (but this can of course be fixed up upon commit).
Quoted 2 lines
Jan
Sorry about that. It sounded like you guys wanted me to maintain this so I submitted this. If that's not the case please feel free to drop the patch out of the series.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v7 02/28] MAINTAINERS: add myself for kconfig
Quoted 21 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 18:26, <[email protected]> wrote:
Quoted 7 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
MAINTAINERS +0
-0@@ -226,6 +226,12 @@ F: xen/include/{kexec,kimage}.h F: xen/arch/x86/machine_kexec.c F: xen/arch/x86/x86_64/kexec_reloc.SQuoted 11 lines
MAINTAINERS F: xen/include/{kexec,kimage}.h · line 235
Quoted 7 lines
MAINTAINERS +6
-0+KCONFIG +M: Doug Goldstein <[email protected]> +S: Supported +F: docs/misc/kconfig{,-language}.txt +F: xen/tools/kconfig/ + MACHINE CHECK (MCA) & RASPending the decision for you to be the maintainer of that code, this went one slot too far down (but this can of course be fixed up upon commit).
Quoted 3 lines
Sorry about that. It sounded like you guys wanted me to maintain this so I submitted this. If that's not the case please feel free to drop the patch out of the series.
No, that wasn't my primary point (as said - "pending the decision"; so far it was only a discussion of who should be looking after that code, without any decision made). The main point was that you broke the alphabetical ordering: KEXEC should come after KCONFIG.
Jan
PATCH v7 3/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. To avoid dragging in most of Kbuild from the Linux kernel this adds Makefile.kconfig which is our real entry point into building kconfig. This attempts to reuse as much of the Xen build bits as possible and wire them to the bits that kconfig expects to be provided by Kbuild.
--- .gitignore | 6 +++ xen/Kconfig | 24 +++++++++++ xen/Makefile | 22 ++++++++++ xen/arch/arm/Kconfig | 31 ++++++++++++++ xen/arch/arm/configs/arm32_defconfig | 0 xen/arch/arm/configs/arm64_defconfig | 0 xen/arch/x86/Kconfig | 17 ++++++++ xen/arch/x86/configs/x86_64_defconfig | 0 xen/common/Kconfig | 4 ++ xen/drivers/Kconfig | 3 ++ xen/tools/kconfig/Makefile.kconfig | 76 +++++++++++++++++++++++++++++++++++ 11 files changed, 183 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/tools/kconfig/Makefile.kconfig
.gitignore +6 -0
@@ -217,6 +217,8 @@ tools/xentrace/tbctl tools/xentrace/xenctx tools/xentrace/xentrace xen/.banner +xen/.config +xen/.config.old xen/System.map xen/arch/arm/asm-offsets.s xen/arch/arm/xen.lds
@@ -239,10 +241,14 @@ xen/include/headers++.chk xen/include/asm xen/include/asm-*/asm-offsets.h xen/include/compat/* +xen/include/config/ +xen/include/generated/ xen/include/public/public xen/include/xen/*.new xen/include/xen/acm_policy.h xen/include/xen/compile.h +xen/tools/kconfig/.tmp_gtkcheck +xen/tools/kconfig/.tmp_qtcheck xen/tools/symbols xen/xsm/flask/include/av_perm_to_string.h xen/xsm/flask/include/av_permissions.h
xen/Kconfig new file +24 -0
@@ -0,0 +1,24 @@ +# +# For a description of the syntax of this configuration file, +# see docs/misc/kconfig-language.txt +# +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"
xen/Makefile +22 -0
@@ -20,6 +20,14 @@ MAKEFLAGS += -rR EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi +# Don't break if the build process wasn't called from the top level +# we need XEN_TARGET_ARCH to generate the proper config +include $(XEN_ROOT)/Config.mk + +# Allow someone to change their config file +KCONFIG_CONFIG ?= .config +export KCONFIG_CONFIG + .PHONY: default default: build
@@ -91,6 +99,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 $(BASEDIR)/tools/kconfig/Makefile.kconfig clean find . \( -name "*.o" -o -name ".*.d" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET)-syms *~ core rm -f include/asm-*/asm-offsets.h
@@ -220,3 +229,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)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) $@ + +include/config/%.conf: include/config/auto.conf.cmd + $(Q)$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) silentoldconfig + +# Allow people to just run `make` as before and not force them to configure +$(KCONFIG_CONFIG): + $(Q)$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig 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 + 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 +0 -0
xen/arch/arm/configs/arm64_defconfig new file +0 -0
xen/arch/x86/Kconfig new file +17 -0
@@ -0,0 +1,17 @@ +config X86_64 + def_bool y + +config X86 + def_bool y + +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/tools/kconfig/Makefile.kconfig new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
2.4.10
Re: [PATCH v7 03/28] build: build Kconfig and config rules
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
xen/Kconfig new file +7
-0@@ -0,0 +1,24 @@ +# +# For a description of the syntax of this configuration file, +# see docs/misc/kconfig-language.txt +# +mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" + +config SRCARCH
xen/Kconfig line 17
Quoted 10 lines
xen/Kconfig new file +10
-0+ string + option env="SRCARCH" + +config ARCH + string + option env="ARCH" + +source "arch/$SRCARCH/Kconfig" + +config XEN_FULLVERSION
I continue to wonder what use the XEN_ prefix here is.
xen/Makefile MAKEFLAGS += -rR · line 29
Quoted 13 lines
xen/Makefile +7
-0@@ -20,6 +20,14 @@ MAKEFLAGS += -rR EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi +# Don't break if the build process wasn't called from the top level +# we need XEN_TARGET_ARCH to generate the proper config +include $(XEN_ROOT)/Config.mk + +# Allow someone to change their config file +KCONFIG_CONFIG ?= .config +export KCONFIG_CONFIG
For compactness' sake this could be done on one line afaik.
Quoted 10 lines
xen/arch/x86/Kconfig new file +7
-0@@ -0,0 +1,17 @@ +config X86_64 + def_bool y + +config X86 + def_bool y + +config ARCH_DEFCONFIG
xen/arch/x86/Kconfig line 17
Quoted 10 lines
xen/arch/x86/Kconfig new file +10
-0+ string + default "arch/x86/configs/x86_64_defconfig" + +menu "Architecture Features" + +endmenu + +source "common/Kconfig" + +source "drivers/Kconfig"
I'm still missing "config 64BIT" in this file.
Quoted 7 lines
xen/tools/kconfig/Makefile.kconfig new file +4
-0@@ -0,0 +1,76 @@ +# xen/tools/kconfig + +# default rule to do nothing +all:
xen/tools/kconfig/Makefile.kconfig line 14
Quoted 10 lines
xen/tools/kconfig/Makefile.kconfig new file +10
-0+ +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
Doesn't this add one /xen too many? Or wait, don't you need two more /.. when setting XEN_ROOT above?
xen/tools/kconfig/Makefile.kconfig line 15
Quoted 1 line
xen/tools/kconfig/Makefile.kconfig new file +1
-0+objtree = $(srctree)
Do both of them really need to use = (instead of the more efficient ":=")?
Quoted 8 lines
xen/tools/kconfig/Makefile.kconfig new file +8
-0+src := tools/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/tools/kconfig/Makefile.kconfig line 33
Quoted 10 lines
xen/tools/kconfig/Makefile.kconfig new file +10
-0+cmd = $(cmd_$(1)) +if_changed = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + ) + +if_changed_dep = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + )
I'm quite sure to have asked for these strange multi line constructs to be collapsed.
xen/tools/kconfig/Makefile.kconfig line 49
Quoted 3 lines
xen/tools/kconfig/Makefile.kconfig new file +3
-0+# provide the host compiler +HOSTCC := gcc +HOSTCXX := g++
Didn't you mean to inherit these instead of forcing them here?
xen/tools/kconfig/Makefile.kconfig line 63
Quoted 13 lines
xen/tools/kconfig/Makefile.kconfig new file +13
-0+# force target +PHONY += FORCE + +FORCE: + +SRCARCH = $(shell echo $(ARCH) | \ + sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g') +export SRCARCH + +# include the original Makefile from Linux +include $(src)/Makefile +# include the Makefile.host from Linux +include $(src)/Makefile.host
Just one comment for both lines would do.
Jan
Re: [PATCH v7 03/28] build: build Kconfig and config rules
Quoted 15 lines · Jan Beulich
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
xen/Kconfig new file +11
-0@@ -0,0 +1,24 @@ +# +# For a description of the syntax of this configuration file, +# see docs/misc/kconfig-language.txt +# +mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" + +config SRCARCH + string + option env="SRCARCH" + +config ARCH
Quoted 8 lines
xen/Kconfig line 17
Quoted 6 lines
xen/Kconfig new file +6
-0+ string + option env="ARCH" + +source "arch/$SRCARCH/Kconfig" + +config XEN_FULLVERSIONI continue to wonder what use the
XEN_prefix here is.
This can be named anything you want. The existing makefiles call the version "XEN_FULLVERSION" so I'm just keeping it the same. Its just to have the same version number that the makefiles generate stored in the .config file for if/when people start posting .config files somewhere. Honestly at this point I'll paint the bike whatever color is desired.
Quoted 7 lines
Quoted 7 lines
xen/Makefile +0
-0@@ -20,6 +20,14 @@ MAKEFLAGS += -rR EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi
Quoted 9 lines
xen/Makefile MAKEFLAGS += -rR · line 29
Quoted 7 lines
xen/Makefile +7
-0+# Don't break if the build process wasn't called from the top level +# we need XEN_TARGET_ARCH to generate the proper config +include $(XEN_ROOT)/Config.mk + +# Allow someone to change their config file +KCONFIG_CONFIG ?= .config +export KCONFIG_CONFIGFor compactness' sake this could be done on one line afaik.
Sure. I copied and pasted this from the Linux kernel where its two lines. I'll send another squash in.
Quoted 15 lines
Quoted 15 lines
xen/arch/x86/Kconfig new file +11
-0@@ -0,0 +1,17 @@ +config X86_64 + def_bool y + +config X86 + def_bool y + +config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig" + +menu "Architecture Features"
Quoted 8 lines
xen/arch/x86/Kconfig line 17
Quoted 6 lines
xen/arch/x86/Kconfig new file +6
-0+ +endmenu + +source "common/Kconfig" + +source "drivers/Kconfig"I'm still missing "config 64BIT" in this file.
You had wanted me to factor that out in earlier series. So now its only in the arm side which is the only place its used.
Quoted 10 lines
xen/tools/kconfig/Makefile.kconfig line 6
Quoted 10 lines
xen/tools/kconfig/Makefile.kconfig new file +6
-0@@ -0,0 +1,76 @@ +# xen/tools/kconfig + +# default rule to do nothing +all: + +XEN_ROOT = $(CURDIR)/..
This was meant to go away once the xen/Makefile exported it. Which has already been merged in.
Quoted 11 lines
xen/tools/kconfig/Makefile.kconfig line 14
Quoted 8 lines
xen/tools/kconfig/Makefile.kconfig new file +8
-0+ +# 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)/xenDoesn't this add one /xen too many? Or wait, don't you need two more /.. when setting
XEN_ROOTabove?
See above comment on XEN_ROOT.
Quoted 5 lines
xen/tools/kconfig/Makefile.kconfig line 15
Quoted 2 lines
xen/tools/kconfig/Makefile.kconfig new file +1
-0+objtree = $(srctree)Do both of them really need to use = (instead of the more efficient ":=")?
Sure. I will send you a squash.
Quoted 14 lines
Quoted 14 lines
xen/tools/kconfig/Makefile.kconfig new file +13
-0+src := tools/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/tools/kconfig/Makefile.kconfig line 33
Quoted 5 lines
xen/tools/kconfig/Makefile.kconfig new file +5
-0+ +if_changed_dep = $(if y, \ + @set -e; \ + $(cmd_$(1)); \ + )I'm quite sure to have asked for these strange multi line constructs to be collapsed.
Sure. In the squash.
Quoted 6 lines
xen/tools/kconfig/Makefile.kconfig line 49
Quoted 4 lines
xen/tools/kconfig/Makefile.kconfig new file +3
-0+# provide the host compiler +HOSTCC := gcc +HOSTCXX := g++Didn't you mean to inherit these instead of forcing them here?
No. I pointed out that the only real way to inherit them is to pull in top-level Config.mk which is too heavy handed. If we have some agreement to break up the pieces that truly belong in there then sure.
Honestly I would prefer to do that break up after the fact. I've being working on this series for 3 months now and a lot of the issues brought up can happen after the fact because, like this one, it involves fixing up existing Xen makefiles rather than issues with this series.
Quoted 17 lines
Quoted 4 lines
xen/tools/kconfig/Makefile.kconfig new file +3
-0+# force target +PHONY += FORCE +xen/tools/kconfig/Makefile.kconfig line 63
Quoted 10 lines
xen/tools/kconfig/Makefile.kconfig new file +10
-0+FORCE: + +SRCARCH = $(shell echo $(ARCH) | \ + sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g') +export SRCARCH + +# include the original Makefile from Linux +include $(src)/Makefile +# include the Makefile.host from Linux +include $(src)/Makefile.hostJust one comment for both lines would do.
Quoted 2 lines
Jan
Sure. I'll send you a squash.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH 1/1 squash into 'build: build Kconfig and config rules'
--- xen/Makefile | 3 +-- xen/tools/kconfig/Makefile.kconfig | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 16 deletions(-)
xen/Makefile +1 -2
@@ -25,8 +25,7 @@ EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi include $(XEN_ROOT)/Config.mk # Allow someone to change their config file -KCONFIG_CONFIG ?= .config -export KCONFIG_CONFIG +export KCONFIG_CONFIG ?= .config .PHONY: default default: build
xen/tools/kconfig/Makefile.kconfig +14 -14
@@ -3,16 +3,14 @@ # 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) +srctree := $(XEN_ROOT)/xen +objtree := $(srctree) src := tools/kconfig obj := $(src) KBUILD_SRC :=
@@ -22,15 +20,18 @@ dot-target = $(dir $@).$(notdir $@) depfile = $(subst $(comma),,$(dot-target).d) basetarget = $(basename $(notdir $@)) cmd = $(cmd_$(1)) -if_changed = $(if y, \ - @set -e; \ - $(cmd_$(1)); \ - ) +if_changed = $(cmd_$(1)) +if_changed_dep = $(cmd_$(1)) + +#if_changed = $(if y, \ +# @set -e; \ +# $(cmd_$(1)); \ +# ) -if_changed_dep = $(if y, \ - @set -e; \ - $(cmd_$(1)); \ - ) +#if_changed_dep = $(if y, \ +# @set -e; \ +# $(cmd_$(1)); \ +# ) define multi_depend $(foreach m, $(notdir $1), \
@@ -57,9 +58,8 @@ SRCARCH = $(shell echo $(ARCH) | \ sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g') export SRCARCH -# include the original Makefile from Linux +# include the original Makefile and Makefile.host from Linux include $(src)/Makefile -# include the Makefile.host from Linux include $(src)/Makefile.host # clean up rule
Signature · 1 line
2.4.10
Re: [PATCH] squash into 'build: build Kconfig and config rules'
Quoted 72 lines · Doug Goldstein
Signed-off-by Doug Goldstein <[email protected]>--- xen/Makefile | 3 +-- xen/tools/kconfig/Makefile.kconfig | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 16 deletions(-)xen/Makefile +1
-2@@ -25,8 +25,7 @@ EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi include $(XEN_ROOT)/Config.mk # Allow someone to change their config file -KCONFIG_CONFIG ?= .config -export KCONFIG_CONFIG +export KCONFIG_CONFIG ?= .config .PHONY: default default: buildxen/tools/kconfig/Makefile.kconfig +13
-12@@ -3,16 +3,14 @@ # 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) +srctree := $(XEN_ROOT)/xen +objtree := $(srctree) src := tools/kconfig obj := $(src) KBUILD_SRC :=@@ -22,15 +20,18 @@ dot-target = $(dir $@).$(notdir $@) depfile = $(subst $(comma),,$(dot-target).d) basetarget = $(basename $(notdir $@)) cmd = $(cmd_$(1)) -if_changed = $(if y, \ - @set -e; \ - $(cmd_$(1)); \ - ) +if_changed = $(cmd_$(1)) +if_changed_dep = $(cmd_$(1)) + +#if_changed = $(if y, \ +# @set -e; \ +# $(cmd_$(1)); \ +# ) -if_changed_dep = $(if y, \ - @set -e; \ - $(cmd_$(1)); \ - ) +#if_changed_dep = $(if y, \ +# @set -e; \ +# $(cmd_$(1)); \ +# ) define multi_depend $(foreach m, $(notdir $1), \
xen/tools/kconfig/Makefile.kconfig SRCARCH = $(shell echo $(ARCH) | \ · line 65
Quoted 10 lines
xen/tools/kconfig/Makefile.kconfig +1
-2@@ -57,9 +58,8 @@ SRCARCH = $(shell echo $(ARCH) | \ sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g') export SRCARCH -# include the original Makefile from Linux +# include the original Makefile and Makefile.host from Linux include $(src)/Makefile -# include the Makefile.host from Linux include $(src)/Makefile.host # clean up rule
Skip this one and use the other one I submitted.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH 1/1 squash into 'build: build Kconfig and config rules'
In reply to Doug Goldstein--- xen/Makefile | 3 +-- xen/tools/kconfig/Makefile.kconfig | 20 +++++--------------- 2 files changed, 6 insertions(+), 17 deletions(-)
xen/Makefile +1 -2
@@ -25,8 +25,7 @@ EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi include $(XEN_ROOT)/Config.mk # Allow someone to change their config file -KCONFIG_CONFIG ?= .config -export KCONFIG_CONFIG +export KCONFIG_CONFIG ?= .config .PHONY: default default: build
xen/tools/kconfig/Makefile.kconfig +5 -15
@@ -3,16 +3,14 @@ # 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) +srctree := $(XEN_ROOT)/xen +objtree := $(srctree) src := tools/kconfig obj := $(src) KBUILD_SRC :=
@@ -22,15 +20,8 @@ dot-target = $(dir $@).$(notdir $@) depfile = $(subst $(comma),,$(dot-target).d) basetarget = $(basename $(notdir $@)) cmd = $(cmd_$(1)) -if_changed = $(if y, \ - @set -e; \ - $(cmd_$(1)); \ - ) - -if_changed_dep = $(if y, \ - @set -e; \ - $(cmd_$(1)); \ - ) +if_changed = $(cmd_$(1)) +if_changed_dep = $(cmd_$(1)) define multi_depend $(foreach m, $(notdir $1), \
@@ -57,9 +48,8 @@ SRCARCH = $(shell echo $(ARCH) | \ sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g') export SRCARCH -# include the original Makefile from Linux +# include the original Makefile and Makefile.host from Linux include $(src)/Makefile -# include the Makefile.host from Linux include $(src)/Makefile.host # clean up rule
Signature · 1 line
2.4.10
Re: [PATCH v7 03/28] build: build Kconfig and config rules
In reply to Doug GoldsteinQuoted 26 lines
Quoted 1 line
Quoted 1 line · On 14.12.15 at 18:52, <[email protected]> wrote:
Quoted 15 lines · Jan Beulich
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
xen/arch/x86/Kconfig new file +11
-0@@ -0,0 +1,17 @@ +config X86_64 + def_bool y + +config X86 + def_bool y + +config ARCH_DEFCONFIG + string + default "arch/x86/configs/x86_64_defconfig" + +menu "Architecture Features"Quoted 8 lines
xen/arch/x86/Kconfig line 17
Quoted 6 lines
xen/arch/x86/Kconfig new file +6
-0+ +endmenu + +source "common/Kconfig" + +source "drivers/Kconfig"I'm still missing "config 64BIT" in this file.
Quoted 4 lines
You had wanted me to factor that out in earlier series. So now its only in the arm side which is the only place its used.
From what I recall, I've always been asking to make this a general
setting, not an ARM specific one (irrespective of it only being used in ARM right now).
Quoted 6 lines
Quoted 5 lines
xen/arch/x86/Kconfig
Quoted 3 lines
xen/arch/x86/Kconfig new file +3
-0+# provide the host compiler +HOSTCC := gcc +HOSTCXX := g++Didn't you mean to inherit these instead of forcing them here?
Quoted 8 lines
No. I pointed out that the only real way to inherit them is to pull in top-level Config.mk which is too heavy handed. If we have some agreement to break up the pieces that truly belong in there then sure.
Honestly I would prefer to do that break up after the fact. I've being working on this series for 3 months now and a lot of the issues brought up can happen after the fact because, like this one, it involves fixing up existing Xen makefiles rather than issues with this series.
That's fine as long as it doesn't get forgotten.
Jan
PATCH v7 4/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 | 9 ++++++++- xen/Rules.mk | 2 ++ xen/drivers/passthrough/arm/smmu.c | 4 ---- xen/include/xen/config.h | 2 ++ 4 files changed, 12 insertions(+), 5 deletions(-)
xen/Makefile +8 -1
@@ -34,6 +34,8 @@ default: build .PHONY: dist dist: install +build:: 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)
@@ -236,9 +238,14 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) $@ -include/config/%.conf: include/config/auto.conf.cmd +include/config/%.conf: include/config/auto.conf.cmd .config $(Q)$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) silentoldconfig # Allow people to just run `make` as before and not force them to configure $(KCONFIG_CONFIG): $(Q)$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) defconfig + +# Break the dependency chain for the first run +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
@@ -7,6 +7,8 @@#ifndef __XEN_CONFIG_H__#define __XEN_CONFIG_H__ +#include <generated/autoconf.h> +#ifndef __ASSEMBLY__#include <xen/compiler.h> #endif
Signature · 1 line
2.4.10
Re: [PATCH v7 04/28] build: use generated Kconfig options for Xen
Quoted 17 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
xen/Makefile +2
-0@@ -34,6 +34,8 @@ default: build .PHONY: dist dist: install +build:: 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)@@ -236,9 +238,14 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH)$@
xen/Makefile kconfig := silentoldconfig oldconfig config menuconfig defconfig \ · line 241
Quoted 2 lines
xen/Makefile +1
-1-include/config/%.conf: include/config/auto.conf.cmd +include/config/%.conf: include/config/auto.conf.cmd .config
$(KCONFIG_CONFIG)?
With that adjusted (or a reason given why it cannot be adjusted)
Jan
PATCH 1/1 squash into 'build: use generated Kconfig option for Xen'
--- xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/Makefile +1 -1
@@ -237,7 +237,7 @@ kconfig := silentoldconfig oldconfig config menuconfig defconfig \ $(kconfig): $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) $@ -include/config/%.conf: include/config/auto.conf.cmd .config +include/config/%.conf: include/config/auto.conf.cmd $(KCONFIG_CONFIG) $(Q)$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) silentoldconfig # Allow people to just run `make` as before and not force them to configure
Signature · 1 line
2.4.10
PATCH v7 5/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 | 4 ++-- xen/include/xsm/xsm.h | 8 ++++---- xen/xsm/dummy.c | 4 ++-- xen/xsm/flask/hooks.c | 10 +++++----- 15 files changed, 29 insertions(+), 25 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 config ARCH_DEFCONFIG string
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
@@ -651,7 +651,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
@@ -674,7 +674,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 ;
@@ -801,7 +801,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;
@@ -1245,7 +1245,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 device 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 +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(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 );
@@ -350,7 +350,7 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint#endif /* 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 );
xen/include/xsm/xsm.h +4 -4
@@ -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);
@@ -469,7 +469,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);
@@ -491,7 +491,7 @@ static inline int xsm_deassign_device(xsm_default_t def, struct domain *d, uint3 }#endif /* 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) {
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 +5 -5
@@ -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;
@@ -1279,7 +1279,7 @@ static int flask_deassign_device(struct domain *d, uint32_t machine_bdf) }#endif /* 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;
@@ -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
PATCH v7 6/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 | 4 ++-- 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 | 2 +- xen/include/xsm/dummy.h | 2 +- xen/include/xsm/xsm.h | 8 ++++---- xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 4 ++-- xen/xsm/xsm_core.c | 2 +- xen/xsm/xsm_policy.c | 4 ++-- 17 files changed, 25 insertions(+), 22 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 +2 -2
@@ -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) {
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 +1 -1
@@ -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);
xen/include/xsm/dummy.h +1 -1
@@ -350,7 +350,7 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint#endif /* 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 );
xen/include/xsm/xsm.h +4 -4
@@ -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);
@@ -491,7 +491,7 @@ static inline int xsm_deassign_device(xsm_default_t def, struct domain *d, uint3 }#endif /* 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) {
@@ -741,7 +741,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
@@ -765,7 +765,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 +2 -2
@@ -1279,7 +1279,7 @@ static int flask_deassign_device(struct domain *d, uint32_t machine_bdf) }#endif /* 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;
@@ -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 v7 7/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 | 2 +- xen/include/xsm/xsm.h | 4 ++-- xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 12 ++++++------ 15 files changed, 39 insertions(+), 33 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 config ARCH_DEFCONFIG string
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 +1 -1
@@ -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 );
xen/include/xsm/xsm.h +2 -2
@@ -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);
@@ -469,7 +469,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);
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 +6 -6
@@ -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;
@@ -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 1/1 squash into 'build: convert HAS_PCI use to Kconfig'
--- xen/include/xen/iommu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/include/xen/iommu.h +2 -2
@@ -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 /* CONFIG_HAS_PCI */ +#endif /* HAS_PCI */ #ifdef CONFIG_HAS_DEVICE_TREE #include <xen/device_tree.h>
@@ -145,7 +145,7 @@ struct iommu_ops {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 /* CONFIG_HAS_PCI */ +#endif /* HAS_PCI */ void (*teardown)(struct domain *d); int (*map_page)(struct domain *d, unsigned long gfn, unsigned long mfn,
Signature · 1 line
2.4.10
PATCH v7 8/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/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/drivers/Kconfig | 2 ++ xen/drivers/char/Kconfig | 6 ++++++ xen/drivers/char/Makefile | 2 +- 7 files changed, 10 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/x86/Kconfig +1 -0
@@ -3,6 +3,7 @@ config X86_64 config X86 def_bool y + select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI
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 +6 -0
@@ -0,0 +1,6 @@ +# 16550-series UART support +config HAS_NS16550 + bool + default y + 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_HAS_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
PATCH v7 9/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/common/Kconfig | 3 +++ xen/drivers/char/ns16550.c | 10 +++++----- 5 files changed, 9 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_NS16550 select HAS_PASSTHROUGH select HAS_PCI
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/common/Kconfig +3 -0
@@ -5,4 +5,7 @@ menu "Common Features" config HAS_DEVICE_TREE bool +config HAS_IOPORTS + bool + endmenu
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
PATCH v7 10/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
@@ -3,6 +3,7 @@ config X86_64 config X86 def_bool y + select HAS_ACPI select HAS_IOPORTS select HAS_NS16550 select HAS_PASSTHROUGH
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 v7 11/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 | 4 ++++ xen/drivers/video/Makefile | 8 ++++---- 8 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 xen/drivers/video/Kconfig
xen/arch/arm/Kconfig +1 -0
@@ -18,6 +18,7 @@ config ARM def_bool y select HAS_DEVICE_TREE select HAS_PASSTHROUGH + select HAS_VIDEO config ARCH_DEFCONFIG string
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
@@ -8,6 +8,7 @@ config X86 select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI + select HAS_VIDEO config ARCH_DEFCONFIG string
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 +4 -0
@@ -0,0 +1,4 @@ + +# Select HAS_VIDEO if video is supported +config HAS_VIDEO + 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
PATCH v7 12/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/Kconfig | 4 ++++ xen/drivers/video/Makefile | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-)
xen/arch/x86/Kconfig +1 -0
@@ -8,6 +8,7 @@ config X86 select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI + select HAS_VGA select HAS_VIDEO config ARCH_DEFCONFIG
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/Kconfig +4 -0
@@ -2,3 +2,7 @@ # Select HAS_VIDEO if video is supported config HAS_VIDEO bool + +# Select HAS_VGA if VGA is supported +config HAS_VGA + bool
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: [PATCH v7 12/28] build: convert HAS_VGA use to Kconfig
xen/drivers/video/Kconfig line 8
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
xen/drivers/video/Kconfig +4
-0@@ -2,3 +2,7 @@ # Select HAS_VIDEO if video is supported config HAS_VIDEO bool + +# Select HAS_VGA if VGA is supported +config HAS_VGA + bool
I think HAS_VGA should select HAS_VIDEO, eliminating the need for x86 to select both.
Also indentation is broken here (either on this new entry [using spaces] or on the one visible in context [using a tab]).
Jan
PATCH 1/1 squash into 'build: convert HAS_VGA use to Kconfig'
--- xen/arch/x86/Kconfig | 1 - xen/drivers/video/Kconfig | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/Kconfig +0 -1
@@ -9,7 +9,6 @@ config X86 select HAS_PASSTHROUGH select HAS_PCI select HAS_VGA - select HAS_VIDEO config ARCH_DEFCONFIG string
xen/drivers/video/Kconfig +2 -1
@@ -5,4 +5,5 @@ config HAS_VIDEO # Select HAS_VGA if VGA is supported config HAS_VGA - bool + bool + select HAS_VIDEO
Signature · 1 line
2.4.10
PATCH v7 13/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
@@ -4,6 +4,7 @@ config X86_64 config X86 def_bool y select HAS_ACPI + select HAS_CPUFREQ select HAS_IOPORTS select HAS_NS16550 select HAS_PASSTHROUGH
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 v7 14/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/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/common/Kconfig | 4 ++++ xen/common/domain.c | 2 +- 5 files changed, 6 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/Kconfig +1 -0
@@ -5,6 +5,7 @@ config X86 def_bool y select HAS_ACPI select HAS_CPUFREQ + select HAS_GDBSX select HAS_IOPORTS select HAS_NS16550 select HAS_PASSTHROUGH
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,6 +5,10 @@ menu "Common Features" config HAS_DEVICE_TREE bool +# Select HAS_GDBSX if GDBSX is supported +config HAS_GDBSX + bool + config HAS_IOPORTS bool
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
PATCH v7 15/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 | 2 +- 8 files changed, 8 insertions(+), 5 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
@@ -18,6 +18,7 @@ config ARM def_bool y select HAS_DEVICE_TREE select HAS_PASSTHROUGH + select HAS_PDX select HAS_VIDEO config ARCH_DEFCONFIG
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
@@ -10,6 +10,7 @@ config X86 select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI + select HAS_PDX select HAS_VGA select HAS_VIDEO
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 +1 -1
@@ -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;
Signature · 1 line
2.4.10
PATCH v7 16/28 build: convert HAS_KEXEC / KEXEC use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_KEXEC defines in the build system and replace kexec :=y in Rules.mk with a kconfig option called CONFIG_KEXEC. Purposefully did not merge the two variables together in this patch to keep this as mechanical as possible.
--- xen/Rules.mk | 10 ++++------ xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/common/Kconfig | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 7 deletions(-)
xen/Rules.mk +4 -6
@@ -10,7 +10,6 @@ lock_profile ?= n crash_debug ?= n frame_pointer ?= n lto ?= n -kexec ?= y -include $(BASEDIR)/include/config/auto.conf
@@ -28,6 +27,10 @@ ifeq ($(perfc_arrays),y) perfc := y endif +ifneq ($(origin kexec),undefined) +$(error "You must use 'make menuconfig' to enable/disable kexec now.") +endif + # Set ARCH/SUBARCH appropriately. override TARGET_SUBARCH := $(XEN_TARGET_ARCH) override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \
@@ -68,11 +71,6 @@ ifneq ($(max_phys_irqs),) CFLAGS-y += -DMAX_PHYS_IRQS=$(max_phys_irqs) endif -CONFIG_KEXEC-$(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/arch/x86/Kconfig +1 -0
@@ -7,6 +7,7 @@ config X86 select HAS_CPUFREQ select HAS_GDBSX select HAS_IOPORTS + select HAS_KEXEC select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI
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 +16 -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
@@ -16,4 +20,16 @@ config HAS_GDBSX config HAS_IOPORTS 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
PATCH v7 17/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/Kconfig | 4 ++++ xen/drivers/video/Makefile | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-)
xen/arch/arm/Kconfig +1 -0
@@ -16,6 +16,7 @@ config ARM_64 config ARM def_bool y + select HAS_ARM_HDLCD select HAS_DEVICE_TREE 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/Kconfig +4 -0
@@ -6,3 +6,7 @@ config HAS_VIDEO # Select HAS_VGA if VGA is supported config HAS_VGA bool + +# Select HAS_ARM_HDLCD if ARM HDLCD is supported +config HAS_ARM_HDLCD + bool
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 v7 18/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/drivers/char/Kconfig | 9 +++++++++ xen/drivers/char/Makefile | 2 +- 3 files changed, 10 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/drivers/char/Kconfig +9 -0
@@ -4,3 +4,12 @@ config HAS_NS16550 default y help This selects the 16550-series UART support. For most systems, say Y. + +# Xilinx Zynq Cadence UART support +config HAS_CADENCE_UART + bool + default y + 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_HAS_NS16550) += ns16550.o -obj-$(HAS_CADENCE_UART) += cadence-uart.o +obj-$(CONFIG_HAS_CADENCE_UART) += 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 v7 19/28 build: convert HAS_PL011 use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_PL011 defines in the code base.
--- config/arm32.mk | 1 - config/arm64.mk | 1 - xen/drivers/char/Kconfig | 9 +++++++++ xen/drivers/char/Makefile | 2 +- 4 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/drivers/char/Kconfig +9 -0
@@ -13,3 +13,12 @@ config HAS_CADENCE_UART help This selects the Xilinx Zynq Cadence UART. If you have a Xilinx Zynq based board, say Y. + +# ARM AMBA PL011 UART support +config HAS_PL011 + bool + default y + 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_HAS_NS16550) += ns16550.o obj-$(CONFIG_HAS_CADENCE_UART) += cadence-uart.o -obj-$(HAS_PL011) += pl011.o +obj-$(CONFIG_HAS_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 v7 20/28 build: convert HAS_EXYNOS4210 use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_EXYNOS4210 defines in the code base.
--- config/arm32.mk | 1 - xen/drivers/char/Kconfig | 9 +++++++++ xen/drivers/char/Makefile | 2 +- 3 files changed, 10 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/drivers/char/Kconfig +9 -0
@@ -22,3 +22,12 @@ config HAS_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. + +# Samsung Exynos 4210 UART support +config HAS_EXYNOS4210 + bool + default y + 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_HAS_NS16550) += ns16550.o obj-$(CONFIG_HAS_CADENCE_UART) += cadence-uart.o obj-$(CONFIG_HAS_PL011) += pl011.o -obj-$(HAS_EXYNOS4210) += exynos4210-uart.o +obj-$(CONFIG_HAS_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 v7 21/28 build: convert HAS_OMAP use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_OMAP defines in the code base.
--- config/arm32.mk | 1 - xen/drivers/char/Kconfig | 9 +++++++++ xen/drivers/char/Makefile | 2 +- 3 files changed, 10 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/drivers/char/Kconfig +9 -0
@@ -31,3 +31,12 @@ config HAS_EXYNOS4210 help This selects the Samsung Exynos 4210 UART. If you have a Samsung Exynos based board, say Y. + +# OMAP UART support +config HAS_OMAP + bool + default y + 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_HAS_NS16550) += ns16550.o obj-$(CONFIG_HAS_CADENCE_UART) += cadence-uart.o obj-$(CONFIG_HAS_PL011) += pl011.o obj-$(CONFIG_HAS_EXYNOS4210) += exynos4210-uart.o -obj-$(HAS_OMAP) += omap-uart.o +obj-$(CONFIG_HAS_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 v7 22/28 build: convert HAS_SCIF use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_SCIF defines in the code base.
--- config/arm32.mk | 1 - xen/drivers/char/Kconfig | 9 +++++++++ xen/drivers/char/Makefile | 2 +- 3 files changed, 10 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 +9 -0
@@ -40,3 +40,12 @@ config HAS_OMAP help This selects the Texas Instruments OMAP UART. If you have a Texas Instruments based CPU, say Y. + +# SuperH SCI(F) UART support +config HAS_SCIF + bool + default y + 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_HAS_CADENCE_UART) += cadence-uart.o obj-$(CONFIG_HAS_PL011) += pl011.o obj-$(CONFIG_HAS_EXYNOS4210) += exynos4210-uart.o obj-$(CONFIG_HAS_OMAP) += omap-uart.o -obj-$(HAS_SCIF) += scif-uart.o +obj-$(CONFIG_HAS_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 v7 23/28 build: convert HAS_EHCI use to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_HAS_EHCI defines in the code base.
--- xen/arch/x86/Kconfig | 1 + xen/arch/x86/Rules.mk | 1 - xen/drivers/char/Kconfig | 8 ++++++++ xen/drivers/char/Makefile | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-)
xen/arch/x86/Kconfig +1 -0
@@ -5,6 +5,7 @@ config X86 def_bool y select HAS_ACPI select HAS_CPUFREQ + select HAS_EHCI select HAS_GDBSX select HAS_IOPORTS 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 +8 -0
@@ -49,3 +49,11 @@ config HAS_SCIF help This selects the SuperH SCI(F) UART. If you have a SuperH based board, say Y. + +# USB EHCI debug port support +config HAS_EHCI + bool + 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_HAS_PL011) += pl011.o obj-$(CONFIG_HAS_EXYNOS4210) += exynos4210-uart.o obj-$(CONFIG_HAS_OMAP) += omap-uart.o obj-$(CONFIG_HAS_SCIF) += scif-uart.o -obj-$(HAS_EHCI) += ehci-dbgp.o +obj-$(CONFIG_HAS_EHCI) += ehci-dbgp.o obj-$(CONFIG_ARM) += dt-uart.o obj-y += serial.o
Signature · 1 line
2.4.10
Re: [PATCH v7 23/28] build: convert HAS_EHCI use to Kconfig
xen/drivers/char/Kconfig config HAS_SCIF · line 56
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
xen/drivers/char/Kconfig +4
-0+# USB EHCI debug port support +config HAS_EHCI + bool + depends on X86
As said before, dependencies on prompt-less options are bogus and potentially confusing (and really wrong here - there's nothing precluding ARM to also use that code as soon as they gain PCI support). With you adding a forward and reverse dependency I'm surprised you don't actually get a warning from kconfig.
If anything, a dependency on PCI might be considered here (albeit I'd suggest against it for aforementioned reason).
Jan
PATCH 1/1 squash into 'build: convert HAS_EHCI use to Kconfig'
--- xen/drivers/char/Kconfig | 1 - 1 file changed, 1 deletion(-)
xen/drivers/char/Kconfig +0 -1
@@ -53,7 +53,6 @@ config HAS_SCIF # USB EHCI debug port support config HAS_EHCI bool - 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.
Signature · 1 line
2.4.10
PATCH v7 24/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 | 2 +- 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, 16 insertions(+), 11 deletions(-)
xen/Rules.mk +0 -1
@@ -59,7 +59,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
@@ -18,6 +18,7 @@ config ARM def_bool y select HAS_ARM_HDLCD select HAS_DEVICE_TREE + select HAS_MEM_ACCESS select HAS_PASSTHROUGH select HAS_PDX select HAS_VIDEO
xen/arch/x86/Kconfig +1 -0
@@ -9,6 +9,7 @@ config X86 select HAS_GDBSX select HAS_IOPORTS select HAS_KEXEC + select HAS_MEM_ACCESS select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI
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 +1 -1
@@ -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);
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
@@ -604,7 +604,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
Re: [PATCH v7 24/28] build: convert HAS_MEM_ACCESS use to Kconfig
Quoted 11 lines · Doug Goldstein
Use the
KconfiggeneratedCONFIG_HAS_MEM_ACCESSdefines in the code base.CC Ian Campbell <[email protected]>CC Stefano Stabellini <[email protected]>CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>CC Razvan Cojocaru <[email protected]>CC Tamas K Lengyel <[email protected]>CC Daniel De Graaf <[email protected]>Signed-off-by Doug Goldstein <[email protected]>
Mechanical changes, so:
PATCH v7 25/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
@@ -59,7 +59,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
@@ -10,6 +10,7 @@ config X86 select HAS_IOPORTS select HAS_KEXEC select HAS_MEM_ACCESS + select HAS_MEM_PAGING select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI
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
@@ -1323,7 +1323,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
@@ -611,7 +611,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: [PATCH v7 25/28] build: convert HAS_MEM_PAGING use to Kconfig
Quoted 9 lines · Doug Goldstein
Use the
KconfiggeneratedCONFIG_HAS_MEM_PAGINGdefines in the code base.CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>CC Razvan Cojocaru <[email protected]>CC Tamas K Lengyel <[email protected]>CC Daniel De Graaf <[email protected]>Signed-off-by Doug Goldstein <[email protected]>
Re: [PATCH v7 25/28] build: convert HAS_MEM_PAGING use to Kconfig
In reply to Doug GoldsteinQuoted 14 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[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 HAS_MEM_SHARING := y CFLAGS += -m32 -march=i686
config/x86_64.mk CONFIG_MIGRATE := y · line 12
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 HAS_MEM_SHARING := y CONFIG_XEN_INSTALL_SUFFIX := .gz
I'm sure I gave this comment before: Considering that the previous patch converted HAS_MEM_ACCESS, the patch context here shows that this was an incomplete conversion.
Jan
Re: [PATCH v7 25/28] build: convert HAS_MEM_PAGING use to Kconfig
Quoted 20 lines · Jan Beulich
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[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 HAS_MEM_SHARING := y CFLAGS += -m32 -march=i686config/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
Quoted 8 lines
config/x86_64.mk CONFIG_MIGRATE := y · line 12
Quoted 1 line
config/x86_64.mk +0
-0CONFIG_XEN_INSTALL_SUFFIX := .gzI'm sure I gave this comment before: Considering that the previous patch converted
HAS_MEM_ACCESS, the patch context here shows that this was an incomplete conversion.Jan
That's not the case. HAS_MEM_ACCESS is used in the tools/ directory currently as well so it has to remain here for now. I was going to look at what changes could be made there after this series. Likely it'll be turned on always in the tools stack and just gracefully handle the fact that the hypervisor might have it disabled.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v7 25/28] build: convert HAS_MEM_PAGING use to Kconfig
Quoted 28 lines
Quoted 1 line
Quoted 1 line · On 11.12.15 at 13:57, <[email protected]> wrote:
Quoted 20 lines · Jan Beulich
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[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 HAS_MEM_SHARING := y CFLAGS += -m32 -march=i686config/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 := yQuoted 5 lines
config/x86_64.mk CONFIG_MIGRATE := y · line 12
Quoted 1 line
config/x86_64.mk +0
-0CONFIG_XEN_INSTALL_SUFFIX := .gzI'm sure I gave this comment before: Considering that the previous patch converted
HAS_MEM_ACCESS, the patch context here shows that this was an incomplete conversion.
Quoted 5 lines
That's not the case.
HAS_MEM_ACCESSis used in thetools/directory currently as well so it has to remain here for now. I was going to look at what changes could be made there after this series. Likely it'll be turned on always in the tools stack and just gracefully handle the fact that the hypervisor might have it disabled.
All targets currently set HAS_MEM_ACCESS, so that single use in tools/ could be converted to just y.
Jan
PATCH 1/1 squash into 'build: convert HAS_MEM_ACCESS to use Kconfig'
I've submitted 'tools: always enable HAS_MEM_ACCESS' and once that lands this can be squashed into 'build: convert HAS_MEM_ACCESS to use Kconfig'.
--- config/arm32.mk | 2 -- config/arm64.mk | 2 -- config/x86_32.mk | 2 -- config/x86_64.mk | 2 -- 4 files changed, 8 deletions(-)
config/arm32.mk +0 -2
@@ -9,8 +9,6 @@ CONFIG_XEN_INSTALL_SUFFIX := # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: CFLAGS += -marm -HAS_MEM_ACCESS := y - # Use only if calling $(LD) directly. LDFLAGS_DIRECT += -EL
config/arm64.mk +0 -2
@@ -6,8 +6,6 @@ CONFIG_XEN_INSTALL_SUFFIX := CFLAGS += #-marm -march= -mcpu= etc -HAS_MEM_ACCESS := y - # Use only if calling $(LD) directly. LDFLAGS_DIRECT += -EL
config/x86_32.mk +0 -2
@@ -5,8 +5,6 @@ CONFIG_X86_$(XEN_OS) := y CONFIG_MIGRATE := y CONFIG_XCUTILS := y -HAS_MEM_ACCESS := y - CFLAGS += -m32 -march=i686 # Use only if calling $(LD) directly.
config/x86_64.mk +0 -2
@@ -5,8 +5,6 @@ CONFIG_X86_$(XEN_OS) := y CONFIG_MIGRATE := y CONFIG_XCUTILS := y -HAS_MEM_ACCESS := y - CONFIG_XEN_INSTALL_SUFFIX := .gz CFLAGS += -m64
Signature · 1 line
2.4.10
Re: [PATCH] squash into 'build: convert HAS_MEM_ACCESS to use Kconfig'
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 11.12.15 at 17:15, <[email protected]> wrote:
I've submitted 'tools: always enable
HAS_MEM_ACCESS' and once that lands this can be squashed into 'build: convertHAS_MEM_ACCESSto useKconfig'.
Well, for some particular definition of "squash" only. I can't see how it would apply incrementally on top of that patch; I suppose it would apply only on top of the entires series, yet I think that patch you refer to really should do the whole thing in one go.
Jan
Re: [PATCH] squash into 'build: convert HAS_MEM_ACCESS to use Kconfig'
Quoted 11 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 11.12.15 at 17:15, <[email protected]> wrote:
I've submitted 'tools: always enable
HAS_MEM_ACCESS' and once that lands this can be squashed into 'build: convertHAS_MEM_ACCESSto useKconfig'.Well, for some particular definition of "squash" only. I can't see how it would apply incrementally on top of that patch; I suppose it would apply only on top of the entires series, yet I think that patch you refer to really should do the whole thing in one go.
Jan
No matter what it will require a rebase of HAS_MEM_PAGING and HAS_MEM_SHARING since the context lines would be changed. I can resubmit the whole series.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v7 26/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
@@ -59,7 +59,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
@@ -11,6 +11,7 @@ config X86 select HAS_KEXEC select HAS_MEM_ACCESS select HAS_MEM_PAGING + select HAS_MEM_SHARING select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI
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
@@ -1332,7 +1332,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
@@ -618,7 +618,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
Re: [PATCH v7 26/28] build: convert HAS_MEM_SHARING use to Kconfig
Quoted 9 lines · Doug Goldstein
Use the
KconfiggeneratedCONFIG_HAS_MEM_SHARINGdefines in the code base.CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>CC Razvan Cojocaru <[email protected]>CC Tamas K Lengyel <[email protected]>CC Daniel De Graaf <[email protected]>Signed-off-by Doug Goldstein <[email protected]>
PATCH v7 27/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
@@ -103,7 +103,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
@@ -167,7 +167,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 */
@@ -195,7 +195,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
@@ -336,7 +336,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 v7 28/28 build: convert CONFIG_COMPAT to Kconfig
In reply to Doug GoldsteinUse the Kconfig generated CONFIG_COMPAT defines in the code base.
--- config/x86_64.mk | 1 - xen/arch/x86/Kconfig | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -1
@@ -2,7 +2,6 @@ CONFIG_X86 := y CONFIG_X86_64 := y CONFIG_X86_$(XEN_OS) := y -CONFIG_COMPAT := y CONFIG_MIGRATE := y CONFIG_XCUTILS := y
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
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
- added initial
x86_128support
You're kidding?
Jan
Quoted 7 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
- added initial
x86_128supportYou're kidding?
Jan
Yes.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 10.12.15 at 17:48, <[email protected]> wrote:
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 4 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.
Patches 5-11,13-22:
(albeit patch 7 still has a couple of #endif comment changes left)
I have yet to take a closer look at patches 3 and 4.
Jan