linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups
@ 2025-05-05 11:09 Ingo Molnar
  2025-05-05 11:09 ` [PATCH 01/15] x86/kconfig/64: Refresh defconfig Ingo Molnar
                   ` (15 more replies)
  0 siblings, 16 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar

Historically the x86 defconfigs aimed to be distro kernel
work-alikes with fewer drivers and a substantially shorter
build time. We regularly ask our contributors to test their
changes on x86 defconfigs, and we frequently analyze code
generation on such kernels as well.

In practice, over the past couple of years this goal has
diverged from what actual modern Linux distributions do
these days, and this series aims to correct that divergence.

Perform a thorough modernization of the x86 defconfigs, and
apply some cleanups to the x86 build system as well:

 - Enable various kernel features that the most popular
   Linux distributions have enabled in their generic
   kernels these days: KVM host, BPF support, UBSAN, various MM
   options, debugging options, various scheduler and cgroups
   options, support for a number of guest OS platforms,
   and other options.

 - More specifically, these changes enable a rough superset
   of the kernel features enabled by Ubuntu, Fedora/RHEL
   kernels.

 - Clean up the organization of the defconfig files as well.

 - Add the ARCH=x86_32 build target

 - Synchronize the x86_32 defconfig to the x86_64 defconfig:
   this file is really just a random set of options configured
   many years ago with no relevance to anything people are
   using today anymore. Just follow the 64-bit options to the
   extent possible, to have at least one modern frame of
   reference.

 - Clean up a number of kbuild details

This series can also be accessed through my Git tree:

  git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git WIP.x86/kconfig

Thanks,

	Ingo

================>
Ingo Molnar (15):
  x86/kconfig/64: Refresh defconfig
  x86/kconfig/32: Refresh defconfig
  x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386
  x86/kbuild: Introduce the 'x86_32' subarchitecture
  x86/kbuild: Remove ancient 'arch/i386/' and 'arch/x86_64/' directory removal 'archclean' target
  x86/tools: insn_decoder_test.c: Emit standard build success messages
  x86/tools: insn_sanity.c: Emit standard build success messages
  x86/kconfig/64: Enable the KVM host in the defconfig
  x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX
  x86/kconfig/64: Enable BPF support in the defconfig
  x86/kconfig/64: Enable popular MM options in the defconfig
  x86/kconfig/64: Enable popular kernel debugging options in the defconfig
  x86/kconfig/64: Enable popular scheduler, cgroups and namespaces options in the defconfig
  x86/kconfig/64: Enable popular generic kernel options in the defconfig
  x86/kconfig/32: Synchronize the x86-32 defconfig to the x86-64 defconfig

 .../verify-bugs-and-bisect-regressions.rst         |   2 +-
 Makefile                                           |   7 +-
 arch/x86/Kconfig                                   |   2 +-
 arch/x86/Makefile                                  |  18 +--
 .../configs/{i386_defconfig => defconfig.x86_32}   | 130 ++++++++++++++++++---
 .../configs/{x86_64_defconfig => defconfig.x86_64} | 120 ++++++++++++++++---
 arch/x86/tools/insn_decoder_test.c                 |   2 +-
 arch/x86/tools/insn_sanity.c                       |   4 +-
 drivers/gpu/drm/ci/build.yml                       |   2 +-
 tools/scripts/Makefile.arch                        |   7 +-
 10 files changed, 244 insertions(+), 50 deletions(-)
 rename arch/x86/configs/{i386_defconfig => defconfig.x86_32} (69%)
 rename arch/x86/configs/{x86_64_defconfig => defconfig.x86_64} (70%)

-- 
2.45.2


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

* [PATCH 01/15] x86/kconfig/64: Refresh defconfig
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 02/15] x86/kconfig/32: " Ingo Molnar
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

Refresh the x86-64 defconfig to pick up changes in the
general Kconfig environment: removed options, different
defaults, renames, etc.

No changes to the actual result of 'make ARCH=x86 defconfig'.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/configs/x86_64_defconfig | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 61e25f6209ed..7d7310cdf8b0 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -27,6 +27,7 @@ CONFIG_CGROUP_DEBUG=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_PROFILING=y
+CONFIG_KEXEC=y
 CONFIG_SMP=y
 CONFIG_HYPERVISOR_GUEST=y
 CONFIG_PARAVIRT=y
@@ -40,8 +41,6 @@ CONFIG_EFI=y
 CONFIG_EFI_STUB=y
 CONFIG_EFI_MIXED=y
 CONFIG_HZ_1000=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
 CONFIG_HIBERNATION=y
 CONFIG_PM_DEBUG=y
 CONFIG_PM_TRACE_RTC=y
@@ -63,9 +62,7 @@ CONFIG_BINFMT_MISC=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_NET=y
 CONFIG_PACKET=y
-CONFIG_UNIX=y
 CONFIG_XFRM_USER=y
-CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 CONFIG_IP_ADVANCED_ROUTER=y
 CONFIG_IP_MULTIPLE_TABLES=y
@@ -205,7 +202,6 @@ CONFIG_SND_HDA_INTEL=y
 CONFIG_SND_HDA_HWDEP=y
 CONFIG_HIDRAW=y
 CONFIG_HID_GYRATION=y
-CONFIG_LOGITECH_FF=y
 CONFIG_HID_NTRIG=y
 CONFIG_HID_PANTHERLORD=y
 CONFIG_PANTHERLORD_FF=y
@@ -239,7 +235,6 @@ CONFIG_EXT4_FS_POSIX_ACL=y
 CONFIG_EXT4_FS_SECURITY=y
 CONFIG_QUOTA=y
 CONFIG_QUOTA_NETLINK_INTERFACE=y
-# CONFIG_PRINT_QUOTA_WARNING is not set
 CONFIG_QFMT_V2=y
 CONFIG_AUTOFS_FS=y
 CONFIG_ISO9660_FS=y
@@ -264,13 +259,11 @@ CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_WX=y
 CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_SCHED_DEBUG is not set
 CONFIG_SCHEDSTATS=y
 CONFIG_BLK_DEV_IO_TRACE=y
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
-- 
2.45.2


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

