Skip to content

Commit e38d43f

Browse files
sean-jcpiso77
authored andcommitted
KVM: x86: Break CONFIG_KVM_X86's direct dependency on KVM_INTEL || KVM_AMD
BugLink: https://bugs.launchpad.net/bugs/2091625 commit 9ee62c3 upstream. 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: ea4290d ("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: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Paolo Pisati <[email protected]>
1 parent 2ff3e8d commit e38d43f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ menuconfig VIRTUALIZATION
1818
if VIRTUALIZATION
1919

2020
config KVM_X86
21-
def_tristate KVM if KVM_INTEL || KVM_AMD
21+
def_tristate KVM if (KVM_INTEL != n || KVM_AMD != n)
2222
select KVM_COMMON
2323
select KVM_GENERIC_MMU_NOTIFIER
2424
select HAVE_KVM_IRQCHIP

0 commit comments

Comments
 (0)