All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: configs: Provide slimmed down configuration for guests
@ 2023-02-10 19:52 ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 19:52 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel, Mark Brown

It has been noted that due to the extensive platform support it
enables the arm64 defconfig is rather large and takes a while to
build in comparison with other architectures which can be a
burden when doing cross architecture work, especially when
testing is mainly in emulation.  We can mitigate this by providing
a configuration that only enables the support required to run in
mach-virt, this will be much smaller and quicker to build.

Having two completely separate configurations would mean that we'd
need to make any changes to the architecture wide configuration in
both the existing defconfig and the new configuration if we wanted to
ensure consistent default behaviour.  Instead define a new config
fragement which turns off options from defconfig which enable platform
support, currently this just covers the ARCH_ options that control SoC
specific drivers as validation for this approach - if people are happy
with this approach we can build on it to further reduce the size of the
new configuration.

The resulting configuration builds about 25% faster for me.

v2:
 - Rework to base on turning off options from defconfig rather than 
   splitting out a base configuration and then adding things to it.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (3):
      scripts: merge_config: Add option to suppress warning on overrides
      kbuild: Provide a version of merge_into_defconfig without override warnings
      arm64: configs: Add virtconfig

 arch/arm64/Makefile             |  6 ++++++
 arch/arm64/configs/virt.config  | 39 +++++++++++++++++++++++++++++++++++++++
 scripts/Makefile.defconf        | 14 ++++++++++++++
 scripts/kconfig/merge_config.sh | 25 ++++++++++++++++---------
 4 files changed, 75 insertions(+), 9 deletions(-)
---
base-commit: 4fafd96910add124586b549ad005dcd179de8a18
change-id: 20230203-arm64-defconfigs-c04cf5fa6288

Best regards,
-- 
Mark Brown <broonie@kernel.org>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 0/3] arm64: configs: Provide slimmed down configuration for guests
@ 2023-02-10 19:52 ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 19:52 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel, Mark Brown

It has been noted that due to the extensive platform support it
enables the arm64 defconfig is rather large and takes a while to
build in comparison with other architectures which can be a
burden when doing cross architecture work, especially when
testing is mainly in emulation.  We can mitigate this by providing
a configuration that only enables the support required to run in
mach-virt, this will be much smaller and quicker to build.

Having two completely separate configurations would mean that we'd
need to make any changes to the architecture wide configuration in
both the existing defconfig and the new configuration if we wanted to
ensure consistent default behaviour.  Instead define a new config
fragement which turns off options from defconfig which enable platform
support, currently this just covers the ARCH_ options that control SoC
specific drivers as validation for this approach - if people are happy
with this approach we can build on it to further reduce the size of the
new configuration.

The resulting configuration builds about 25% faster for me.

v2:
 - Rework to base on turning off options from defconfig rather than 
   splitting out a base configuration and then adding things to it.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (3):
      scripts: merge_config: Add option to suppress warning on overrides
      kbuild: Provide a version of merge_into_defconfig without override warnings
      arm64: configs: Add virtconfig

 arch/arm64/Makefile             |  6 ++++++
 arch/arm64/configs/virt.config  | 39 +++++++++++++++++++++++++++++++++++++++
 scripts/Makefile.defconf        | 14 ++++++++++++++
 scripts/kconfig/merge_config.sh | 25 ++++++++++++++++---------
 4 files changed, 75 insertions(+), 9 deletions(-)
---
base-commit: 4fafd96910add124586b549ad005dcd179de8a18
change-id: 20230203-arm64-defconfigs-c04cf5fa6288

Best regards,
-- 
Mark Brown <broonie@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/3] scripts: merge_config: Add option to suppress warning on overrides
  2023-02-10 19:52 ` Mark Brown
@ 2023-02-10 19:52   ` Mark Brown
  -1 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 19:52 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel, Mark Brown

Currently merge_config.sh will unconditionally warn if a fragment overrides
any already set symbol. This is generally desirable but is inconvenient in
cases where we want to create a fragment which disables unwanted options in
the base configuration, for example when attempting to produce a smaller
version of another configuration.

Add an option -Q which will suppress these warnings.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 scripts/kconfig/merge_config.sh | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index e5b46980c22a..32620de473ad 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -29,6 +29,7 @@ usage() {
 	echo "  -y    make builtin have precedence over modules"
 	echo "  -O    dir to put generated output files.  Consider setting \$KCONFIG_CONFIG instead."
 	echo "  -s    strict mode. Fail if the fragment redefines any value."
+	echo "  -Q    disable warning messages for overridden options."
 	echo
 	echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ environment variable."
 }
@@ -40,6 +41,7 @@ BUILTIN=false
 OUTPUT=.
 STRICT=false
 CONFIG_PREFIX=${CONFIG_-CONFIG_}
+WARNOVERRIDE=echo
 
 while true; do
 	case $1 in
@@ -82,6 +84,11 @@ while true; do
 		shift
 		continue
 		;;
+	"-Q")
+		WARNOVERRIDE=true
+		shift
+		continue
+		;;
 	*)
 		break
 		;;
@@ -138,21 +145,21 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do
 		NEW_VAL=$(grep -w $CFG $MERGE_FILE)
 		BUILTIN_FLAG=false
 		if [ "$BUILTIN" = "true" ] && [ "${NEW_VAL#CONFIG_*=}" = "m" ] && [ "${PREV_VAL#CONFIG_*=}" = "y" ]; then
