public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: X86: Add missing KVM_AMD dependency
@ 2018-10-05 18:46 Guenter Roeck
  2018-10-05 20:41 ` Paolo Bonzini
  0 siblings, 1 reply; 9+ messages in thread
From: Guenter Roeck @ 2018-10-05 18:46 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Radim Krčmář, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, x86, kvm, linux-kernel, Guenter Roeck,
	Brijesh Singh, Borislav Petkov

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 <brijesh.singh@amd.com>
Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-10-09 16:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-05 18:46 [PATCH] KVM: X86: Add missing KVM_AMD dependency Guenter Roeck
2018-10-05 20:41 ` Paolo Bonzini
2018-10-05 22:03   ` Guenter Roeck
2018-10-05 22:18     ` Paolo Bonzini
2018-10-06 20:43       ` Guenter Roeck
2018-10-08 11:27         ` Paolo Bonzini
2018-10-08 14:52           ` Singh, Brijesh
2018-10-08 17:32             ` Borislav Petkov
2018-10-09 16:26               ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox