]> Git Repo - linux.git/commitdiff
KVM: x86: Break CONFIG_KVM_X86's direct dependency on KVM_INTEL || KVM_AMD
authorSean Christopherson <[email protected]>
Mon, 18 Nov 2024 17:20:02 +0000 (09:20 -0800)
committerPaolo Bonzini <[email protected]>
Wed, 20 Nov 2024 00:34:51 +0000 (19:34 -0500)
Rework CONFIG_KVM_X86's dependency to only check if KVM_INTEL or KVM_AMD
is selected, i.e. not 'n'.  Having KVM_X86 depend directly on the vendor
modules results in KVM_X86 being set to 'm' if at least one of KVM_INTEL
or KVM_AMD is enabled, but neither is 'y', regardless of the value of KVM
itself.

The documentation for def_tristate doesn't explicitly state that this is
the intended behavior, but it does clearly state that the "if" section is
parsed as a dependency, i.e. the behavior is consistent with how tristate
dependencies are handled in general.

  Optionally dependencies for this default value can be added with "if".

Fixes: ea4290d77bda ("KVM: x86: leave kvm.ko out of the build if no vendor module is requested")
Cc: [email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Message-ID: <20241118172002.1633824[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/kvm/Kconfig

index d2f0cdb04c029b6d6aa2322e1b216ab932680907..ea2c4f21c1ca9bb8635b6040a16c52774caefa6a 100644 (file)
@@ -18,7 +18,7 @@ menuconfig VIRTUALIZATION
 if VIRTUALIZATION
 
 config KVM_X86
-       def_tristate KVM if KVM_INTEL || KVM_AMD
+       def_tristate KVM if (KVM_INTEL != n || KVM_AMD != n)
        select KVM_COMMON
        select KVM_GENERIC_MMU_NOTIFIER
        select KVM_ELIDE_TLB_FLUSH_IF_YOUNG
This page took 0.0448190000000001 seconds and 4 git commands to generate.