Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 76d5363

Browse files
sean-jcbonzini
authored andcommitted
KVM: x86: Force KVM_WERROR if the global WERROR is enabled
Force KVM_WERROR if the global WERROR is enabled to avoid pestering the user about a Kconfig that will ultimately be ignored. Force KVM_WERROR instead of making it mutually exclusive with WERROR to avoid generating a .config builds KVM with -Werror, but has KVM_WERROR=n. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sean Christopherson <seanjc@google.com> Message-ID: <20240517180341.974251-1-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 6af6142 commit 76d5363

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/kvm/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ config KVM
4444
select KVM_VFIO
4545
select HAVE_KVM_PM_NOTIFIER if PM
4646
select KVM_GENERIC_HARDWARE_ENABLING
47+
select KVM_WERROR if WERROR
4748
help
4849
Support hosting fully virtualized guest machines using hardware
4950
virtualization extensions. You will need a fairly recent
@@ -66,7 +67,7 @@ config KVM_WERROR
6667
# FRAME_WARN, i.e. KVM_WERROR=y with KASAN=y requires special tuning.
6768
# Building KVM with -Werror and KASAN is still doable via enabling
6869
# the kernel-wide WERROR=y.
69-
depends on KVM && EXPERT && !KASAN
70+
depends on KVM && ((EXPERT && !KASAN) || WERROR)
7071
help
7172
Add -Werror to the build flags for KVM.
7273

0 commit comments

Comments
 (0)