-			echo Previous  value: $PREV_VAL
-			echo New value:       $NEW_VAL
-			echo -y passed, will not demote y to m
-			echo
+			${WARNOVVERIDE} Previous  value: $PREV_VAL
+			${WARNOVERRIDE} New value:       $NEW_VAL
+			${WARNOVERRIDE} -y passed, will not demote y to m
+			${WARNOVERRIDE}
 			BUILTIN_FLAG=true
 		elif [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
-			echo Value of $CFG is redefined by fragment $ORIG_MERGE_FILE:
-			echo Previous  value: $PREV_VAL
-			echo New value:       $NEW_VAL
-			echo
+			${WARNOVERRIDE} Value of $CFG is redefined by fragment $ORIG_MERGE_FILE:
+			${WARNOVERRIDE} Previous  value: $PREV_VAL
+			${WARNOVERRIDE} New value:       $NEW_VAL
+			${WARNOVERRIDE}
 			if [ "$STRICT" = "true" ]; then
 				STRICT_MODE_VIOLATED=true
 			fi
 		elif [ "$WARNREDUN" = "true" ]; then
-			echo Value of $CFG is redundant by fragment $ORIG_MERGE_FILE:
+			${WARNOVERRIDE} Value of $CFG is redundant by fragment $ORIG_MERGE_FILE:
 		fi
 		if [ "$BUILTIN_FLAG" = "false" ]; then
 			sed -i "/$CFG[ =]/d" $TMP_FILE

-- 
2.30.2


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 1/3] scripts: merge_config: Add option to suppress warning on overrides
@ 2023-02-10 19:52   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 19:52 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel, Mark Brown

Currently merge_config.sh will unconditionally warn if a fragment overrides
any already set symbol. This is generally desirable but is inconvenient in
cases where we want to create a fragment which disables unwanted options in
the base configuration, for example when attempting to produce a smaller
version of another configuration.

Add an option -Q which will suppress these warnings.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 scripts/kconfig/merge_config.sh | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index e5b46980c22a..32620de473ad 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -29,6 +29,7 @@ usage() {
 	echo "  -y    make builtin have precedence over modules"
 	echo "  -O    dir to put generated output files.  Consider setting \$KCONFIG_CONFIG instead."
 	echo "  -s    strict mode. Fail if the fragment redefines any value."
+	echo "  -Q    disable warning messages for overridden options."
 	echo
 	echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ environment variable."
 }
@@ -40,6 +41,7 @@ BUILTIN=false
 OUTPUT=.
 STRICT=false
 CONFIG_PREFIX=${CONFIG_-CONFIG_}
+WARNOVERRIDE=echo
 
 while true; do
 	case $1 in
@@ -82,6 +84,11 @@ while true; do
 		shift
 		continue
 		;;
+	"-Q")
+		WARNOVERRIDE=true
+		shift
+		continue
+		;;
 	*)
 		break
 		;;
@@ -138,21 +145,21 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do
 		NEW_VAL=$(grep -w $CFG $MERGE_FILE)
 		BUILTIN_FLAG=false
 		if [ "$BUILTIN" = "true" ] && [ "${NEW_VAL#CONFIG_*=}" = "m" ] && [ "${PREV_VAL#CONFIG_*=}" = "y" ]; then
-			echo Previous  value: $PREV_VAL
-			echo New value:       $NEW_VAL
-			echo -y passed, will not demote y to m
-			echo
+			${WARNOVVERIDE} Previous  value: $PREV_VAL
+			${WARNOVERRIDE} New value:       $NEW_VAL
+			${WARNOVERRIDE} -y passed, will not demote y to m
+			${WARNOVERRIDE}
 			BUILTIN_FLAG=true
 		elif [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
-			echo Value of $CFG is redefined by fragment $ORIG_MERGE_FILE:
-			echo Previous  value: $PREV_VAL
-			echo New value:       $NEW_VAL
-			echo
+			${WARNOVERRIDE} Value of $CFG is redefined by fragment $ORIG_MERGE_FILE:
+			${WARNOVERRIDE} Previous  value: $PREV_VAL
+			${WARNOVERRIDE} New value:       $NEW_VAL
+			${WARNOVERRIDE}
 			if [ "$STRICT" = "true" ]; then
 				STRICT_MODE_VIOLATED=true
 			fi
 		elif [ "$WARNREDUN" = "true" ]; then
-			echo Value of $CFG is redundant by fragment $ORIG_MERGE_FILE:
+			${WARNOVERRIDE} Value of $CFG is redundant by fragment $ORIG_MERGE_FILE:
 		fi
 		if [ "$BUILTIN_FLAG" = "false" ]; then
 			sed -i "/$CFG[ =]/d" $TMP_FILE

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/3] kbuild: Provide a version of merge_into_defconfig without override warnings
  2023-02-10 19:52 ` Mark Brown
@ 2023-02-10 19:52   ` Mark Brown
  -1 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 19:52 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel, Mark Brown

While warning on overridden Kconfig options is a good default for merging
config fragements sometimes that is our explicit intent and the warnings
are unhelpful, add a new merge_into_defconfig_override which does the merge
but with warnings suppressed.

Since merge_into_defconfig accepts any number of fragments it is difficult
to allow it to accept the flag.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 scripts/Makefile.defconf | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/scripts/Makefile.defconf b/scripts/Makefile.defconf
index ab332f7534f5..ab271b2051a2 100644
--- a/scripts/Makefile.defconf
+++ b/scripts/Makefile.defconf
@@ -13,3 +13,17 @@ define merge_into_defconfig
 		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
 	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
 endef
+
+
+# Creates 'merged defconfigs without warning about overrides'
+# ---------------------------------------------------------------------------
+# Usage:
+#   $(call merge_into_defconfig_override,base_config,config_fragment1 config_fragment2 ...)
+#
+# Input config fragments without '.config' suffix
+define merge_into_defconfig_override
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
+		-Q -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
+		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
+	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
+endef

-- 
2.30.2


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/3] kbuild: Provide a version of merge_into_defconfig without override warnings
@ 2023-02-10 19:52   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 19:52 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel, Mark Brown

