From: Guenter Roeck Subject: [PATCH] KVM: X86: Add missing KVM_AMD dependency Date: Fri, 5 Oct 2018 11:46:05 -0700 Message-ID: <1538765165-19177-1-git-send-email-linux@roeck-us.net> Cc: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Brijesh Singh , Borislav Petkov To: Paolo Bonzini Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Building an image with KVM_AMD=y, CRYPTO_DEV_SP_PSP=y, and CRYPTO_DEV_CCP_DD=m fails with the following error messages. arch/x86/kvm/svm.c:6287: undefined reference to `sev_issue_cmd_external_user' arch/x86/kvm/svm.o: In function `sev_unbind_asid': arch/x86/kvm/svm.c:1747: undefined reference to `sev_guest_deactivate' arch/x86/kvm/svm.c:1750: undefined reference to `sev_guest_df_flush' arch/x86/kvm/svm.c:1759: undefined reference to `sev_guest_decommission' Analysis shows that commit 59414c9892208 ("KVM: SVM: Add support for KVM_SEV_LAUNCH_START command") added a dependency of KVM_AMD on CRYPTO_DEV_CCP_DD if CRYPTO_DEV_SP_PSP is enabled: If CRYPTO_DEV_CCP_DD is built as module, KVM_AMD must be built as module as well. Fixes: 59414c9892208 ("KVM: SVM: Add support for KVM_SEV_LAUNCH_START command") Cc: Brijesh Singh Cc: Borislav Petkov Signed-off-by: Guenter Roeck --- arch/x86/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 1bbec387d289..a8eff6910ea3 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -74,6 +74,7 @@ config KVM_INTEL config KVM_AMD tristate "KVM for AMD processors support" depends on KVM + depends on !CRYPTO_DEV_SP_PSP || (CRYPTO_DEV_SP_PSP && CRYPTO_DEV_CCP_DD) ---help--- Provides support for KVM on AMD processors equipped with the AMD-V (SVM) extensions. -- 2.7.4