[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190928172323.14663-3-aarcange@redhat.com>
Date: Sat, 28 Sep 2019 13:23:11 -0400
From: Andrea Arcangeli <aarcange@...hat.com>
To: kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>
Subject: [PATCH 02/14] KVM: monolithic: x86: disable linking vmx and svm at the same time into the kernel
Linking both vmx and svm into the kernel at the same time isn't
possible anymore or the kvm_x86/kvm_x86_pmu external function names
would collide.
Reported-by: kbuild test robot <lkp@...el.com>
Signed-off-by: Andrea Arcangeli <aarcange@...hat.com>
---
arch/x86/kvm/Kconfig | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index 840e12583b85..e1601c54355e 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -59,9 +59,29 @@ config KVM
If unsure, say N.
+if KVM=y
+
+choice
+ prompt "To link KVM statically into the kernel you need to choose"
+ help
+ In order to build a kernel with support for both AMD and Intel
+ CPUs, you need to set CONFIG_KVM=m.
+
+config KVM_AMD_STATIC
+ select KVM_AMD
+ bool "Link KVM AMD statically into the kernel"
+
+config KVM_INTEL_STATIC
+ select KVM_INTEL
+ bool "Link KVM Intel statically into the kernel"
+
+endchoice
+
+endif
+
config KVM_INTEL
tristate "KVM for Intel processors support"
- depends on KVM
+ depends on (KVM && !KVM_AMD_STATIC) || KVM_INTEL_STATIC
# for perf_guest_get_msrs():
depends on CPU_SUP_INTEL
---help---
@@ -73,7 +93,7 @@ config KVM_INTEL
config KVM_AMD
tristate "KVM for AMD processors support"
- depends on KVM
+ depends on (KVM && !KVM_INTEL_STATIC) || KVM_AMD_STATIC
---help---
Provides support for KVM on AMD processors equipped with the AMD-V
(SVM) extensions.
Powered by blists - more mailing lists