While warning on overridden Kconfig options is a good default for merging
config fragements sometimes that is our explicit intent and the warnings
are unhelpful, add a new merge_into_defconfig_override which does the merge
but with warnings suppressed.

Since merge_into_defconfig accepts any number of fragments it is difficult
to allow it to accept the flag.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 scripts/Makefile.defconf | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/scripts/Makefile.defconf b/scripts/Makefile.defconf
index ab332f7534f5..ab271b2051a2 100644
--- a/scripts/Makefile.defconf
+++ b/scripts/Makefile.defconf
@@ -13,3 +13,17 @@ define merge_into_defconfig
 		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
 	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
 endef
+
+
+# Creates 'merged defconfigs without warning about overrides'
+# ---------------------------------------------------------------------------
+# Usage:
+#   $(call merge_into_defconfig_override,base_config,config_fragment1 config_fragment2 ...)
+#
+# Input config fragments without '.config' suffix
+define merge_into_defconfig_override
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
+		-Q -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
+		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
+	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
+endef

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/3] arm64: configs: Add virtconfig
  2023-02-10 19:52 ` Mark Brown
@ 2023-02-10 19:52   ` Mark Brown
  -1 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 19:52 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel, Mark Brown

Provide a slimline configuration intended to be booted on virtual
machines, with the goal of providing a light configuration which will
boot on and enable features available in mach-virt.  This is defined in
terms of the standard defconfig, with an additional virt.config fragment
which disables options unneeded in a virtual configuration.

As a first step we just disable all the ARCH_ configuration options,
disabling the build of all the SoC specific drivers.  This results in a
kernel that builds about 25% faster in my testing, if this approach
works for people we can add further options.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/arm64/Makefile            |  6 ++++++
 arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index c33b5da95b4a..2d49aea0ff67 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -205,6 +205,12 @@ ifdef CONFIG_COMPAT_VDSO
 endif
 endif
 
+include $(srctree)/scripts/Makefile.defconf
+
+PHONY += virtconfig
+virtconfig:
+	$(call merge_into_defconfig_override,defconfig,virt)
+
 define archhelp
   echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
   echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
diff --git a/arch/arm64/configs/virt.config b/arch/arm64/configs/virt.config
new file mode 100644
index 000000000000..6ef0a739717f
--- /dev/null
+++ b/arch/arm64/configs/virt.config
@@ -0,0 +1,39 @@
+# CONFIG_ARCH_ACTIONS is not set
+# CONFIG_ARCH_SUNXI is not set
+# CONFIG_ARCH_ALPINE is not set
+# CONFIG_ARCH_APPLE is not set
+# CONFIG_ARCH_BCM is not set
+# CONFIG_ARCH_BCM2835 is not set
+# CONFIG_ARCH_BCMBCA is not set
+# CONFIG_ARCH_BCM_IPROC is not set
+# CONFIG_ARCH_BERLIN is not set
+# CONFIG_ARCH_BRCMSTB is not set
+# CONFIG_ARCH_EXYNOS is not set
+# CONFIG_ARCH_K3 is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
+# CONFIG_ARCH_LG1K is not set
+# CONFIG_ARCH_HISI is not set
+# CONFIG_ARCH_KEEMBAY is not set
+# CONFIG_ARCH_MEDIATEK is not set
+# CONFIG_ARCH_MESON is not set
+# CONFIG_ARCH_MVEBU is not set
+# CONFIG_ARCH_NXP is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_NPCM is not set
+# CONFIG_ARCH_QCOM is not set
+# CONFIG_ARCH_RENESAS is not set
+# CONFIG_ARCH_ROCKCHIP is not set
+# CONFIG_ARCH_S32 is not set
+# CONFIG_ARCH_SEATTLE is not set
+# CONFIG_ARCH_INTEL_SOCFPGA is not set
+# CONFIG_ARCH_SYNQUACER is not set
+# CONFIG_ARCH_TEGRA is not set
+# CONFIG_ARCH_TESLA_FSD is not set
+# CONFIG_ARCH_SPRD is not set
+# CONFIG_ARCH_THUNDER is not set
+# CONFIG_ARCH_THUNDER2 is not set
+# CONFIG_ARCH_UNIPHIER is not set
+# CONFIG_ARCH_VEXPRESS is not set
+# CONFIG_ARCH_VISCONTI is not set
+# CONFIG_ARCH_XGENE is not set
+# CONFIG_ARCH_ZYNQMP is not set

-- 
2.30.2


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/3] arm64: configs: Add virtconfig
@ 2023-02-10 19:52   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 19:52 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel, Mark Brown

Provide a slimline configuration intended to be booted on virtual
machines, with the goal of providing a light configuration which will
boot on and enable features available in mach-virt.  This is defined in
terms of the standard defconfig, with an additional virt.config fragment
which disables options unneeded in a virtual configuration.

As a first step we just disable all the ARCH_ configuration options,
disabling the build of all the SoC specific drivers.  This results in a
kernel that builds about 25% faster in my testing, if this approach
works for people we can add further options.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/arm64/Makefile            |  6 ++++++
 arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index c33b5da95b4a..2d49aea0ff67 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -205,6 +205,12 @@ ifdef CONFIG_COMPAT_VDSO
 endif
 endif
 
+include $(srctree)/scripts/Makefile.defconf
+
+PHONY += virtconfig
+virtconfig:
+	$(call merge_into_defconfig_override,defconfig,virt)
+
 define archhelp
   echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
   echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
