]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: support CONFIG_KVM_AMD=y with CONFIG_CRYPTO_DEV_CCP_DD=m
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Oct 2018 16:35:29 +0000 (18:35 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Oct 2018 16:38:42 +0000 (18:38 +0200)
commitad528f62adac6a3aef0f06f2d2a4a54c641cac93
treecb694c46802482ccc83ba2e37c7ba5e99969594c
parentbdcf8b9714e0d961e2e661a8244de2d7fc2098c7
KVM: x86: support CONFIG_KVM_AMD=y with CONFIG_CRYPTO_DEV_CCP_DD=m

SEV requires access to the AMD cryptographic device APIs, and this
does not work when KVM is builtin and the crypto driver is a module.
Actually the Kconfig conditions for CONFIG_KVM_AMD_SEV try to disable
SEV in that case, but it does not work because the actual crypto
calls are not culled, only sev_hardware_setup() is.

This patch adds two CONFIG_KVM_AMD_SEV checks that gate all the remaining
SEV code; it fixes this particular configuration, and drops 5 KiB of
code when CONFIG_KVM_AMD_SEV=n.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c