* [PATCH 02/15] x86/kconfig/32: Refresh defconfig
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
  2025-05-05 11:09 ` [PATCH 01/15] x86/kconfig/64: Refresh defconfig Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386 Ingo Molnar
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

Refresh the x86-32 defconfig to pick up changes in the
general Kconfig environment: removed options, different
defaults, renames, etc.

No changes to the actual result of 'make ARCH=i386 defconfig'.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/configs/i386_defconfig | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 91801138b10b..e983f1db22dd 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -28,6 +28,7 @@ CONFIG_CGROUP_DEBUG=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_PROFILING=y
+CONFIG_KEXEC=y
 CONFIG_SMP=y
 CONFIG_HYPERVISOR_GUEST=y
 CONFIG_PARAVIRT=y
@@ -40,8 +41,6 @@ CONFIG_X86_CHECK_BIOS_CORRUPTION=y
 CONFIG_EFI=y
 CONFIG_EFI_STUB=y
 CONFIG_HZ_1000=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
 # CONFIG_MITIGATION_RETHUNK is not set
 CONFIG_HIBERNATION=y
 CONFIG_PM_DEBUG=y
@@ -64,9 +63,7 @@ CONFIG_BINFMT_MISC=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_NET=y
 CONFIG_PACKET=y
-CONFIG_UNIX=y
 CONFIG_XFRM_USER=y
-CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 CONFIG_IP_ADVANCED_ROUTER=y
 CONFIG_IP_MULTIPLE_TABLES=y
@@ -138,6 +135,7 @@ CONFIG_CONNECTOR=y
 CONFIG_EFI_CAPSULE_LOADER=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_VIRTIO_BLK=y
+# CONFIG_INTEL_MEI is not set
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_DEV_SR=y
 CONFIG_CHR_DEV_SG=y
@@ -211,7 +209,6 @@ CONFIG_SND_HDA_INTEL=y
 CONFIG_SND_HDA_HWDEP=y
 CONFIG_HIDRAW=y
 CONFIG_HID_GYRATION=y
-CONFIG_LOGITECH_FF=y
 CONFIG_HID_NTRIG=y
 CONFIG_HID_PANTHERLORD=y
 CONFIG_PANTHERLORD_FF=y
@@ -242,7 +239,6 @@ CONFIG_EXT4_FS_POSIX_ACL=y
 CONFIG_EXT4_FS_SECURITY=y
 CONFIG_QUOTA=y
 CONFIG_QUOTA_NETLINK_INTERFACE=y
-# CONFIG_PRINT_QUOTA_WARNING is not set
 CONFIG_QFMT_V2=y
 CONFIG_AUTOFS_FS=y
 CONFIG_ISO9660_FS=y
@@ -267,19 +263,15 @@ CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_FRAME_WARN=1024
 CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_WX=y
 CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_SCHED_DEBUG is not set
 CONFIG_SCHEDSTATS=y
 CONFIG_BLK_DEV_IO_TRACE=y
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 CONFIG_EARLY_PRINTK_DBGP=y
 CONFIG_DEBUG_BOOT_PARAMS=y
-CONFIG_UNWINDER_FRAME_POINTER=y
 CONFIG_DEBUG_ENTRY=y
-# CONFIG_64BIT is not set
+CONFIG_UNWINDER_FRAME_POINTER=y
-- 
2.45.2


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

* [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
  2025-05-05 11:09 ` [PATCH 01/15] x86/kconfig/64: Refresh defconfig Ingo Molnar
  2025-05-05 11:09 ` [PATCH 02/15] x86/kconfig/32: " Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 04/15] x86/kbuild: Introduce the 'x86_32' subarchitecture Ingo Molnar
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

Editing the defconfigs with shell filename completion is unnecessarily
hard due to bad naming: if one remembers 'arch/x86/config/defconfig',
it won't lead to the right files, because the defconfigs are
prefixed with $(ARCH)_.

Under the principle of 'higher order names should go first', prefix
them with 'defconfig' and postfix them with .$(ARCH), and thus make
all x86 configs match the arch/x86/config/defconfig.* pattern.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst | 2 +-
 arch/x86/Makefile                                                | 6 +++---
 arch/x86/configs/{i386_defconfig => defconfig.i386}              | 0
 arch/x86/configs/{x86_64_defconfig => defconfig.x86_64}          | 0
 drivers/gpu/drm/ci/build.yml                                     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst b/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
index 03c55151346c..bcd2bdf6c076 100644
--- a/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
+++ b/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
@@ -426,7 +426,7 @@ machine; if you want to compile the kernel on another system, check
   Look out for a line starting with '# using defaults found in'. It should be
   followed by a path to a file in '/boot/' that contains the release identifier
   of your currently working kernel. If the line instead continues with something
-  like 'arch/x86/configs/x86_64_defconfig', then the build infra failed to find
+  like 'arch/x86/configs/defconfig.x86_64', then the build infra failed to find
   the .config file for your running kernel -- in which case you have to put one
   there manually, as explained in the reference section.
 
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 594723005d95..bae2c7bbb8db 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -4,12 +4,12 @@
 # select defconfig based on actual architecture
 ifeq ($(ARCH),x86)
   ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)
-        KBUILD_DEFCONFIG := i386_defconfig
+        KBUILD_DEFCONFIG := defconfig.i386
   else
-        KBUILD_DEFCONFIG := x86_64_defconfig
+        KBUILD_DEFCONFIG := defconfig.x86_64
   endif
 else
-        KBUILD_DEFCONFIG := $(ARCH)_defconfig
+        KBUILD_DEFCONFIG := defconfig.$(ARCH)
 endif
 
 ifdef CONFIG_CC_IS_GCC
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/defconfig.i386
similarity index 100%
rename from arch/x86/configs/i386_defconfig
rename to arch/x86/configs/defconfig.i386
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/defconfig.x86_64
similarity index 100%
rename from arch/x86/configs/x86_64_defconfig
rename to arch/x86/configs/defconfig.x86_64
diff --git a/drivers/gpu/drm/ci/build.yml b/drivers/gpu/drm/ci/build.yml
index 274f118533a7..2e0ce38d73cd 100644
--- a/drivers/gpu/drm/ci/build.yml
+++ b/drivers/gpu/drm/ci/build.yml
@@ -35,7 +35,7 @@
     - .build
     - .use-debian/x86_64_build
   variables:
-    DEFCONFIG: "arch/x86/configs/x86_64_defconfig"
+    DEFCONFIG: "arch/x86/configs/defconfig.x86_64"
     KERNEL_IMAGE_NAME: "bzImage"
     KERNEL_ARCH: "x86_64"
 
-- 
2.45.2


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

* [PATCH 04/15] x86/kbuild: Introduce the 'x86_32' subarchitecture
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (2 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386 Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 05/15] x86/kbuild: Remove ancient 'arch/i386/' and 'arch/x86_64/' directory removal 'archclean' target Ingo Molnar
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

These days the canonical counterpart to the x86_64 architecture
is the x86_32 architecture - except our Makefiles don't accept it
as an ARCH target.

Make it so.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 Makefile                                              |  7 +++++--
 arch/x86/Kconfig                                      |  2 +-
 arch/x86/Makefile                                     | 10 +++++++---
 arch/x86/configs/{defconfig.i386 => defconfig.x86_32} |  0
 tools/scripts/Makefile.arch                           |  7 +++++--
 5 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index b29cc321ffd9..84a4912f3343 100644
--- a/Makefile
+++ b/Makefile
@@ -407,10 +407,13 @@ UTS_MACHINE 	:= $(ARCH)
 SRCARCH 	:= $(ARCH)
 
 # Additional ARCH settings for x86
-ifeq ($(ARCH),i386)
+ifeq ($(ARCH),x86_64)
         SRCARCH := x86
 endif
-ifeq ($(ARCH),x86_64)
+ifeq ($(ARCH),x86_32)
+        SRCARCH := x86
+endif
+ifeq ($(ARCH),i386)
         SRCARCH := x86
 endif
 
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 4b9f378e05f6..3282638072b9 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2,7 +2,7 @@
 # Select 32 or 64 bit
 config 64BIT
 	bool "64-bit kernel" if "$(ARCH)" = "x86"
-	default "$(ARCH)" != "i386"
+	default "$(ARCH)" != "i386" && "$(ARCH)" != "x86_32"
 	help
 	  Say yes to build a 64-bit kernel - formerly known as x86_64
 	  Say no to build a 32-bit kernel - formerly known as i386
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index bae2c7bbb8db..fb4f0f15d1df 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -1,15 +1,19 @@
 # SPDX-License-Identifier: GPL-2.0
-# Unified Makefile for i386 and x86_64
+# Unified Makefile for x86_64 and x86_32
 
-# select defconfig based on actual architecture
+# When in doubt, select defconfig based on host architecture:
 ifeq ($(ARCH),x86)
   ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)
-        KBUILD_DEFCONFIG := defconfig.i386
+        KBUILD_DEFCONFIG := defconfig.x86_32
   else
         KBUILD_DEFCONFIG := defconfig.x86_64
   endif
 else
+  ifeq ($(ARCH),i386)
+        KBUILD_DEFCONFIG := defconfig.x86_32
+  else
         KBUILD_DEFCONFIG := defconfig.$(ARCH)
+  endif
 endif
 
 ifdef CONFIG_CC_IS_GCC
diff --git a/arch/x86/configs/defconfig.i386 b/arch/x86/configs/defconfig.x86_32
similarity index 100%
rename from arch/x86/configs/defconfig.i386
rename to arch/x86/configs/defconfig.x86_32
diff --git a/tools/scripts/Makefile.arch b/tools/scripts/Makefile.arch
index eabfe9f411d9..9aedca27ac9a 100644
--- a/tools/scripts/Makefile.arch
+++ b/tools/scripts/Makefile.arch
@@ -14,10 +14,13 @@ endif
 SRCARCH := $(ARCH)
 
 # Additional ARCH settings for x86
-ifeq ($(ARCH),i386)
+ifeq ($(ARCH),x86_64)
         SRCARCH := x86
 endif
-ifeq ($(ARCH),x86_64)
+ifeq ($(ARCH),x86_32)
+        SRCARCH := x86
+endif
+ifeq ($(ARCH),i386)
         SRCARCH := x86
 endif
 
-- 
2.45.2


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

* [PATCH 05/15] x86/kbuild: Remove ancient 'arch/i386/' and 'arch/x86_64/' directory removal 'archclean' target
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (3 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 04/15] x86/kbuild: Introduce the 'x86_32' subarchitecture Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 06/15] x86/tools: insn_decoder_test.c: Emit standard build success messages Ingo Molnar
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

We have to go back 17 years into Git history, to kernels that won't
even build or boot with modern build environments, to come across
the obsolete arch/i386/ and arch/x86_64/ directories.

Remove some of their last functional residuals in the 'archclean' target.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/Makefile | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index fb4f0f15d1df..6348782e1be0 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -352,10 +352,6 @@ $(orc_hash_h): $(srctree)/arch/x86/include/asm/orc_types.h $(orc_hash_sh) FORCE
 archprepare: $(orc_hash_h)
 endif
 
-archclean:
-	$(Q)rm -rf $(objtree)/arch/i386
-	$(Q)rm -rf $(objtree)/arch/x86_64
-
 define archhelp
   echo  '* bzImage		- Compressed kernel image (arch/x86/boot/bzImage)'
   echo  '  install		- Install kernel using (your) ~/bin/$(INSTALLKERNEL) or'
-- 
2.45.2


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

* [PATCH 06/15] x86/tools: insn_decoder_test.c: Emit standard build success messages
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (4 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 05/15] x86/kbuild: Remove ancient 'arch/i386/' and 'arch/x86_64/' directory removal 'archclean' target Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 07/15] x86/tools: insn_sanity.c: " Ingo Molnar
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

The standard 'success' output of insn_decoder_test spams build logs with:

  arch/x86/tools/insn_decoder_test: success: Decoded and checked 8258521 instructions

Prefix the message with the standard '  ' (two spaces) used by kbuild to denote
regular build messages, making it easier for tools to filter out
warnings and errors.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/tools/insn_decoder_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/tools/insn_decoder_test.c b/arch/x86/tools/insn_decoder_test.c
index 08cd913cbd4e..8bf15c4aefa9 100644
--- a/arch/x86/tools/insn_decoder_test.c
+++ b/arch/x86/tools/insn_decoder_test.c
@@ -167,7 +167,7 @@ int main(int argc, char **argv)
 		pr_warn("Decoded and checked %d instructions with %d "
 			"failures\n", insns, warnings);
 	else
-		fprintf(stdout, "%s: success: Decoded and checked %d"
+		fprintf(stdout, "  %s: success: Decoded and checked %d"
 			" instructions\n", prog, insns);
 	return 0;
 }
-- 
2.45.2


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

* [PATCH 07/15] x86/tools: insn_sanity.c: Emit standard build success messages
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (5 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 06/15] x86/tools: insn_decoder_test.c: Emit standard build success messages Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 08/15] x86/kconfig/64: Enable the KVM host in the defconfig Ingo Molnar
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

The standard 'success' output of insn_decoder_test spams build logs with:

  arch/x86/tools/insn_sanity: Success: decoded and checked 1000000 random instructions with 0 errors (seed:0x2e263877)

Prefix the message with the standard '  ' (two spaces) used by kbuild
to denote regular build messages, making it easier for tools to
filter out warnings and errors.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/tools/insn_sanity.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/tools/insn_sanity.c b/arch/x86/tools/insn_sanity.c
index 213f35f94feb..e743f0ea01ee 100644
--- a/arch/x86/tools/insn_sanity.c
+++ b/arch/x86/tools/insn_sanity.c
@@ -253,9 +253,9 @@ int main(int argc, char **argv)
 	}
 
 	fprintf((errors) ? stderr : stdout,
-		"%s: %s: decoded and checked %d %s instructions with %d errors (seed:0x%x)\n",
+		"  %s: %s: Decoded and checked %d %s instructions with %d errors (seed:0x%x)\n",
 		prog,
-		(errors) ? "Failure" : "Success",
+		(errors) ? "failure" : "success",
 		insns,
 		(input_file) ? "given" : "random",
 		errors,
-- 
2.45.2


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

* [PATCH 08/15] x86/kconfig/64: Enable the KVM host in the defconfig
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (6 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 07/15] x86/tools: insn_sanity.c: " Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX Ingo Molnar
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

These days all distros enable KVM, and since the x86 defconfig
aims to be a distro kernel work-alike with fewer drivers and
a shorter build time, enable the KVM host in the defconfig too.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/configs/defconfig.x86_64 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
index 7d7310cdf8b0..156e9490e29b 100644
--- a/arch/x86/configs/defconfig.x86_64
+++ b/arch/x86/configs/defconfig.x86_64
@@ -50,6 +50,11 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
 CONFIG_X86_ACPI_CPUFREQ=y
 CONFIG_IA32_EMULATION=y
+CONFIG_KVM=y
+CONFIG_KVM_INTEL=y
+CONFIG_KVM_AMD=y
+CONFIG_KVM_XEN=y
+CONFIG_KVM_MAX_NR_VCPUS=4096
 CONFIG_KPROBES=y
 CONFIG_JUMP_LABEL=y
 CONFIG_MODULES=y
-- 
2.45.2


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

* [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (7 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 08/15] x86/kconfig/64: Enable the KVM host in the defconfig Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:55   ` Kirill A. Shutemov
                     ` (2 more replies)
  2025-05-05 11:09 ` [PATCH 10/15] x86/kconfig/64: Enable BPF support in the defconfig Ingo Molnar
                   ` (6 subsequent siblings)
  15 siblings, 3 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	Carlos Bilbao, David Woodhouse, Elena Reshetova, Fei Li,
	Jan Kiszka, Juergen Gross, Kirill A . Shutemov, Masahiro Yamada,
	Michal Marek, Paolo Bonzini, Sean Christopherson,
	Stefano Stabellini, Vitaly Kuznetsov

Since the x86 defconfig aims to be a distro kernel work-alike with
fewer drivers and a shorter build time, refresh all the virtualization
guest Kconfig features, enabling paravirt spinlocks, and
enabling the guest support code for the following guests:

 - Xen
 - Xen_PVH
 - Jailhouse
 - ACRN
 - Intel TDX

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Carlos Bilbao <carlos.bilbao@kernel.org>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Cc: Fei Li <fei1.li@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 arch/x86/configs/defconfig.x86_64 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
index 156e9490e29b..514f8fdc2102 100644
--- a/arch/x86/configs/defconfig.x86_64
+++ b/arch/x86/configs/defconfig.x86_64
@@ -31,6 +31,12 @@ CONFIG_KEXEC=y
 CONFIG_SMP=y
 CONFIG_HYPERVISOR_GUEST=y
 CONFIG_PARAVIRT=y
+CONFIG_PARAVIRT_SPINLOCKS=y
+CONFIG_XEN=y
+CONFIG_XEN_PVH=y
+CONFIG_JAILHOUSE_GUEST=y
+CONFIG_ACRN_GUEST=y
+CONFIG_INTEL_TDX_GUEST=y
 CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
 CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=y
-- 
2.45.2


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

* [PATCH 10/15] x86/kconfig/64: Enable BPF support in the defconfig
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (8 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 11/15] x86/kconfig/64: Enable popular MM options " Ingo Molnar
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek,
	Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko

Since the x86 defconfig aims to be a distro kernel work-alike with
fewer drivers and a shorter build time, enable BPF support, which
is enabled in all major Linux distributions.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Andrii Nakryiko <andrii@kernel.org>
---
 arch/x86/configs/defconfig.x86_64 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
index 514f8fdc2102..9961742fe78c 100644
--- a/arch/x86/configs/defconfig.x86_64
+++ b/arch/x86/configs/defconfig.x86_64
@@ -4,6 +4,12 @@ CONFIG_POSIX_MQUEUE=y
 CONFIG_AUDIT=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BPF_SYSCALL=y
+CONFIG_BPF_JIT=y
+CONFIG_BPF_JIT_ALWAYS_ON=y
+CONFIG_BPF_PRELOAD=y
+CONFIG_BPF_PRELOAD_UMD=y
+CONFIG_BPF_LSM=y
 CONFIG_PREEMPT_VOLUNTARY=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_TASKSTATS=y
@@ -22,6 +28,7 @@ CONFIG_CPUSETS=y
 CONFIG_CGROUP_DEVICE=y
 CONFIG_CGROUP_CPUACCT=y
 CONFIG_CGROUP_PERF=y
+CONFIG_CGROUP_BPF=y
 CONFIG_CGROUP_MISC=y
 CONFIG_CGROUP_DEBUG=y
 CONFIG_BLK_DEV_INITRD=y
-- 
2.45.2


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

* [PATCH 11/15] x86/kconfig/64: Enable popular MM options in the defconfig
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (9 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 10/15] x86/kconfig/64: Enable BPF support in the defconfig Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 12/15] x86/kconfig/64: Enable popular kernel debugging " Ingo Molnar
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Andrew Morton, Ard Biesheuvel,
	Arnd Bergmann, David Woodhouse, Masahiro Yamada, Michal Marek,
	Rik van Riel

Since the x86 defconfig aims to be a distro kernel work-alike with
fewer drivers and a shorter build time, enable the following
MM options that are typically enabled on major Linux distributions:

- ACPI_HOTPLUG_MEMORY, ZSWAP, SLAB hardening, MEMORY_HOTPLUG,
  MEMORY_HOTREMOVE, PAGE_REPORTING, KSM, higher DEFAULT_MMAP_MIN_ADDR,
  MEMORY_FAILURE, HWPOISON_INJECT, TRANSPARENT_HUGEPAGE,
  TRANSPARENT_HUGEPAGE_MADVISE, IDLE_PAGE_TRACKING, ZONE_DEVICE
  DEVICE_PRIVATE, ANON_VMA_NAME, USERFAULTFD, multi-gen LRU.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
---
 arch/x86/configs/defconfig.x86_64 | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
index 9961742fe78c..4f2fab465196 100644
--- a/arch/x86/configs/defconfig.x86_64
+++ b/arch/x86/configs/defconfig.x86_64
@@ -58,6 +58,7 @@ CONFIG_HIBERNATION=y
 CONFIG_PM_DEBUG=y
 CONFIG_PM_TRACE_RTC=y
 CONFIG_ACPI_DOCK=y
+CONFIG_ACPI_HOTPLUG_MEMORY=y
 CONFIG_ACPI_BGRT=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
@@ -77,7 +78,26 @@ CONFIG_BLK_CGROUP_IOLATENCY=y
 CONFIG_BLK_CGROUP_IOCOST=y
 CONFIG_BLK_CGROUP_IOPRIO=y
 CONFIG_BINFMT_MISC=y
+CONFIG_ZSWAP=y
+CONFIG_SLAB_FREELIST_RANDOM=y
+CONFIG_SLAB_FREELIST_HARDENED=y
 # CONFIG_COMPAT_BRK is not set
+CONFIG_MEMORY_HOTPLUG=y
+CONFIG_MEMORY_HOTREMOVE=y
+CONFIG_PAGE_REPORTING=y
+CONFIG_KSM=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
+CONFIG_MEMORY_FAILURE=y
+CONFIG_HWPOISON_INJECT=y
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
+CONFIG_IDLE_PAGE_TRACKING=y
+CONFIG_ZONE_DEVICE=y
+CONFIG_DEVICE_PRIVATE=y
+CONFIG_ANON_VMA_NAME=y
+CONFIG_USERFAULTFD=y
+CONFIG_LRU_GEN=y
+CONFIG_LRU_GEN_ENABLED=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_XFRM_USER=y
-- 
2.45.2


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

* [PATCH 12/15] x86/kconfig/64: Enable popular kernel debugging options in the defconfig
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (10 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 11/15] x86/kconfig/64: Enable popular MM options " Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 12:56   ` Sam James
  2025-05-05 23:30   ` Ivan Shapovalov
  2025-05-05 11:09 ` [PATCH 13/15] x86/kconfig/64: Enable popular scheduler, cgroups and namespaces " Ingo Molnar
                   ` (3 subsequent siblings)
  15 siblings, 2 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

Since the x86 defconfig aims to be a distro kernel work-alike with
fewer drivers and a shorter build time, enable a handful of
kernel debugging options that are typically enabled on major Linux
distributions.

The options enabled is a superset of the latest Ubuntu and Fedora
kernel debugging configs, using Ubuntu's config-6.11.0-24-generic
file, Fedora's kernel-x86_64-fedora.config and RHEL's
kernel-x86_64-rhel.config from kernel-ark.git.

Notable features enabled:

 - CONFIG_UBSAN=y:

     Despite the runtime overhead, UBSAN is actively enabled
     in all 3 major Linux distros I checked, so we want it
     enabled in the defconfig as well - to better see the
     consequences.

 - CONFIG_DEBUG_SHIRQ=y:

     Fedora/RHEL have this enabled, while Ubuntu has it disabled.

 - CONFIG_DEBUG_LIST=y:

     Fedora/RHEL have it enabled, while Ubuntu has it disabled.

 - CONFIG_FUNCTION_PROFILER=y:

     This is enabled on all distros I checked as well.

DEBUGINFO is still disabled, despite enabled in all Linux distros,
because the ~10x .o bloat is still just so painful on anything
but the most powerful build boxes.

Note that while the following features seemingly get removed from
the defconfig :

  - CONFIG_BLK_DEV_INITRD=y
  - CONFIG_KPROBES=y
  - CONFIG_MAGIC_SYSRQ=y

they are actually still enabled in the actual .config, because they
get selected by other options indirectly.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/configs/defconfig.x86_64 | 46 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 43 insertions(+), 3 deletions(-)

diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
index 4f2fab465196..3d585c33016b 100644
--- a/arch/x86/configs/defconfig.x86_64
+++ b/arch/x86/configs/defconfig.x86_64
@@ -31,7 +31,6 @@ CONFIG_CGROUP_PERF=y
 CONFIG_CGROUP_BPF=y
 CONFIG_CGROUP_MISC=y
 CONFIG_CGROUP_DEBUG=y
-CONFIG_BLK_DEV_INITRD=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_PROFILING=y
 CONFIG_KEXEC=y
@@ -69,7 +68,6 @@ CONFIG_KVM_INTEL=y
 CONFIG_KVM_AMD=y
 CONFIG_KVM_XEN=y
 CONFIG_KVM_MAX_NR_VCPUS=4096
-CONFIG_KPROBES=y
 CONFIG_JUMP_LABEL=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
@@ -298,13 +296,55 @@ CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_PRINTK_TIME=y
+CONFIG_BOOT_PRINTK_DELAY=y
+CONFIG_DYNAMIC_DEBUG=y
 CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_HEADERS_INSTALL=y
+CONFIG_DEBUG_SECTION_MISMATCH=y
+CONFIG_KGDB=y
+CONFIG_KGDB_TESTS=y
+CONFIG_KGDB_LOW_LEVEL_TRAP=y
+CONFIG_KGDB_KDB=y
+CONFIG_KDB_KEYBOARD=y
+CONFIG_UBSAN=y
+CONFIG_UBSAN_SHIFT=y
+CONFIG_PAGE_OWNER=y
+CONFIG_PAGE_POISONING=y
 CONFIG_DEBUG_WX=y
+CONFIG_PER_VMA_LOCK_STATS=y
 CONFIG_DEBUG_STACK_USAGE=y
+CONFIG_SCHED_STACK_END_CHECK=y
+CONFIG_KFENCE=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_PANIC_ON_OOPS=y
+CONFIG_HARDLOCKUP_DETECTOR=y
+CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
+CONFIG_WQ_CPU_INTENSIVE_REPORT=y
 CONFIG_SCHEDSTATS=y
+CONFIG_NMI_CHECK_CPU=y
+CONFIG_DEBUG_LIST=y
+CONFIG_RCU_CPU_STALL_CPUTIME=y
+CONFIG_BOOTTIME_TRACING=y
+CONFIG_FUNCTION_GRAPH_RETVAL=y
+CONFIG_FPROBE=y
+CONFIG_FUNCTION_PROFILER=y
+CONFIG_STACK_TRACER=y
+CONFIG_SCHED_TRACER=y
+CONFIG_HWLAT_TRACER=y
+CONFIG_TIMERLAT_TRACER=y
+CONFIG_MMIOTRACE=y
+CONFIG_FTRACE_SYSCALLS=y
 CONFIG_BLK_DEV_IO_TRACE=y
+CONFIG_USER_EVENTS=y
+CONFIG_HIST_TRIGGERS=y
+CONFIG_TRACE_EVENT_INJECT=y
+CONFIG_RV=y
+CONFIG_RV_MON_WWNR=y
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 CONFIG_EARLY_PRINTK_DBGP=y
+CONFIG_EARLY_PRINTK_USB_XDBC=y
 CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_DEBUG_ENTRY=y
+CONFIG_FUNCTION_ERROR_INJECTION=y
+CONFIG_MEMTEST=y
-- 
2.45.2


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

* [PATCH 13/15] x86/kconfig/64: Enable popular scheduler, cgroups and namespaces options in the defconfig
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (11 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 12/15] x86/kconfig/64: Enable popular kernel debugging " Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 14/15] x86/kconfig/64: Enable popular generic kernel " Ingo Molnar
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

Since the x86 defconfig aims to be a distro kernel work-alike with
fewer drivers and a shorter build time, enable a handful of
popular scheduler and cgroups options that are typically enabled
on major Linux distributions.

The options enabled is a superset of the latest Ubuntu and Fedora
kernel debugging configs, using Ubuntu's config-6.11.0-24-generic
file, Fedora's kernel-x86_64-fedora.config and RHEL's
kernel-x86_64-rhel.config from kernel-ark.git.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/configs/defconfig.x86_64 | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
index 3d585c33016b..09e9a8823dc1 100644
--- a/arch/x86/configs/defconfig.x86_64
+++ b/arch/x86/configs/defconfig.x86_64
@@ -2,6 +2,7 @@ CONFIG_WERROR=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_AUDIT=y
+# CONFIG_CONTEXT_TRACKING_USER_FORCE is not set
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_BPF_SYSCALL=y
@@ -11,26 +12,45 @@ CONFIG_BPF_PRELOAD=y
 CONFIG_BPF_PRELOAD_UMD=y
 CONFIG_BPF_LSM=y
 CONFIG_PREEMPT_VOLUNTARY=y
+CONFIG_SCHED_CORE=y
+CONFIG_VIRT_CPU_ACCOUNTING_GEN=y
+CONFIG_IRQ_TIME_ACCOUNTING=y
 CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
 CONFIG_TASK_XACCT=y
 CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_PSI=y
+CONFIG_PSI_DEFAULT_DISABLED=y
 CONFIG_LOG_BUF_SHIFT=18
-CONFIG_CGROUPS=y
+CONFIG_PRINTK_INDEX=y
+CONFIG_UCLAMP_TASK=y
+CONFIG_NUMA_BALANCING=y
+CONFIG_MEMCG=y
+CONFIG_MEMCG_V1=y
 CONFIG_BLK_CGROUP=y
-CONFIG_CGROUP_SCHED=y
+CONFIG_CFS_BANDWIDTH=y
+CONFIG_UCLAMP_TASK_GROUP=y
 CONFIG_CGROUP_PIDS=y
 CONFIG_CGROUP_RDMA=y
+CONFIG_CGROUP_DMEM=y
 CONFIG_CGROUP_FREEZER=y
 CONFIG_CGROUP_HUGETLB=y
 CONFIG_CPUSETS=y
+CONFIG_CPUSETS_V1=y
 CONFIG_CGROUP_DEVICE=y
 CONFIG_CGROUP_CPUACCT=y
 CONFIG_CGROUP_PERF=y
 CONFIG_CGROUP_BPF=y
 CONFIG_CGROUP_MISC=y
 CONFIG_CGROUP_DEBUG=y
+CONFIG_NAMESPACES=y
+CONFIG_USER_NS=y
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_SCHED_AUTOGROUP=y
+CONFIG_SYSFS_SYSCALL=y
+CONFIG_EXPERT=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_PROFILING=y
 CONFIG_KEXEC=y
@@ -298,7 +318,6 @@ CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_PRINTK_TIME=y
 CONFIG_BOOT_PRINTK_DELAY=y
 CONFIG_DYNAMIC_DEBUG=y
-CONFIG_DEBUG_KERNEL=y
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_HEADERS_INSTALL=y
 CONFIG_DEBUG_SECTION_MISMATCH=y
-- 
2.45.2


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

* [PATCH 14/15] x86/kconfig/64: Enable popular generic kernel options in the defconfig
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (12 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 13/15] x86/kconfig/64: Enable popular scheduler, cgroups and namespaces " Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-05 11:09 ` [PATCH 15/15] x86/kconfig/32: Synchronize the x86-32 defconfig to the x86-64 defconfig Ingo Molnar
  2025-05-06  7:45 ` [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Peter Zijlstra
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

This is the last set of options picked up from major Linux distributions:

 - CONFIG_UAPI_HEADER_TEST=y

    x86 developers frequently modify UAPI headers during development,
    make sure they get tested.

 - CONFIG_WATCH_QUEUE=y

    All major distros have general notification queue support enabled.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/configs/defconfig.x86_64 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
index 09e9a8823dc1..386e55d715c3 100644
--- a/arch/x86/configs/defconfig.x86_64
+++ b/arch/x86/configs/defconfig.x86_64
@@ -1,6 +1,8 @@
 CONFIG_WERROR=y
+CONFIG_UAPI_HEADER_TEST=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_WATCH_QUEUE=y
 CONFIG_AUDIT=y
 # CONFIG_CONTEXT_TRACKING_USER_FORCE is not set
 CONFIG_NO_HZ=y
-- 
2.45.2


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

* [PATCH 15/15] x86/kconfig/32: Synchronize the x86-32 defconfig to the x86-64 defconfig
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (13 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 14/15] x86/kconfig/64: Enable popular generic kernel " Ingo Molnar
@ 2025-05-05 11:09 ` Ingo Molnar
  2025-05-06  7:45 ` [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Peter Zijlstra
  15 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-05 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek

Just a mechanic synchronization of kernel options enabled: nobody
really develops kernel features on x86-32 anymore, so make sure the
defconfig is roughly equivalent to the 64-bit one, so that testing
doesn't cover some combination that nobody cares about.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 arch/x86/configs/defconfig.x86_32 | 116 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 110 insertions(+), 6 deletions(-)

diff --git a/arch/x86/configs/defconfig.x86_32 b/arch/x86/configs/defconfig.x86_32
index e983f1db22dd..26a0fc03d642 100644
--- a/arch/x86/configs/defconfig.x86_32
+++ b/arch/x86/configs/defconfig.x86_32
@@ -1,37 +1,63 @@
 CONFIG_WERROR=y
+CONFIG_UAPI_HEADER_TEST=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_WATCH_QUEUE=y
 CONFIG_USELIB=y
 CONFIG_AUDIT=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BPF_SYSCALL=y
+CONFIG_BPF_JIT=y
+CONFIG_BPF_JIT_ALWAYS_ON=y
+CONFIG_BPF_PRELOAD=y
+CONFIG_BPF_PRELOAD_UMD=y
+CONFIG_BPF_LSM=y
 CONFIG_PREEMPT_VOLUNTARY=y
+CONFIG_SCHED_CORE=y
+CONFIG_IRQ_TIME_ACCOUNTING=y
 CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
 CONFIG_TASK_XACCT=y
 CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_PSI=y
+CONFIG_PSI_DEFAULT_DISABLED=y
 CONFIG_LOG_BUF_SHIFT=18
-CONFIG_CGROUPS=y
+CONFIG_PRINTK_INDEX=y
+CONFIG_UCLAMP_TASK=y
+CONFIG_MEMCG=y
+CONFIG_MEMCG_V1=y
 CONFIG_BLK_CGROUP=y
-CONFIG_CGROUP_SCHED=y
+CONFIG_CFS_BANDWIDTH=y
+CONFIG_UCLAMP_TASK_GROUP=y
 CONFIG_CGROUP_PIDS=y
 CONFIG_CGROUP_RDMA=y
+CONFIG_CGROUP_DMEM=y
 CONFIG_CGROUP_FREEZER=y
 CONFIG_CGROUP_HUGETLB=y
 CONFIG_CPUSETS=y
+CONFIG_CPUSETS_V1=y
 CONFIG_CGROUP_DEVICE=y
 CONFIG_CGROUP_CPUACCT=y
 CONFIG_CGROUP_PERF=y
+CONFIG_CGROUP_BPF=y
 CONFIG_CGROUP_MISC=y
 CONFIG_CGROUP_DEBUG=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_NAMESPACES=y
+CONFIG_USER_NS=y
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_SCHED_AUTOGROUP=y
+CONFIG_SYSFS_SYSCALL=y
+CONFIG_EXPERT=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_PROFILING=y
 CONFIG_KEXEC=y
 CONFIG_SMP=y
 CONFIG_HYPERVISOR_GUEST=y
 CONFIG_PARAVIRT=y
+CONFIG_PARAVIRT_SPINLOCKS=y
 CONFIG_NR_CPUS=8
 CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
 CONFIG_X86_MSR=y
@@ -50,7 +76,11 @@ CONFIG_ACPI_BGRT=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
 CONFIG_X86_ACPI_CPUFREQ=y
-CONFIG_KPROBES=y
+CONFIG_KVM=y
+CONFIG_KVM_INTEL=y
+CONFIG_KVM_AMD=y
+CONFIG_KVM_XEN=y
+CONFIG_KVM_MAX_NR_VCPUS=4096
 CONFIG_JUMP_LABEL=y
 CONFIG_COMPAT_32BIT_TIME=y
 CONFIG_MODULES=y
@@ -60,7 +90,23 @@ CONFIG_BLK_CGROUP_IOLATENCY=y
 CONFIG_BLK_CGROUP_IOCOST=y
 CONFIG_BLK_CGROUP_IOPRIO=y
 CONFIG_BINFMT_MISC=y
+CONFIG_ZSWAP=y
+CONFIG_SLAB_FREELIST_RANDOM=y
+CONFIG_SLAB_FREELIST_HARDENED=y
+# CONFIG_SLAB_BUCKETS is not set
 # CONFIG_COMPAT_BRK is not set
+CONFIG_PAGE_REPORTING=y
+CONFIG_KSM=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
+CONFIG_MEMORY_FAILURE=y
+CONFIG_HWPOISON_INJECT=y
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
+CONFIG_IDLE_PAGE_TRACKING=y
+CONFIG_ANON_VMA_NAME=y
+CONFIG_USERFAULTFD=y
+CONFIG_LRU_GEN=y
+CONFIG_LRU_GEN_ENABLED=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_XFRM_USER=y
@@ -120,6 +166,7 @@ CONFIG_CFG80211=y
 CONFIG_MAC80211=y
 CONFIG_MAC80211_LEDS=y
 CONFIG_RFKILL=y
+CONFIG_RFKILL_INPUT=y
 CONFIG_NET_9P=y
 CONFIG_NET_9P_VIRTIO=y
 CONFIG_PCI=y
@@ -189,6 +236,8 @@ CONFIG_SERIAL_8250_RSA=y
 CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_INTEL is not set
+# CONFIG_HW_RANDOM_AMD is not set
 CONFIG_NVRAM=y
 CONFIG_HPET=y
 # CONFIG_HPET_MMAP is not set
@@ -208,7 +257,19 @@ CONFIG_SND_SEQ_DUMMY=y
 CONFIG_SND_HDA_INTEL=y
 CONFIG_SND_HDA_HWDEP=y
 CONFIG_HIDRAW=y
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_EZKEY=y
 CONFIG_HID_GYRATION=y
+CONFIG_HID_ITE=y
+CONFIG_HID_KENSINGTON=y
+CONFIG_HID_REDRAGON=y
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
 CONFIG_HID_NTRIG=y
 CONFIG_HID_PANTHERLORD=y
 CONFIG_PANTHERLORD_FF=y
@@ -234,6 +295,8 @@ CONFIG_DMADEVICES=y
 CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO_INPUT=y
 CONFIG_EEEPC_LAPTOP=y
+CONFIG_INTEL_IOMMU=y
+# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
 CONFIG_EXT4_FS=y
 CONFIG_EXT4_FS_POSIX_ACL=y
 CONFIG_EXT4_FS_SECURITY=y
@@ -264,14 +327,55 @@ CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_PRINTK_TIME=y
-CONFIG_DEBUG_KERNEL=y
+CONFIG_BOOT_PRINTK_DELAY=y
+CONFIG_DYNAMIC_DEBUG=y
 CONFIG_FRAME_WARN=1024
-CONFIG_MAGIC_SYSRQ=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_HEADERS_INSTALL=y
+CONFIG_DEBUG_SECTION_MISMATCH=y
+CONFIG_KGDB=y
+CONFIG_KGDB_TESTS=y
+CONFIG_KGDB_LOW_LEVEL_TRAP=y
+CONFIG_KGDB_KDB=y
+CONFIG_KDB_KEYBOARD=y
+CONFIG_UBSAN=y
+CONFIG_UBSAN_SHIFT=y
+CONFIG_PAGE_OWNER=y
+CONFIG_PAGE_POISONING=y
 CONFIG_DEBUG_STACK_USAGE=y
+CONFIG_SCHED_STACK_END_CHECK=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_KFENCE=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_PANIC_ON_OOPS=y
+CONFIG_HARDLOCKUP_DETECTOR=y
+CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
+# CONFIG_DETECT_HUNG_TASK is not set
+CONFIG_WQ_CPU_INTENSIVE_REPORT=y
 CONFIG_SCHEDSTATS=y
+CONFIG_NMI_CHECK_CPU=y
+CONFIG_DEBUG_LIST=y
+CONFIG_RCU_CPU_STALL_CPUTIME=y
+CONFIG_BOOTTIME_TRACING=y
+CONFIG_FUNCTION_GRAPH_RETVAL=y
+CONFIG_FUNCTION_PROFILER=y
+CONFIG_STACK_TRACER=y
+CONFIG_SCHED_TRACER=y
+CONFIG_HWLAT_TRACER=y
+CONFIG_TIMERLAT_TRACER=y
+CONFIG_MMIOTRACE=y
+CONFIG_FTRACE_SYSCALLS=y
 CONFIG_BLK_DEV_IO_TRACE=y
+CONFIG_USER_EVENTS=y
+CONFIG_HIST_TRIGGERS=y
+CONFIG_TRACE_EVENT_INJECT=y
+CONFIG_RV=y
+CONFIG_RV_MON_WWNR=y
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 CONFIG_EARLY_PRINTK_DBGP=y
+CONFIG_EARLY_PRINTK_USB_XDBC=y
 CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_DEBUG_ENTRY=y
 CONFIG_UNWINDER_FRAME_POINTER=y
+CONFIG_FUNCTION_ERROR_INJECTION=y
+CONFIG_MEMTEST=y
-- 
2.45.2


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

* Re: [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX
  2025-05-05 11:09 ` [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX Ingo Molnar
@ 2025-05-05 11:55   ` Kirill A. Shutemov
  2025-05-06 13:34   ` Vitaly Kuznetsov
  2025-05-07 19:55   ` [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX Carlos Bilbao
  2 siblings, 0 replies; 29+ messages in thread
From: Kirill A. Shutemov @ 2025-05-05 11:55 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, H . Peter Anvin, Linus Torvalds, Peter Zijlstra,
	Borislav Petkov, Thomas Gleixner, Ard Biesheuvel, Arnd Bergmann,
	Carlos Bilbao, David Woodhouse, Elena Reshetova, Fei Li,
	Jan Kiszka, Juergen Gross, Kirill A . Shutemov, Masahiro Yamada,
	Michal Marek, Paolo Bonzini, Sean Christopherson,
	Stefano Stabellini, Vitaly Kuznetsov

On Mon, May 05, 2025 at 01:09:40PM +0200, Ingo Molnar wrote:
> Since the x86 defconfig aims to be a distro kernel work-alike with
> fewer drivers and a shorter build time, refresh all the virtualization
> guest Kconfig features, enabling paravirt spinlocks, and
> enabling the guest support code for the following guests:
> 
>  - Xen
>  - Xen_PVH
>  - Jailhouse
>  - ACRN
>  - Intel TDX
> 
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Carlos Bilbao <carlos.bilbao@kernel.org>
> Cc: David Woodhouse <dwmw@amazon.co.uk>
> Cc: Elena Reshetova <elena.reshetova@intel.com>
> Cc: Fei Li <fei1.li@intel.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Jan Kiszka <jan.kiszka@siemens.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Sean Christopherson <seanjc@google.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>

Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

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

* Re: [PATCH 12/15] x86/kconfig/64: Enable popular kernel debugging options in the defconfig
  2025-05-05 11:09 ` [PATCH 12/15] x86/kconfig/64: Enable popular kernel debugging " Ingo Molnar
@ 2025-05-05 12:56   ` Sam James
  2025-05-05 23:30   ` Ivan Shapovalov
  1 sibling, 0 replies; 29+ messages in thread
From: Sam James @ 2025-05-05 12:56 UTC (permalink / raw)
  To: mingo
  Cc: ardb, arnd, bp, dwmw, hpa, linux-kernel, michal.lkml, peterz,
	tglx, torvalds, yamada.masahiro, Elena Zannoni

> DEBUGINFO is still disabled, despite enabled in all Linux distros,
> because the ~10x .o bloat is still just so painful on anything
> but the most powerful build boxes.

My hope is that soon, we'll be in a position to have directly-generated
BTF (which should be far quicker than generating tonnes of DWARF) which
should resolve that.

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

* Re: [PATCH 12/15] x86/kconfig/64: Enable popular kernel debugging options in the defconfig
  2025-05-05 11:09 ` [PATCH 12/15] x86/kconfig/64: Enable popular kernel debugging " Ingo Molnar
  2025-05-05 12:56   ` Sam James
@ 2025-05-05 23:30   ` Ivan Shapovalov
  2025-05-06 11:23     ` Ingo Molnar
  1 sibling, 1 reply; 29+ messages in thread
From: Ivan Shapovalov @ 2025-05-05 23:30 UTC (permalink / raw)
  To: Ingo Molnar, linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ard Biesheuvel, Arnd Bergmann, David Woodhouse,
	Masahiro Yamada, Michal Marek

On 2025-05-05 at 13:09 +0200, Ingo Molnar wrote:
> 
>  - CONFIG_DEBUG_LIST=y:
> 
>      Fedora/RHEL have it enabled, while Ubuntu has it disabled.

(Please forgive my potential ignorance.)

If I'm guessing right, the point of CONFIG_DEBUG_LIST being enabled
everywhere is probably more about hardening than debugging, and given
that since 6.6 we have a CONFIG_LIST_HARDENED[1], wouldn't it make more
sense to use that instead?

Or is the point here to exactly follow the typical distro config,
without regard to whether it's actually the optimal thing to do?

[1]: https://lore.kernel.org/all/20230811151847.1594958-3-elver@google.com/

-- 
Ivan Shapovalov / intelfx /

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

* Re: [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups
  2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
                   ` (14 preceding siblings ...)
  2025-05-05 11:09 ` [PATCH 15/15] x86/kconfig/32: Synchronize the x86-32 defconfig to the x86-64 defconfig Ingo Molnar
@ 2025-05-06  7:45 ` Peter Zijlstra
  2025-05-06 11:30   ` Ingo Molnar
  15 siblings, 1 reply; 29+ messages in thread
From: Peter Zijlstra @ 2025-05-06  7:45 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, H . Peter Anvin, Linus Torvalds, Borislav Petkov,
	Thomas Gleixner

On Mon, May 05, 2025 at 01:09:31PM +0200, Ingo Molnar wrote:
> Historically the x86 defconfigs aimed to be distro kernel
> work-alikes with fewer drivers and a substantially shorter
> build time. We regularly ask our contributors to test their
> changes on x86 defconfigs, and we frequently analyze code
> generation on such kernels as well.
> 
> In practice, over the past couple of years this goal has
> diverged from what actual modern Linux distributions do
> these days, and this series aims to correct that divergence.
> 
> Perform a thorough modernization of the x86 defconfigs, and
> apply some cleanups to the x86 build system as well:
> 
>  - Enable various kernel features that the most popular
>    Linux distributions have enabled in their generic
>    kernels these days: KVM host, BPF support, UBSAN, various MM
>    options, debugging options, various scheduler and cgroups
>    options, support for a number of guest OS platforms,
>    and other options.
> 
>  - More specifically, these changes enable a rough superset
>    of the kernel features enabled by Ubuntu, Fedora/RHEL
>    kernels.
> 
>  - Clean up the organization of the defconfig files as well.
> 
>  - Add the ARCH=x86_32 build target
> 
>  - Synchronize the x86_32 defconfig to the x86_64 defconfig:
>    this file is really just a random set of options configured
>    many years ago with no relevance to anything people are
>    using today anymore. Just follow the 64-bit options to the
>    extent possible, to have at least one modern frame of
>    reference.
> 
>  - Clean up a number of kbuild details

One thing I'd been pondering for a while, but have absolutely no
bandwidth for what so ever, is a more fragment based config setup.

Much like we now have defconfig, kvm_guest.config, debug.config
and xen.config etc..

My main 'complain' is more that defconfig is too fat already, and here
you are making it fatter still -- notably, I don't need i915 in most of
the kernels I build (my test machines are all headless).

Could we not instead move things out into fragments, so that people can
compose the bits they need?

The other day, I was looking for a kvm_host.config fragment, to pair with
the kvm_guest.config we do have.

Similarly, all that UBSAN, MM and assorted debug cruft is already in
debug.config (although I do think debug.config is *too* heavy).



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

* Re: [PATCH 12/15] x86/kconfig/64: Enable popular kernel debugging options in the defconfig
  2025-05-05 23:30   ` Ivan Shapovalov
@ 2025-05-06 11:23     ` Ingo Molnar
  0 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-06 11:23 UTC (permalink / raw)
  To: Ivan Shapovalov
  Cc: linux-kernel, H . Peter Anvin, Linus Torvalds, Peter Zijlstra,
	Borislav Petkov, Thomas Gleixner, Ard Biesheuvel, Arnd Bergmann,
	David Woodhouse, Masahiro Yamada, Michal Marek


* Ivan Shapovalov <intelfx@intelfx.name> wrote:

> On 2025-05-05 at 13:09 +0200, Ingo Molnar wrote:
> > 
> >  - CONFIG_DEBUG_LIST=y:
> > 
> >      Fedora/RHEL have it enabled, while Ubuntu has it disabled.
> 
> (Please forgive my potential ignorance.)
> 
> If I'm guessing right, the point of CONFIG_DEBUG_LIST being enabled
> everywhere is probably more about hardening than debugging, and given
> that since 6.6 we have a CONFIG_LIST_HARDENED[1], wouldn't it make more
> sense to use that instead?

Yeah, I agree, and I've just changed it to CONFIG_LIST_HARDENED=y, 
which I agree is the more sensible default.

> Or is the point here to exactly follow the typical distro config,
> without regard to whether it's actually the optimal thing to do?
> 
> [1]: https://lore.kernel.org/all/20230811151847.1594958-3-elver@google.com/

So Ubuntu doesn't have it:

  /boot/config-6.11.0-25-generic:# CONFIG_LIST_HARDENED is not set

While Fedora has it:

  .config.fedora.generic:CONFIG_LIST_HARDENED=y

in which case it's basically a judgement call whether to do it in the 
defconfig. I agree that DEBUG_LIST=y is pretty heavy-handed, 
LIST_HARDENED=y looks better to me.

But when all major distros have an option enabled then I think in most 
cases the right policy is to enable it in our defconfig as well, 
because the option has become ubiquitous and we'd be denying reality by 
not having it in our regular tests.

Thanks,

	Ingo

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

* Re: [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups
  2025-05-06  7:45 ` [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Peter Zijlstra
@ 2025-05-06 11:30   ` Ingo Molnar
  0 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-06 11:30 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: linux-kernel, H . Peter Anvin, Linus Torvalds, Borislav Petkov,
	Thomas Gleixner


* Peter Zijlstra <peterz@infradead.org> wrote:

> One thing I'd been pondering for a while, but have absolutely no 
> bandwidth for what so ever, is a more fragment based config setup.
> 
> Much like we now have defconfig, kvm_guest.config, debug.config and 
> xen.config etc..
> 
> My main 'complain' is more that defconfig is too fat already, and 
> here you are making it fatter still -- notably, I don't need i915 in 
> most of the kernels I build (my test machines are all headless).
> 
> Could we not instead move things out into fragments, so that people 
> can compose the bits they need?
> 
> The other day, I was looking for a kvm_host.config fragment, to pair 
> with the kvm_guest.config we do have.
> 
> Similarly, all that UBSAN, MM and assorted debug cruft is already in 
> debug.config (although I do think debug.config is *too* heavy).

Yeah, so I don't disagree with the 'fragment' approach in principle, 
although I don't have the bandwidth either right now. :)

I do have a 'fulldebug' 'fragment' myself, enabled externally via a 
script that uses the 'scripts/config -e' flag to enable individual 
options:

	DYNAMIC_DEBUG=y
	DYNAMIC_DEBUG_CORE=y
	SYMBOLIC_ERRNAME=y
	DEBUG_BUGVERBOSE=y
	DEBUG_KERNEL=y
	DEBUG_MISC=y
	AS_HAS_NON_CONST_ULEB128=y
	DEBUG_INFO_COMPRESSED_NONE=y
	PAHOLE_HAS_SPLIT_BTF=y
	PAHOLE_HAS_LANG_EXCLUDE=y
	GDB_SCRIPTS=y
	SECTION_MISMATCH_WARN_ONLY=y
	OBJTOOL=y
	NOINSTR_VALIDATION=y
	MAGIC_SYSRQ=y
	MAGIC_SYSRQ_SERIAL=y
	DEBUG_FS=y
	DEBUG_FS_ALLOW_ALL=y
	HAVE_ARCH_KGDB=y
	KGDB=y
	KGDB_HONOUR_BLOCKLIST=y
	KGDB_SERIAL_CONSOLE=y
	KGDB_LOW_LEVEL_TRAP=y
	KGDB_KDB=y
	KDB_KEYBOARD=y
	ARCH_HAS_EARLY_DEBUG=y
	ARCH_HAS_UBSAN=y
	HAVE_ARCH_KCSAN=y
	HAVE_KCSAN_COMPILER=y
	PAGE_EXTENSION=y
	SLUB_DEBUG=y
	PAGE_TABLE_CHECK=y
	PAGE_TABLE_CHECK_ENFORCED=y
	PAGE_POISONING=y
	ARCH_HAS_DEBUG_WX=y
	DEBUG_WX=y
	ARCH_HAS_PTDUMP=y
	PTDUMP=y
	HAVE_DEBUG_KMEMLEAK=y
	SCHED_STACK_END_CHECK=y
	ARCH_HAS_DEBUG_VM_PGTABLE=y
	DEBUG_VM_IRQSOFF=y
	DEBUG_VM=y
	DEBUG_VM_MAPLE_TREE=y
	DEBUG_VM_RB=y
	DEBUG_VM_PGFLAGS=y
	DEBUG_VM_PGTABLE=y
	ARCH_HAS_DEBUG_VIRTUAL=y
	DEBUG_VIRTUAL=y
	DEBUG_MEMORY_INIT=y
	DEBUG_PER_CPU_MAPS=y
	ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y
	HAVE_ARCH_KASAN=y
	HAVE_ARCH_KASAN_VMALLOC=y
	CC_HAS_KASAN_GENERIC=y
	CC_HAS_KASAN_SW_TAGS=y
	CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
	HAVE_ARCH_KFENCE=y
	KFENCE=y
	HAVE_ARCH_KMSAN=y
	LOCKUP_DETECTOR=y
	SOFTLOCKUP_DETECTOR=y
	HAVE_HARDLOCKUP_DETECTOR_BUDDY=y
	HARDLOCKUP_DETECTOR=y
	HARDLOCKUP_DETECTOR_PERF=y
	HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y
	HARDLOCKUP_CHECK_TIMESTAMP=y
	DETECT_HUNG_TASK=y
	DETECT_HUNG_TASK_BLOCKER=y
	WQ_CPU_INTENSIVE_REPORT=y
	SCHED_INFO=y
	SCHEDSTATS=y
	DEBUG_PREEMPT=y
	LOCK_DEBUGGING_SUPPORT=y
	PROVE_LOCKING=y
	PROVE_RAW_LOCK_NESTING=y
	LOCK_STAT=y
	DEBUG_RT_MUTEXES=y
	DEBUG_SPINLOCK=y
	DEBUG_MUTEXES=y
	DEBUG_WW_MUTEX_SLOWPATH=y
	DEBUG_RWSEMS=y
	DEBUG_LOCK_ALLOC=y
	LOCKDEP=y
	DEBUG_LOCKDEP=y
	DEBUG_ATOMIC_SLEEP=y
	DEBUG_LOCKING_API_SELFTESTS=y
	CSD_LOCK_WAIT_DEBUG=y
	CSD_LOCK_WAIT_DEBUG_DEFAULT=y
	TRACE_IRQFLAGS=y
	TRACE_IRQFLAGS_NMI=y
	NMI_CHECK_CPU=y
	DEBUG_IRQFLAGS=y
	STACKTRACE=y
	DEBUG_LIST=y
	DEBUG_PLIST=y
	DEBUG_SG=y
	DEBUG_NOTIFIERS=y
	DEBUG_MAPLE_TREE=y
	PROVE_RCU=y
	RCU_CPU_STALL_CPUTIME=y
	USER_STACKTRACE_SUPPORT=y
	NOP_TRACER=y
	HAVE_RETHOOK=y
	RETHOOK=y
	HAVE_FUNCTION_TRACER=y
	HAVE_FUNCTION_GRAPH_TRACER=y
	HAVE_FUNCTION_GRAPH_FREGS=y
	HAVE_FTRACE_GRAPH_FUNC=y
	HAVE_DYNAMIC_FTRACE=y
	HAVE_DYNAMIC_FTRACE_WITH_REGS=y
	HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
	HAVE_DYNAMIC_FTRACE_WITH_ARGS=y
	HAVE_FTRACE_REGS_HAVING_PT_REGS=y
	HAVE_DYNAMIC_FTRACE_NO_PATCHABLE=y
	HAVE_FTRACE_MCOUNT_RECORD=y
	HAVE_SYSCALL_TRACEPOINTS=y
	HAVE_FENTRY=y
	HAVE_OBJTOOL_MCOUNT=y
	HAVE_OBJTOOL_NOP_MCOUNT=y
	HAVE_C_RECORDMCOUNT=y
	HAVE_BUILDTIME_MCOUNT_SORT=y
	BUILDTIME_MCOUNT_SORT=y
	TRACER_MAX_TRACE=y
	TRACE_CLOCK=y
	RING_BUFFER=y
	EVENT_TRACING=y
	CONTEXT_SWITCH_TRACER=y
	PREEMPTIRQ_TRACEPOINTS=y
	TRACING=y
	GENERIC_TRACER=y
	TRACING_SUPPORT=y
	FTRACE=y
	BOOTTIME_TRACING=y
	FUNCTION_TRACER=y
	FUNCTION_GRAPH_TRACER=y
	FUNCTION_GRAPH_RETVAL=y
	DYNAMIC_FTRACE=y
	DYNAMIC_FTRACE_WITH_REGS=y
	DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
	DYNAMIC_FTRACE_WITH_ARGS=y
	FPROBE=y
	FUNCTION_PROFILER=y
	STACK_TRACER=y
	SCHED_TRACER=y
	HWLAT_TRACER=y
	OSNOISE_TRACER=y
	TIMERLAT_TRACER=y
	MMIOTRACE=y
	FTRACE_SYSCALLS=y
	TRACER_SNAPSHOT=y
	BRANCH_PROFILE_NONE=y
	BLK_DEV_IO_TRACE=y
	FPROBE_EVENTS=y
	KPROBE_EVENTS=y
	UPROBE_EVENTS=y
	DYNAMIC_EVENTS=y
	PROBE_EVENTS=y
	FTRACE_MCOUNT_RECORD=y
	FTRACE_MCOUNT_USE_CC=y
	TRACING_MAP=y
	SYNTH_EVENTS=y
	USER_EVENTS=y
	HIST_TRIGGERS=y
	TRACE_EVENT_INJECT=y
	DA_MON_EVENTS=y
	DA_MON_EVENTS_ID=y
	RV=y
	RV_MON_WWNR=y
	RV_REACTORS=y
	RV_REACT_PRINTK=y
	RV_REACT_PANIC=y
	SAMPLES=y
	HAVE_SAMPLE_FTRACE_DIRECT=y
	HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y
	ARCH_HAS_DEVMEM_IS_ALLOWED=y
	STRICT_DEVMEM=y
	EARLY_PRINTK_USB=y
	EARLY_PRINTK=y
	EARLY_PRINTK_DBGP=y
	EARLY_PRINTK_USB_XDBC=y
	HAVE_MMIOTRACE_SUPPORT=y
	IO_DELAY_0XED=y
	DEBUG_ENTRY=y
	X86_DEBUG_FPU=y
	UNWINDER_ORC=y
	FUNCTION_ERROR_INJECTION=y
	ARCH_HAS_KCOV=y
	CC_HAS_SANCOV_TRACE_PC=y
	RUNTIME_TESTING_MENU=y
	ARCH_USE_MEMTEST=y
	MEMTEST=y

These are all the debug options that don't reasult in an unusable 
kernel (such as they don't spam the syslog, etc.).

Also note that the goal of 'defconfig' is to provide something that is 
relevant to 99.9% of our users: ie. something reasonably close to what 
actual Linux distributions in the field are using, minus (most) driver 
noise. Ie. in a way it's the 'community default' in essence, following 
the choices of the wider kernel community that end up being used by the 
majority of our users, with judgement calls when an option isn't 
universally enabled.

Thanks,

	Ingo

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

* Re: [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX
  2025-05-05 11:09 ` [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX Ingo Molnar
  2025-05-05 11:55   ` Kirill A. Shutemov
@ 2025-05-06 13:34   ` Vitaly Kuznetsov
  2025-05-06 17:02     ` [PATCH -v2 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V Ingo Molnar
  2025-05-07 19:55   ` [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX Carlos Bilbao
  2 siblings, 1 reply; 29+ messages in thread
From: Vitaly Kuznetsov @ 2025-05-06 13:34 UTC (permalink / raw)
  To: Ingo Molnar, linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	Carlos Bilbao, David Woodhouse, Elena Reshetova, Fei Li,
	Jan Kiszka, Juergen Gross, Kirill A . Shutemov, Masahiro Yamada,
	Michal Marek, Paolo Bonzini, Sean Christopherson,
	Stefano Stabellini

Ingo Molnar <mingo@kernel.org> writes:

> Since the x86 defconfig aims to be a distro kernel work-alike with
> fewer drivers and a shorter build time, refresh all the virtualization
> guest Kconfig features, enabling paravirt spinlocks, and
> enabling the guest support code for the following guests:
>
>  - Xen
>  - Xen_PVH
>  - Jailhouse
>  - ACRN
>  - Intel TDX

Out of curiosity and to get the idea what's good for defconfig and
what's not: do we want to enable Hyper-V and its drivers as well? I
think all popular distros enable it nowdays because of Azure. E.g.

CONFIG_PCI_HYPERV=m
CONFIG_HYPERV_STORAGE=m
CONFIG_HYPERV_NET=m
CONFIG_HYPERV_KEYBOARD=m
CONFIG_DRM_HYPERV=m
CONFIG_HID_HYPERV_MOUSE=m
CONFIG_HYPERV=m
CONFIG_HYPERV_UTILS=m
CONFIG_HYPERV_BALLOON=m

>
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Carlos Bilbao <carlos.bilbao@kernel.org>
> Cc: David Woodhouse <dwmw@amazon.co.uk>
> Cc: Elena Reshetova <elena.reshetova@intel.com>
> Cc: Fei Li <fei1.li@intel.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Jan Kiszka <jan.kiszka@siemens.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Sean Christopherson <seanjc@google.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  arch/x86/configs/defconfig.x86_64 | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
> index 156e9490e29b..514f8fdc2102 100644
> --- a/arch/x86/configs/defconfig.x86_64
> +++ b/arch/x86/configs/defconfig.x86_64
> @@ -31,6 +31,12 @@ CONFIG_KEXEC=y
>  CONFIG_SMP=y
>  CONFIG_HYPERVISOR_GUEST=y
>  CONFIG_PARAVIRT=y
> +CONFIG_PARAVIRT_SPINLOCKS=y
> +CONFIG_XEN=y
> +CONFIG_XEN_PVH=y
> +CONFIG_JAILHOUSE_GUEST=y
> +CONFIG_ACRN_GUEST=y
> +CONFIG_INTEL_TDX_GUEST=y
>  CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
>  CONFIG_X86_MSR=y
>  CONFIG_X86_CPUID=y

-- 
Vitaly


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

* [PATCH -v2 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V
  2025-05-06 13:34   ` Vitaly Kuznetsov
@ 2025-05-06 17:02     ` Ingo Molnar
  2025-05-08  1:43       ` Michael Kelley
  0 siblings, 1 reply; 29+ messages in thread
From: Ingo Molnar @ 2025-05-06 17:02 UTC (permalink / raw)
  To: Vitaly Kuznetsov
  Cc: linux-kernel, H . Peter Anvin, Linus Torvalds, Peter Zijlstra,
	Borislav Petkov, Thomas Gleixner, Ard Biesheuvel, Arnd Bergmann,
	Carlos Bilbao, David Woodhouse, Elena Reshetova, Fei Li,
	Jan Kiszka, Juergen Gross, Kirill A . Shutemov, Masahiro Yamada,
	Michal Marek, Paolo Bonzini, Sean Christopherson,
	Stefano Stabellini


* Vitaly Kuznetsov <vkuznets@redhat.com> wrote:

> Ingo Molnar <mingo@kernel.org> writes:
> 
> > Since the x86 defconfig aims to be a distro kernel work-alike with
> > fewer drivers and a shorter build time, refresh all the virtualization
> > guest Kconfig features, enabling paravirt spinlocks, and
> > enabling the guest support code for the following guests:
> >
> >  - Xen
> >  - Xen_PVH
> >  - Jailhouse
> >  - ACRN
> >  - Intel TDX
> 
> Out of curiosity and to get the idea what's good for defconfig and
> what's not: do we want to enable Hyper-V and its drivers as well? I
> think all popular distros enable it nowdays because of Azure. E.g.
> 
> CONFIG_PCI_HYPERV=m
> CONFIG_HYPERV_STORAGE=m
> CONFIG_HYPERV_NET=m
> CONFIG_HYPERV_KEYBOARD=m
> CONFIG_DRM_HYPERV=m
> CONFIG_HID_HYPERV_MOUSE=m
> CONFIG_HYPERV=m
> CONFIG_HYPERV_UTILS=m
> CONFIG_HYPERV_BALLOON=m

We can certainly do that. The only reason I missed it is because 
CONFIG_HYPERV et al have hidden away in the 'drivers' section of the 
.config, which I didn't examine. The other guest support options are in 
the generic config section.

Updated patch attached.

Thanks,

	Ingo

=================================>
From: Ingo Molnar <mingo@kernel.org>
Date: Mon, 5 May 2025 10:49:11 +0200
Subject: [PATCH] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V

Since the x86 defconfig aims to be a distro kernel work-alike with
fewer drivers and a shorter build time, refresh all the virtualization
guest Kconfig features, enabling paravirt spinlocks, and
enabling the guest support code for the following guests:

 - Xen
 - Xen_PVH
 - Jailhouse
 - ACRN
 - Intel TDX
 - Hyper-V

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Carlos Bilbao <carlos.bilbao@kernel.org>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Cc: Fei Li <fei1.li@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 arch/x86/configs/defconfig.x86_64 | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
index 156e9490e29b..df786b8b4e85 100644
--- a/arch/x86/configs/defconfig.x86_64
+++ b/arch/x86/configs/defconfig.x86_64
@@ -30,7 +30,12 @@ CONFIG_PROFILING=y
 CONFIG_KEXEC=y
 CONFIG_SMP=y
 CONFIG_HYPERVISOR_GUEST=y
-CONFIG_PARAVIRT=y
+CONFIG_PARAVIRT_SPINLOCKS=y
+CONFIG_XEN=y
+CONFIG_XEN_PVH=y
+CONFIG_JAILHOUSE_GUEST=y
+CONFIG_ACRN_GUEST=y
+CONFIG_INTEL_TDX_GUEST=y
 CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
 CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=y
@@ -128,6 +133,7 @@ CONFIG_NET_9P=y
 CONFIG_NET_9P_VIRTIO=y
 CONFIG_PCI=y
 CONFIG_PCIEPORTBUS=y
+CONFIG_PCI_HYPERV=y
 CONFIG_HOTPLUG_PCI=y
 CONFIG_PCCARD=y
 CONFIG_YENTA=y
@@ -168,6 +174,7 @@ CONFIG_SKY2=y
 CONFIG_FORCEDETH=y
 CONFIG_8139TOO=y
 CONFIG_R8169=y
+CONFIG_HYPERV_NET=y
 CONFIG_INPUT_EVDEV=y
 CONFIG_INPUT_JOYSTICK=y
 CONFIG_INPUT_TABLET=y
@@ -198,6 +205,7 @@ CONFIG_AGP_INTEL=y
 CONFIG_DRM=y
 CONFIG_DRM_I915=y
 CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_DRM_HYPERV=y
 CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_HRTIMER=y
@@ -214,6 +222,7 @@ CONFIG_HID_PETALYNX=y
 CONFIG_HID_SAMSUNG=y
 CONFIG_HID_SONY=y
 CONFIG_HID_SUNPLUS=y
+CONFIG_HID_HYPERV_MOUSE=y
 CONFIG_HID_TOPSEED=y
 CONFIG_HID_PID=y
 CONFIG_USB_HIDDEV=y
@@ -231,6 +240,9 @@ CONFIG_RTC_CLASS=y
 CONFIG_DMADEVICES=y
 CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO_INPUT=y
+CONFIG_HYPERV=y
+CONFIG_HYPERV_UTILS=y
+CONFIG_HYPERV_BALLOON=y
 CONFIG_EEEPC_LAPTOP=y
 CONFIG_AMD_IOMMU=y
 CONFIG_INTEL_IOMMU=y

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

* [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386
  2025-05-06 17:09 [PATCH -v2 " Ingo Molnar
@ 2025-05-06 17:09 ` Ingo Molnar
  2025-05-09 18:10   ` Arnd Bergmann
  0 siblings, 1 reply; 29+ messages in thread
From: Ingo Molnar @ 2025-05-06 17:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Vitaly Kuznetsov, Ingo Molnar, Ard Biesheuvel,
	Arnd Bergmann, David Woodhouse, Masahiro Yamada, Michal Marek

Editing the defconfigs with shell filename completion is unnecessarily
hard due to bad naming: if one remembers 'arch/x86/config/defconfig',
it won't lead to the right files, because the defconfigs are
prefixed with $(ARCH)_.

Under the principle of 'higher order names should go first', prefix
them with 'defconfig' and postfix them with .$(ARCH), and thus make
all x86 configs match the arch/x86/config/defconfig.* pattern.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst | 2 +-
 arch/x86/Makefile                                                | 6 +++---
 arch/x86/configs/{i386_defconfig => defconfig.i386}              | 0
 arch/x86/configs/{x86_64_defconfig => defconfig.x86_64}          | 0
 drivers/gpu/drm/ci/build.yml                                     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst b/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
index 03c55151346c..bcd2bdf6c076 100644
--- a/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
+++ b/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
@@ -426,7 +426,7 @@ machine; if you want to compile the kernel on another system, check
   Look out for a line starting with '# using defaults found in'. It should be
   followed by a path to a file in '/boot/' that contains the release identifier
   of your currently working kernel. If the line instead continues with something
-  like 'arch/x86/configs/x86_64_defconfig', then the build infra failed to find
+  like 'arch/x86/configs/defconfig.x86_64', then the build infra failed to find
   the .config file for your running kernel -- in which case you have to put one
   there manually, as explained in the reference section.
 
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 594723005d95..bae2c7bbb8db 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -4,12 +4,12 @@
 # select defconfig based on actual architecture
 ifeq ($(ARCH),x86)
   ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)
-        KBUILD_DEFCONFIG := i386_defconfig
+        KBUILD_DEFCONFIG := defconfig.i386
   else
-        KBUILD_DEFCONFIG := x86_64_defconfig
+        KBUILD_DEFCONFIG := defconfig.x86_64
   endif
 else
-        KBUILD_DEFCONFIG := $(ARCH)_defconfig
+        KBUILD_DEFCONFIG := defconfig.$(ARCH)
 endif
 
 ifdef CONFIG_CC_IS_GCC
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/defconfig.i386
similarity index 100%
rename from arch/x86/configs/i386_defconfig
rename to arch/x86/configs/defconfig.i386
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/defconfig.x86_64
similarity index 100%
rename from arch/x86/configs/x86_64_defconfig
rename to arch/x86/configs/defconfig.x86_64
diff --git a/drivers/gpu/drm/ci/build.yml b/drivers/gpu/drm/ci/build.yml
index 274f118533a7..2e0ce38d73cd 100644
--- a/drivers/gpu/drm/ci/build.yml
+++ b/drivers/gpu/drm/ci/build.yml
@@ -35,7 +35,7 @@
     - .build
     - .use-debian/x86_64_build
   variables:
-    DEFCONFIG: "arch/x86/configs/x86_64_defconfig"
+    DEFCONFIG: "arch/x86/configs/defconfig.x86_64"
     KERNEL_IMAGE_NAME: "bzImage"
     KERNEL_ARCH: "x86_64"
 
-- 
2.45.2


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

* Re: [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX
  2025-05-05 11:09 ` [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX Ingo Molnar
  2025-05-05 11:55   ` Kirill A. Shutemov
  2025-05-06 13:34   ` Vitaly Kuznetsov
@ 2025-05-07 19:55   ` Carlos Bilbao
  2 siblings, 0 replies; 29+ messages in thread
From: Carlos Bilbao @ 2025-05-07 19:55 UTC (permalink / raw)
  To: Ingo Molnar, linux-kernel
  Cc: H . Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Ard Biesheuvel, Arnd Bergmann, Carlos Bilbao,
	David Woodhouse, Elena Reshetova, Fei Li, Jan Kiszka,
	Juergen Gross, Kirill A . Shutemov, Masahiro Yamada, Michal Marek,
	Paolo Bonzini, Sean Christopherson, Stefano Stabellini,
	Vitaly Kuznetsov

On 5/5/25 06:09, Ingo Molnar wrote:

> Since the x86 defconfig aims to be a distro kernel work-alike with
> fewer drivers and a shorter build time, refresh all the virtualization
> guest Kconfig features, enabling paravirt spinlocks, and
> enabling the guest support code for the following guests:
>
>  - Xen
>  - Xen_PVH
>  - Jailhouse
>  - ACRN
>  - Intel TDX
>
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Carlos Bilbao <carlos.bilbao@kernel.org>
> Cc: David Woodhouse <dwmw@amazon.co.uk>
> Cc: Elena Reshetova <elena.reshetova@intel.com>
> Cc: Fei Li <fei1.li@intel.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Jan Kiszka <jan.kiszka@siemens.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Sean Christopherson <seanjc@google.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  arch/x86/configs/defconfig.x86_64 | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
> index 156e9490e29b..514f8fdc2102 100644
> --- a/arch/x86/configs/defconfig.x86_64
> +++ b/arch/x86/configs/defconfig.x86_64
> @@ -31,6 +31,12 @@ CONFIG_KEXEC=y
>  CONFIG_SMP=y
>  CONFIG_HYPERVISOR_GUEST=y
>  CONFIG_PARAVIRT=y
> +CONFIG_PARAVIRT_SPINLOCKS=y
> +CONFIG_XEN=y
> +CONFIG_XEN_PVH=y
> +CONFIG_JAILHOUSE_GUEST=y
> +CONFIG_ACRN_GUEST=y
> +CONFIG_INTEL_TDX_GUEST=y
>  CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
>  CONFIG_X86_MSR=y
>  CONFIG_X86_CPUID=y


Acked-by: Carlos Bilbao <carlos.bilbao@kernel.org>


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

* RE: [PATCH -v2 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V
  2025-05-06 17:02     ` [PATCH -v2 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V Ingo Molnar
@ 2025-05-08  1:43       ` Michael Kelley
  0 siblings, 0 replies; 29+ messages in thread
From: Michael Kelley @ 2025-05-08  1:43 UTC (permalink / raw)
  To: Ingo Molnar, Vitaly Kuznetsov
  Cc: linux-kernel@vger.kernel.org, H . Peter Anvin, Linus Torvalds,
	Peter Zijlstra, Borislav Petkov, Thomas Gleixner, Ard Biesheuvel,
	Arnd Bergmann, Carlos Bilbao, David Woodhouse, Elena Reshetova,
	Fei Li, Jan Kiszka, Juergen Gross, Kirill A . Shutemov,
	Masahiro Yamada, Michal Marek, Paolo Bonzini, Sean Christopherson,
	Stefano Stabellini

From: Ingo Molnar <mingo@kernel.org> Sent: Tuesday, May 6, 2025 10:03 AM
> 
> * Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
> 
> > Ingo Molnar <mingo@kernel.org> writes:
> >
> > > Since the x86 defconfig aims to be a distro kernel work-alike with
> > > fewer drivers and a shorter build time, refresh all the virtualization
> > > guest Kconfig features, enabling paravirt spinlocks, and
> > > enabling the guest support code for the following guests:
> > >
> > >  - Xen
> > >  - Xen_PVH
> > >  - Jailhouse
> > >  - ACRN
> > >  - Intel TDX
> >
> > Out of curiosity and to get the idea what's good for defconfig and
> > what's not: do we want to enable Hyper-V and its drivers as well? I
> > think all popular distros enable it nowdays because of Azure. E.g.
> >
> > CONFIG_PCI_HYPERV=m
> > CONFIG_HYPERV_STORAGE=m

It looks like CONFIG_HYPERV_STORAGE is missing from your updated
patch below.

> > CONFIG_HYPERV_NET=m
> > CONFIG_HYPERV_KEYBOARD=m

Also CONFIG_HYPERV_KEYBOARD is missing.

Michael

> > CONFIG_DRM_HYPERV=m
> > CONFIG_HID_HYPERV_MOUSE=m
> > CONFIG_HYPERV=m
> > CONFIG_HYPERV_UTILS=m
> > CONFIG_HYPERV_BALLOON=m
> 
> We can certainly do that. The only reason I missed it is because
> CONFIG_HYPERV et al have hidden away in the 'drivers' section of the
> .config, which I didn't examine. The other guest support options are in
> the generic config section.
> 
> Updated patch attached.
> 
> Thanks,
> 
> 	Ingo
> 
> =================================>
> From: Ingo Molnar <mingo@kernel.org>
> Date: Mon, 5 May 2025 10:49:11 +0200
> Subject: [PATCH] x86/kconfig/64: Enable more virtualization guest options in the
> defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V
> 
> Since the x86 defconfig aims to be a distro kernel work-alike with
> fewer drivers and a shorter build time, refresh all the virtualization
> guest Kconfig features, enabling paravirt spinlocks, and
> enabling the guest support code for the following guests:
> 
>  - Xen
>  - Xen_PVH
>  - Jailhouse
>  - ACRN
>  - Intel TDX
>  - Hyper-V
> 
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Carlos Bilbao <carlos.bilbao@kernel.org>
> Cc: David Woodhouse <dwmw@amazon.co.uk>
> Cc: Elena Reshetova <elena.reshetova@intel.com>
> Cc: Fei Li <fei1.li@intel.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Jan Kiszka <jan.kiszka@siemens.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Sean Christopherson <seanjc@google.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  arch/x86/configs/defconfig.x86_64 | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/configs/defconfig.x86_64 b/arch/x86/configs/defconfig.x86_64
> index 156e9490e29b..df786b8b4e85 100644
> --- a/arch/x86/configs/defconfig.x86_64
> +++ b/arch/x86/configs/defconfig.x86_64
> @@ -30,7 +30,12 @@ CONFIG_PROFILING=y
>  CONFIG_KEXEC=y
>  CONFIG_SMP=y
>  CONFIG_HYPERVISOR_GUEST=y
> -CONFIG_PARAVIRT=y
> +CONFIG_PARAVIRT_SPINLOCKS=y
> +CONFIG_XEN=y
> +CONFIG_XEN_PVH=y
> +CONFIG_JAILHOUSE_GUEST=y
> +CONFIG_ACRN_GUEST=y
> +CONFIG_INTEL_TDX_GUEST=y
>  CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
>  CONFIG_X86_MSR=y
>  CONFIG_X86_CPUID=y
> @@ -128,6 +133,7 @@ CONFIG_NET_9P=y
>  CONFIG_NET_9P_VIRTIO=y
>  CONFIG_PCI=y
>  CONFIG_PCIEPORTBUS=y
> +CONFIG_PCI_HYPERV=y
>  CONFIG_HOTPLUG_PCI=y
>  CONFIG_PCCARD=y
>  CONFIG_YENTA=y
> @@ -168,6 +174,7 @@ CONFIG_SKY2=y
>  CONFIG_FORCEDETH=y
>  CONFIG_8139TOO=y
>  CONFIG_R8169=y
> +CONFIG_HYPERV_NET=y
>  CONFIG_INPUT_EVDEV=y
>  CONFIG_INPUT_JOYSTICK=y
>  CONFIG_INPUT_TABLET=y
> @@ -198,6 +205,7 @@ CONFIG_AGP_INTEL=y
>  CONFIG_DRM=y
>  CONFIG_DRM_I915=y
>  CONFIG_DRM_VIRTIO_GPU=y
> +CONFIG_DRM_HYPERV=y
>  CONFIG_SOUND=y
>  CONFIG_SND=y
>  CONFIG_SND_HRTIMER=y
> @@ -214,6 +222,7 @@ CONFIG_HID_PETALYNX=y
>  CONFIG_HID_SAMSUNG=y
>  CONFIG_HID_SONY=y
>  CONFIG_HID_SUNPLUS=y
> +CONFIG_HID_HYPERV_MOUSE=y
>  CONFIG_HID_TOPSEED=y
>  CONFIG_HID_PID=y
>  CONFIG_USB_HIDDEV=y
> @@ -231,6 +240,9 @@ CONFIG_RTC_CLASS=y
>  CONFIG_DMADEVICES=y
>  CONFIG_VIRTIO_PCI=y
>  CONFIG_VIRTIO_INPUT=y
> +CONFIG_HYPERV=y
> +CONFIG_HYPERV_UTILS=y
> +CONFIG_HYPERV_BALLOON=y
>  CONFIG_EEEPC_LAPTOP=y
>  CONFIG_AMD_IOMMU=y
>  CONFIG_INTEL_IOMMU=y


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

* Re: [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386
  2025-05-06 17:09 ` [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386 Ingo Molnar
@ 2025-05-09 18:10   ` Arnd Bergmann
  2025-05-15 13:16     ` Ingo Molnar
  0 siblings, 1 reply; 29+ messages in thread
From: Arnd Bergmann @ 2025-05-09 18:10 UTC (permalink / raw)
  To: Ingo Molnar, linux-kernel
  Cc: H. Peter Anvin, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	Thomas Gleixner, Vitaly Kuznetsov, Ard Biesheuvel,
	David Woodhouse, Masahiro Yamada, Michal Marek

On Tue, May 6, 2025, at 19:09, Ingo Molnar wrote:
> Editing the defconfigs with shell filename completion is unnecessarily
> hard due to bad naming: if one remembers 'arch/x86/config/defconfig',
> it won't lead to the right files, because the defconfigs are
> prefixed with $(ARCH)_.
>
> Under the principle of 'higher order names should go first', prefix
> them with 'defconfig' and postfix them with .$(ARCH), and thus make
> all x86 configs match the arch/x86/config/defconfig.* pattern.

I think this patch should be dropped completely, it as it causes
multiple problems:

- it breaks existing scripts that use 'make x86_64_defconfig'
- it breaks 'make help' automatically printing the names
  of the defconfigs
- it's inconsistent with the other architectures

       Arnd

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

* Re: [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386
  2025-05-09 18:10   ` Arnd Bergmann
@ 2025-05-15 13:16     ` Ingo Molnar
  0 siblings, 0 replies; 29+ messages in thread
From: Ingo Molnar @ 2025-05-15 13:16 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, H. Peter Anvin, Linus Torvalds, Peter Zijlstra,
	Borislav Petkov, Thomas Gleixner, Vitaly Kuznetsov,
	Ard Biesheuvel, David Woodhouse, Masahiro Yamada, Michal Marek


* Arnd Bergmann <arnd@arndb.de> wrote:

> On Tue, May 6, 2025, at 19:09, Ingo Molnar wrote:
> > Editing the defconfigs with shell filename completion is unnecessarily
> > hard due to bad naming: if one remembers 'arch/x86/config/defconfig',
> > it won't lead to the right files, because the defconfigs are
> > prefixed with $(ARCH)_.
> >
> > Under the principle of 'higher order names should go first', prefix
> > them with 'defconfig' and postfix them with .$(ARCH), and thus make
> > all x86 configs match the arch/x86/config/defconfig.* pattern.
> 
> I think this patch should be dropped completely, it as it causes
> multiple problems:
> 
> - it breaks existing scripts that use 'make x86_64_defconfig'
> - it breaks 'make help' automatically printing the names
>   of the defconfigs
> - it's inconsistent with the other architectures

Oh well, I've removed patches #3 and #4.

Thanks,

	Ingo

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

end of thread, other threads:[~2025-05-15 13:16 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-05 11:09 [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Ingo Molnar
2025-05-05 11:09 ` [PATCH 01/15] x86/kconfig/64: Refresh defconfig Ingo Molnar
2025-05-05 11:09 ` [PATCH 02/15] x86/kconfig/32: " Ingo Molnar
2025-05-05 11:09 ` [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386 Ingo Molnar
2025-05-05 11:09 ` [PATCH 04/15] x86/kbuild: Introduce the 'x86_32' subarchitecture Ingo Molnar
2025-05-05 11:09 ` [PATCH 05/15] x86/kbuild: Remove ancient 'arch/i386/' and 'arch/x86_64/' directory removal 'archclean' target Ingo Molnar
2025-05-05 11:09 ` [PATCH 06/15] x86/tools: insn_decoder_test.c: Emit standard build success messages Ingo Molnar
2025-05-05 11:09 ` [PATCH 07/15] x86/tools: insn_sanity.c: " Ingo Molnar
2025-05-05 11:09 ` [PATCH 08/15] x86/kconfig/64: Enable the KVM host in the defconfig Ingo Molnar
2025-05-05 11:09 ` [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX Ingo Molnar
2025-05-05 11:55   ` Kirill A. Shutemov
2025-05-06 13:34   ` Vitaly Kuznetsov
2025-05-06 17:02     ` [PATCH -v2 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V Ingo Molnar
2025-05-08  1:43       ` Michael Kelley
2025-05-07 19:55   ` [PATCH 09/15] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN and Intel TDX Carlos Bilbao
2025-05-05 11:09 ` [PATCH 10/15] x86/kconfig/64: Enable BPF support in the defconfig Ingo Molnar
2025-05-05 11:09 ` [PATCH 11/15] x86/kconfig/64: Enable popular MM options " Ingo Molnar
2025-05-05 11:09 ` [PATCH 12/15] x86/kconfig/64: Enable popular kernel debugging " Ingo Molnar
2025-05-05 12:56   ` Sam James
2025-05-05 23:30   ` Ivan Shapovalov
2025-05-06 11:23     ` Ingo Molnar
2025-05-05 11:09 ` [PATCH 13/15] x86/kconfig/64: Enable popular scheduler, cgroups and namespaces " Ingo Molnar
2025-05-05 11:09 ` [PATCH 14/15] x86/kconfig/64: Enable popular generic kernel " Ingo Molnar
2025-05-05 11:09 ` [PATCH 15/15] x86/kconfig/32: Synchronize the x86-32 defconfig to the x86-64 defconfig Ingo Molnar
2025-05-06  7:45 ` [PATCH 00/15] x86/kconfig: Enable various kernel features in the defconfig, add the 'x86_32' subarchitecture build target and misc cleanups Peter Zijlstra
2025-05-06 11:30   ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2025-05-06 17:09 [PATCH -v2 " Ingo Molnar
2025-05-06 17:09 ` [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386 Ingo Molnar
2025-05-09 18:10   ` Arnd Bergmann
2025-05-15 13:16     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).