diff --git a/arch/arm64/configs/virt.config b/arch/arm64/configs/virt.config
new file mode 100644
index 000000000000..6ef0a739717f
--- /dev/null
+++ b/arch/arm64/configs/virt.config
@@ -0,0 +1,39 @@
+# CONFIG_ARCH_ACTIONS is not set
+# CONFIG_ARCH_SUNXI is not set
+# CONFIG_ARCH_ALPINE is not set
+# CONFIG_ARCH_APPLE is not set
+# CONFIG_ARCH_BCM is not set
+# CONFIG_ARCH_BCM2835 is not set
+# CONFIG_ARCH_BCMBCA is not set
+# CONFIG_ARCH_BCM_IPROC is not set
+# CONFIG_ARCH_BERLIN is not set
+# CONFIG_ARCH_BRCMSTB is not set
+# CONFIG_ARCH_EXYNOS is not set
+# CONFIG_ARCH_K3 is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
+# CONFIG_ARCH_LG1K is not set
+# CONFIG_ARCH_HISI is not set
+# CONFIG_ARCH_KEEMBAY is not set
+# CONFIG_ARCH_MEDIATEK is not set
+# CONFIG_ARCH_MESON is not set
+# CONFIG_ARCH_MVEBU is not set
+# CONFIG_ARCH_NXP is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_NPCM is not set
+# CONFIG_ARCH_QCOM is not set
+# CONFIG_ARCH_RENESAS is not set
+# CONFIG_ARCH_ROCKCHIP is not set
+# CONFIG_ARCH_S32 is not set
+# CONFIG_ARCH_SEATTLE is not set
+# CONFIG_ARCH_INTEL_SOCFPGA is not set
+# CONFIG_ARCH_SYNQUACER is not set
+# CONFIG_ARCH_TEGRA is not set
+# CONFIG_ARCH_TESLA_FSD is not set
+# CONFIG_ARCH_SPRD is not set
+# CONFIG_ARCH_THUNDER is not set
+# CONFIG_ARCH_THUNDER2 is not set
+# CONFIG_ARCH_UNIPHIER is not set
+# CONFIG_ARCH_VEXPRESS is not set
+# CONFIG_ARCH_VISCONTI is not set
+# CONFIG_ARCH_XGENE is not set
+# CONFIG_ARCH_ZYNQMP is not set

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 0/3] arm64: configs: Provide slimmed down configuration for guests
  2023-02-10 19:52 ` Mark Brown
@ 2023-02-10 23:51   ` Mark Brown
  -1 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 23:51 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

On Fri, Feb 10, 2023 at 07:52:46PM +0000, Mark Brown wrote:
> It has been noted that due to the extensive platform support it
> enables the arm64 defconfig is rather large and takes a while to
> build in comparison with other architectures which can be a
> burden when doing cross architecture work, especially when
> testing is mainly in emulation.  We can mitigate this by providing
> a configuration that only enables the support required to run in
> mach-virt, this will be much smaller and quicker to build.

Sorry, this is v2 of 

   https://lore.kernel.org/linux-arm-kernel/20230203-arm64-defconfigs-v1-0-6d0d03a6dbd2@kernel.org/#r

but it seems b4 didn't pick up that it was v2 (I think due to me messing
up moving between machines).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 0/3] arm64: configs: Provide slimmed down configuration for guests
@ 2023-02-10 23:51   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-10 23:51 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Masahiro Yamada
  Cc: Mark Rutland, Peter Zijlstra, linux-arm-kernel, linux-kbuild,
	linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 757 bytes --]

On Fri, Feb 10, 2023 at 07:52:46PM +0000, Mark Brown wrote:
> It has been noted that due to the extensive platform support it
> enables the arm64 defconfig is rather large and takes a while to
> build in comparison with other architectures which can be a
> burden when doing cross architecture work, especially when
> testing is mainly in emulation.  We can mitigate this by providing
> a configuration that only enables the support required to run in
> mach-virt, this will be much smaller and quicker to build.

Sorry, this is v2 of 

   https://lore.kernel.org/linux-arm-kernel/20230203-arm64-defconfigs-v1-0-6d0d03a6dbd2@kernel.org/#r

but it seems b4 didn't pick up that it was v2 (I think due to me messing
up moving between machines).

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
  2023-02-10 19:52   ` Mark Brown
@ 2023-02-11  7:37     ` Masahiro Yamada
  -1 siblings, 0 replies; 21+ messages in thread
From: Masahiro Yamada @ 2023-02-11  7:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel

