On Thu, May 16, 2024, Dave Airlie wrote: > On Thu, 16 May 2024 at 08:56, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > If the *main* CONFIG_WERROR is on, then it does NOT MATTER if somebody > > sets CONFIG_DRM_WERROR or not. It's a no-op. It's pointless. +1 > It's also possible it's just that hey there's a few others in the tree > > KVM_WERROR not tied to it > PPC_WERROR (why does CXL uses this?) > AMDGPU, I915 and XE all have !COMPILE_TEST on their variants > > We should probably add !WERROR to all of these at this point. That creates its own weirdness though, e.g. I guarantee I'll forget about the global WERROR at some point and wonder why I'm seeing -Werror despite having KVM_WERROR=n in my .config. I would rather force KVM_WERROR if WERROR=y, so this? diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 2a7f69abcac3..75082c4a9ac4 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -44,6 +44,7 @@ config KVM select KVM_VFIO select HAVE_KVM_PM_NOTIFIER if PM select KVM_GENERIC_HARDWARE_ENABLING + select KVM_WERROR if WERROR help Support hosting fully virtualized guest machines using hardware virtualization extensions. You will need a fairly recent @@ -66,7 +67,7 @@ config KVM_WERROR # FRAME_WARN, i.e. KVM_WERROR=y with KASAN=y requires special tuning. # Building KVM with -Werror and KASAN is still doable via enabling # the kernel-wide WERROR=y. - depends on KVM && EXPERT && !KASAN + depends on KVM && ((EXPERT && !KASAN) || WERROR) help Add -Werror to the build flags for KVM.