On Sat, Feb 11, 2023 at 4:54 AM Mark Brown <broonie@kernel.org> wrote:
>
> Provide a slimline configuration intended to be booted on virtual
> machines, with the goal of providing a light configuration which will
> boot on and enable features available in mach-virt.  This is defined in
> terms of the standard defconfig, with an additional virt.config fragment
> which disables options unneeded in a virtual configuration.
>
> As a first step we just disable all the ARCH_ configuration options,
> disabling the build of all the SoC specific drivers.  This results in a
> kernel that builds about 25% faster in my testing, if this approach
> works for people we can add further options.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  arch/arm64/Makefile            |  6 ++++++
>  arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 45 insertions(+)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index c33b5da95b4a..2d49aea0ff67 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -205,6 +205,12 @@ ifdef CONFIG_COMPAT_VDSO
>  endif
>  endif
>
> +include $(srctree)/scripts/Makefile.defconf
> +
> +PHONY += virtconfig
> +virtconfig:
> +       $(call merge_into_defconfig_override,defconfig,virt)
> +
>  define archhelp
>    echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
>    echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
> diff --git a/arch/arm64/configs/virt.config b/arch/arm64/configs/virt.config
> new file mode 100644
> index 000000000000..6ef0a739717f
> --- /dev/null
> +++ b/arch/arm64/configs/virt.config
> @@ -0,0 +1,39 @@
> +# CONFIG_ARCH_ACTIONS is not set
> +# CONFIG_ARCH_SUNXI is not set
> +# CONFIG_ARCH_ALPINE is not set
> +# CONFIG_ARCH_APPLE is not set
> +# CONFIG_ARCH_BCM is not set
> +# CONFIG_ARCH_BCM2835 is not set
> +# CONFIG_ARCH_BCMBCA is not set
> +# CONFIG_ARCH_BCM_IPROC is not set
> +# CONFIG_ARCH_BERLIN is not set
> +# CONFIG_ARCH_BRCMSTB is not set
> +# CONFIG_ARCH_EXYNOS is not set
> +# CONFIG_ARCH_K3 is not set
> +# CONFIG_ARCH_LAYERSCAPE is not set
> +# CONFIG_ARCH_LG1K is not set
> +# CONFIG_ARCH_HISI is not set
> +# CONFIG_ARCH_KEEMBAY is not set
> +# CONFIG_ARCH_MEDIATEK is not set
> +# CONFIG_ARCH_MESON is not set
> +# CONFIG_ARCH_MVEBU is not set
> +# CONFIG_ARCH_NXP is not set
> +# CONFIG_ARCH_MXC is not set
> +# CONFIG_ARCH_NPCM is not set
> +# CONFIG_ARCH_QCOM is not set
> +# CONFIG_ARCH_RENESAS is not set
> +# CONFIG_ARCH_ROCKCHIP is not set
> +# CONFIG_ARCH_S32 is not set
> +# CONFIG_ARCH_SEATTLE is not set
> +# CONFIG_ARCH_INTEL_SOCFPGA is not set
> +# CONFIG_ARCH_SYNQUACER is not set
> +# CONFIG_ARCH_TEGRA is not set
> +# CONFIG_ARCH_TESLA_FSD is not set
> +# CONFIG_ARCH_SPRD is not set
> +# CONFIG_ARCH_THUNDER is not set
> +# CONFIG_ARCH_THUNDER2 is not set
> +# CONFIG_ARCH_UNIPHIER is not set
> +# CONFIG_ARCH_VEXPRESS is not set
> +# CONFIG_ARCH_VISCONTI is not set
> +# CONFIG_ARCH_XGENE is not set
> +# CONFIG_ARCH_ZYNQMP is not set
>
> --
> 2.30.2
>



Yeah, I have a _local_ script to apply
a similar config fragragment.

When I run QEMU, I disable unneeded CONFIG_ARCH_*,
and also disable unneeded sub-systems.

Not only me, many people are doing similar in their local env,
I guess.


Of course, I will not upstream my set of CONFIG options
since it is just my preference.
After all, this depends on people in my opinion.


BTW, the minimal set for booting + minimal features
might be similar to what Buildroot provides?
I do not know... It booted at least when I tried some years ago.

https://github.com/buildroot/buildroot/blob/master/board/qemu/aarch64-virt/linux.config






--
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
@ 2023-02-11  7:37     ` Masahiro Yamada
  0 siblings, 0 replies; 21+ messages in thread
From: Masahiro Yamada @ 2023-02-11  7:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel

On Sat, Feb 11, 2023 at 4:54 AM Mark Brown <broonie@kernel.org> wrote:
>
> Provide a slimline configuration intended to be booted on virtual
> machines, with the goal of providing a light configuration which will
> boot on and enable features available in mach-virt.  This is defined in
> terms of the standard defconfig, with an additional virt.config fragment
> which disables options unneeded in a virtual configuration.
>
> As a first step we just disable all the ARCH_ configuration options,
> disabling the build of all the SoC specific drivers.  This results in a
> kernel that builds about 25% faster in my testing, if this approach
> works for people we can add further options.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  arch/arm64/Makefile            |  6 ++++++
>  arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 45 insertions(+)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index c33b5da95b4a..2d49aea0ff67 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -205,6 +205,12 @@ ifdef CONFIG_COMPAT_VDSO
>  endif
>  endif
>
> +include $(srctree)/scripts/Makefile.defconf
> +
> +PHONY += virtconfig
> +virtconfig:
> +       $(call merge_into_defconfig_override,defconfig,virt)
> +
>  define archhelp
>    echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
>    echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
> diff --git a/arch/arm64/configs/virt.config b/arch/arm64/configs/virt.config
> new file mode 100644
> index 000000000000..6ef0a739717f
> --- /dev/null
> +++ b/arch/arm64/configs/virt.config
> @@ -0,0 +1,39 @@
> +# CONFIG_ARCH_ACTIONS is not set
> +# CONFIG_ARCH_SUNXI is not set
> +# CONFIG_ARCH_ALPINE is not set
> +# CONFIG_ARCH_APPLE is not set
> +# CONFIG_ARCH_BCM is not set
> +# CONFIG_ARCH_BCM2835 is not set
> +# CONFIG_ARCH_BCMBCA is not set
> +# CONFIG_ARCH_BCM_IPROC is not set
> +# CONFIG_ARCH_BERLIN is not set
> +# CONFIG_ARCH_BRCMSTB is not set
> +# CONFIG_ARCH_EXYNOS is not set
> +# CONFIG_ARCH_K3 is not set
> +# CONFIG_ARCH_LAYERSCAPE is not set
> +# CONFIG_ARCH_LG1K is not set
> +# CONFIG_ARCH_HISI is not set
> +# CONFIG_ARCH_KEEMBAY is not set
> +# CONFIG_ARCH_MEDIATEK is not set
> +# CONFIG_ARCH_MESON is not set
> +# CONFIG_ARCH_MVEBU is not set
> +# CONFIG_ARCH_NXP is not set
> +# CONFIG_ARCH_MXC is not set
> +# CONFIG_ARCH_NPCM is not set
> +# CONFIG_ARCH_QCOM is not set
> +# CONFIG_ARCH_RENESAS is not set
> +# CONFIG_ARCH_ROCKCHIP is not set
> +# CONFIG_ARCH_S32 is not set
> +# CONFIG_ARCH_SEATTLE is not set
> +# CONFIG_ARCH_INTEL_SOCFPGA is not set
> +# CONFIG_ARCH_SYNQUACER is not set
> +# CONFIG_ARCH_TEGRA is not set
> +# CONFIG_ARCH_TESLA_FSD is not set
> +# CONFIG_ARCH_SPRD is not set
> +# CONFIG_ARCH_THUNDER is not set
> +# CONFIG_ARCH_THUNDER2 is not set
> +# CONFIG_ARCH_UNIPHIER is not set
> +# CONFIG_ARCH_VEXPRESS is not set
> +# CONFIG_ARCH_VISCONTI is not set
> +# CONFIG_ARCH_XGENE is not set
> +# CONFIG_ARCH_ZYNQMP is not set
>
> --
> 2.30.2
>



Yeah, I have a _local_ script to apply
a similar config fragragment.

When I run QEMU, I disable unneeded CONFIG_ARCH_*,
and also disable unneeded sub-systems.

Not only me, many people are doing similar in their local env,
I guess.


Of course, I will not upstream my set of CONFIG options
since it is just my preference.
After all, this depends on people in my opinion.


BTW, the minimal set for booting + minimal features
might be similar to what Buildroot provides?
I do not know... It booted at least when I tried some years ago.

https://github.com/buildroot/buildroot/blob/master/board/qemu/aarch64-virt/linux.config






--
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
  2023-02-11  7:37     ` Masahiro Yamada
@ 2023-02-11 23:10       ` Mark Brown
  -1 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-11 23:10 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1638 bytes --]

On Sat, Feb 11, 2023 at 04:37:02PM +0900, Masahiro Yamada wrote:

> Yeah, I have a _local_ script to apply
> a similar config fragragment.

> When I run QEMU, I disable unneeded CONFIG_ARCH_*,
> and also disable unneeded sub-systems.

> Not only me, many people are doing similar in their local env,
> I guess.

Me too - I've got a config I actually use when doing development
that's slimmed down a lot (it's a bit bigger due to me using the
Arm FVPs for some things).  I suspect you're right that many
people who do this stuff regularly have one, it's mostly when
someone is doing cross architecture work rather than specifically
targetting arm64 that it'd make an immediate difference though
it's possible some of us will decide we can stop bothering
maintianing our own configs.

> Of course, I will not upstream my set of CONFIG options
> since it is just my preference.
> After all, this depends on people in my opinion.

There's definitely room for opinion with this, for example with
some of the virtio devices which are less frequently used in
development.

> BTW, the minimal set for booting + minimal features
> might be similar to what Buildroot provides?
> I do not know... It booted at least when I tried some years ago.

> https://github.com/buildroot/buildroot/blob/master/board/qemu/aarch64-virt/linux.config

It does look pluasible - it looks like it might be slightly
bigger than just mach-virt since it's got ARCH_VEXPRESS and thing
slike the SMMU and PL320 turned on which I suspect means it's
intended to support the Arm models too.  There might be some
other stuff needed for common test programs or systemd though.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
@ 2023-02-11 23:10       ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-11 23:10 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1638 bytes --]

On Sat, Feb 11, 2023 at 04:37:02PM +0900, Masahiro Yamada wrote:

> Yeah, I have a _local_ script to apply
> a similar config fragragment.

> When I run QEMU, I disable unneeded CONFIG_ARCH_*,
> and also disable unneeded sub-systems.

> Not only me, many people are doing similar in their local env,
> I guess.

Me too - I've got a config I actually use when doing development
that's slimmed down a lot (it's a bit bigger due to me using the
Arm FVPs for some things).  I suspect you're right that many
people who do this stuff regularly have one, it's mostly when
someone is doing cross architecture work rather than specifically
targetting arm64 that it'd make an immediate difference though
it's possible some of us will decide we can stop bothering
maintianing our own configs.

> Of course, I will not upstream my set of CONFIG options
> since it is just my preference.
> After all, this depends on people in my opinion.

There's definitely room for opinion with this, for example with
some of the virtio devices which are less frequently used in
development.

> BTW, the minimal set for booting + minimal features
> might be similar to what Buildroot provides?
> I do not know... It booted at least when I tried some years ago.

> https://github.com/buildroot/buildroot/blob/master/board/qemu/aarch64-virt/linux.config

It does look pluasible - it looks like it might be slightly
bigger than just mach-virt since it's got ARCH_VEXPRESS and thing
slike the SMMU and PL320 turned on which I suspect means it's
intended to support the Arm models too.  There might be some
other stuff needed for common test programs or systemd though.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
  2023-02-11  7:37     ` Masahiro Yamada
@ 2023-02-13 15:15       ` Arnd Bergmann
  -1 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2023-02-13 15:15 UTC (permalink / raw)
  To: Masahiro Yamada, Mark Brown
  Cc: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel

On Sat, Feb 11, 2023, at 08:37, Masahiro Yamada wrote:
> On Sat, Feb 11, 2023 at 4:54 AM Mark Brown <broonie@kernel.org> wrote:
>>
>> Provide a slimline configuration intended to be booted on virtual
>> machines, with the goal of providing a light configuration which will
>> boot on and enable features available in mach-virt.  This is defined in
>> terms of the standard defconfig, with an additional virt.config fragment
>> which disables options unneeded in a virtual configuration.
>>
>> As a first step we just disable all the ARCH_ configuration options,
>> disabling the build of all the SoC specific drivers.  This results in a
>> kernel that builds about 25% faster in my testing, if this approach
>> works for people we can add further options.
>>
>> Signed-off-by: Mark Brown <broonie@kernel.org>
>> ---
>>  arch/arm64/Makefile            |  6 ++++++
>>  arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 45 insertions(+)

I like this a lot, I think that is very helpful and we can always build on
top of it later with other fragments.

We could still combine this with another Kconfig option that
just hides all the real SoC options, which would turn this fragment
into a one-line file and avoid having to update it whenever platforms
get added.

> Yeah, I have a _local_ script to apply
> a similar config fragragment.
>
> When I run QEMU, I disable unneeded CONFIG_ARCH_*,
> and also disable unneeded sub-systems.
>
> Not only me, many people are doing similar in their local env,
> I guess.
>
>
> Of course, I will not upstream my set of CONFIG options
> since it is just my preference.
> After all, this depends on people in my opinion.

Do you have an opinion on the other two patches? If those
look good to you, maybe I can just merge all three through the
soc/defconfig branch for 6.3.

      Arnd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
@ 2023-02-13 15:15       ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2023-02-13 15:15 UTC (permalink / raw)
  To: Masahiro Yamada, Mark Brown
  Cc: Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel

On Sat, Feb 11, 2023, at 08:37, Masahiro Yamada wrote:
> On Sat, Feb 11, 2023 at 4:54 AM Mark Brown <broonie@kernel.org> wrote:
>>
>> Provide a slimline configuration intended to be booted on virtual
>> machines, with the goal of providing a light configuration which will
>> boot on and enable features available in mach-virt.  This is defined in
>> terms of the standard defconfig, with an additional virt.config fragment
>> which disables options unneeded in a virtual configuration.
>>
>> As a first step we just disable all the ARCH_ configuration options,
>> disabling the build of all the SoC specific drivers.  This results in a
>> kernel that builds about 25% faster in my testing, if this approach
>> works for people we can add further options.
>>
>> Signed-off-by: Mark Brown <broonie@kernel.org>
>> ---
>>  arch/arm64/Makefile            |  6 ++++++
>>  arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 45 insertions(+)

I like this a lot, I think that is very helpful and we can always build on
top of it later with other fragments.

We could still combine this with another Kconfig option that
just hides all the real SoC options, which would turn this fragment
into a one-line file and avoid having to update it whenever platforms
get added.

> Yeah, I have a _local_ script to apply
> a similar config fragragment.
>
> When I run QEMU, I disable unneeded CONFIG_ARCH_*,
> and also disable unneeded sub-systems.
>
> Not only me, many people are doing similar in their local env,
> I guess.
>
>
> Of course, I will not upstream my set of CONFIG options
> since it is just my preference.
> After all, this depends on people in my opinion.

Do you have an opinion on the other two patches? If those
look good to you, maybe I can just merge all three through the
soc/defconfig branch for 6.3.

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
  2023-02-13 15:15       ` Arnd Bergmann
@ 2023-02-13 15:48         ` Mark Brown
  -1 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-13 15:48 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Masahiro Yamada, Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

On Mon, Feb 13, 2023 at 04:15:52PM +0100, Arnd Bergmann wrote:

> We could still combine this with another Kconfig option that
> just hides all the real SoC options, which would turn this fragment
> into a one-line file and avoid having to update it whenever platforms
> get added.

I think if people are OK with this approach we'll want to extend
it so that it's cutting out more than just the platforms -
there's quite a lot of drivers and subsystems that aren't
platform specific but are clearly not something we'd want as
default for running in a virtual environment, enough to make a
difference to build times.  That doesn't mean that a "disable all
the platform support" Kconfig isn't useful, just that I don't
think we'd want this to be a one liner long term.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
@ 2023-02-13 15:48         ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2023-02-13 15:48 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Masahiro Yamada, Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 767 bytes --]

On Mon, Feb 13, 2023 at 04:15:52PM +0100, Arnd Bergmann wrote:

> We could still combine this with another Kconfig option that
> just hides all the real SoC options, which would turn this fragment
> into a one-line file and avoid having to update it whenever platforms
> get added.

I think if people are OK with this approach we'll want to extend
it so that it's cutting out more than just the platforms -
there's quite a lot of drivers and subsystems that aren't
platform specific but are clearly not something we'd want as
default for running in a virtual environment, enough to make a
difference to build times.  That doesn't mean that a "disable all
the platform support" Kconfig isn't useful, just that I don't
think we'd want this to be a one liner long term.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
  2023-02-13 15:15       ` Arnd Bergmann
@ 2023-02-13 16:18         ` Masahiro Yamada
  -1 siblings, 0 replies; 21+ messages in thread
From: Masahiro Yamada @ 2023-02-13 16:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Brown, Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel

On Tue, Feb 14, 2023 at 12:16 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Sat, Feb 11, 2023, at 08:37, Masahiro Yamada wrote:
> > On Sat, Feb 11, 2023 at 4:54 AM Mark Brown <broonie@kernel.org> wrote:
> >>
> >> Provide a slimline configuration intended to be booted on virtual
> >> machines, with the goal of providing a light configuration which will
> >> boot on and enable features available in mach-virt.  This is defined in
> >> terms of the standard defconfig, with an additional virt.config fragment
> >> which disables options unneeded in a virtual configuration.
> >>
> >> As a first step we just disable all the ARCH_ configuration options,
> >> disabling the build of all the SoC specific drivers.  This results in a
> >> kernel that builds about 25% faster in my testing, if this approach
> >> works for people we can add further options.
> >>
> >> Signed-off-by: Mark Brown <broonie@kernel.org>
> >> ---
> >>  arch/arm64/Makefile            |  6 ++++++
> >>  arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
> >>  2 files changed, 45 insertions(+)
>
> I like this a lot, I think that is very helpful and we can always build on
> top of it later with other fragments.
>
> We could still combine this with another Kconfig option that
> just hides all the real SoC options, which would turn this fragment
> into a one-line file and avoid having to update it whenever platforms
> get added.
>
> > Yeah, I have a _local_ script to apply
> > a similar config fragragment.
> >
> > When I run QEMU, I disable unneeded CONFIG_ARCH_*,
> > and also disable unneeded sub-systems.
> >
> > Not only me, many people are doing similar in their local env,
> > I guess.
> >
> >
> > Of course, I will not upstream my set of CONFIG options
> > since it is just my preference.
> > After all, this depends on people in my opinion.
>
> Do you have an opinion on the other two patches? If those
> look good to you, maybe I can just merge all three through the
> soc/defconfig branch for 6.3.
>
>       Arnd


scripts/Makefile.defconf is not what I'd maintain.
Please do whatever you want to do.



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/3] arm64: configs: Add virtconfig
@ 2023-02-13 16:18         ` Masahiro Yamada
  0 siblings, 0 replies; 21+ messages in thread
From: Masahiro Yamada @ 2023-02-13 16:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Brown, Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, soc, Mark Rutland,
	Peter Zijlstra, linux-arm-kernel, linux-kbuild, linux-kernel

On Tue, Feb 14, 2023 at 12:16 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Sat, Feb 11, 2023, at 08:37, Masahiro Yamada wrote:
> > On Sat, Feb 11, 2023 at 4:54 AM Mark Brown <broonie@kernel.org> wrote:
> >>
> >> Provide a slimline configuration intended to be booted on virtual
> >> machines, with the goal of providing a light configuration which will
> >> boot on and enable features available in mach-virt.  This is defined in
> >> terms of the standard defconfig, with an additional virt.config fragment
> >> which disables options unneeded in a virtual configuration.
> >>
> >> As a first step we just disable all the ARCH_ configuration options,
> >> disabling the build of all the SoC specific drivers.  This results in a
> >> kernel that builds about 25% faster in my testing, if this approach
> >> works for people we can add further options.
> >>
> >> Signed-off-by: Mark Brown <broonie@kernel.org>
> >> ---
> >>  arch/arm64/Makefile            |  6 ++++++
> >>  arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
> >>  2 files changed, 45 insertions(+)
>
> I like this a lot, I think that is very helpful and we can always build on
> top of it later with other fragments.
>
> We could still combine this with another Kconfig option that
> just hides all the real SoC options, which would turn this fragment
> into a one-line file and avoid having to update it whenever platforms
> get added.
>
> > Yeah, I have a _local_ script to apply
> > a similar config fragragment.
> >
> > When I run QEMU, I disable unneeded CONFIG_ARCH_*,
> > and also disable unneeded sub-systems.
> >
> > Not only me, many people are doing similar in their local env,
> > I guess.
> >
> >
> > Of course, I will not upstream my set of CONFIG options
> > since it is just my preference.
> > After all, this depends on people in my opinion.
>
> Do you have an opinion on the other two patches? If those
> look good to you, maybe I can just merge all three through the
> soc/defconfig branch for 6.3.
>
>       Arnd


scripts/Makefile.defconf is not what I'd maintain.
Please do whatever you want to do.



-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 0/3] arm64: configs: Provide slimmed down configuration for guests
  2023-02-10 19:52 ` Mark Brown
                   ` (4 preceding siblings ...)
  (?)
@ 2023-02-13 19:30 ` patchwork-bot+linux-soc
  -1 siblings, 0 replies; 21+ messages in thread
From: patchwork-bot+linux-soc @ 2023-02-13 19:30 UTC (permalink / raw)
  To: Mark Brown; +Cc: soc

Hello:

This series was applied to soc/soc.git (for-next)
by Arnd Bergmann <arnd@arndb.de>:

On Fri, 10 Feb 2023 19:52:46 +0000 you wrote:
> It has been noted that due to the extensive platform support it
> enables the arm64 defconfig is rather large and takes a while to
> build in comparison with other architectures which can be a
> burden when doing cross architecture work, especially when
> testing is mainly in emulation.  We can mitigate this by providing
> a configuration that only enables the support required to run in
> mach-virt, this will be much smaller and quicker to build.
> 
> [...]

Here is the summary with links:
  - [1/3] scripts: merge_config: Add option to suppress warning on overrides
    https://git.kernel.org/soc/soc/c/46dff8d7e381
  - [2/3] kbuild: Provide a version of merge_into_defconfig without override warnings
    https://git.kernel.org/soc/soc/c/a63971257e66
  - [3/3] arm64: configs: Add virtconfig
    https://git.kernel.org/soc/soc/c/c6cd63f5af39

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2023-02-13 19:30 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 19:52 [PATCH 0/3] arm64: configs: Provide slimmed down configuration for guests Mark Brown
2023-02-10 19:52 ` Mark Brown
2023-02-10 19:52 ` [PATCH 1/3] scripts: merge_config: Add option to suppress warning on overrides Mark Brown
2023-02-10 19:52   ` Mark Brown
2023-02-10 19:52 ` [PATCH 2/3] kbuild: Provide a version of merge_into_defconfig without override warnings Mark Brown
2023-02-10 19:52   ` Mark Brown
2023-02-10 19:52 ` [PATCH 3/3] arm64: configs: Add virtconfig Mark Brown
2023-02-10 19:52   ` Mark Brown
2023-02-11  7:37   ` Masahiro Yamada
2023-02-11  7:37     ` Masahiro Yamada
2023-02-11 23:10     ` Mark Brown
2023-02-11 23:10       ` Mark Brown
2023-02-13 15:15     ` Arnd Bergmann
2023-02-13 15:15       ` Arnd Bergmann
2023-02-13 15:48       ` Mark Brown
2023-02-13 15:48         ` Mark Brown
2023-02-13 16:18       ` Masahiro Yamada
2023-02-13 16:18         ` Masahiro Yamada
2023-02-10 23:51 ` [PATCH 0/3] arm64: configs: Provide slimmed down configuration for guests Mark Brown
2023-02-10 23:51   ` Mark Brown
2023-02-13 19:30 ` patchwork-bot+linux-soc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.