Message ID | 20170919204627.3875-30-brijesh.singh@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Brijesh, [auto build test WARNING on kvm/linux-next] [also build test WARNING on v4.14-rc1 next-20170922] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Brijesh-Singh/x86-Secure-Encrypted-Virtualization-AMD/20170923-033600 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next config: i386-randconfig-x015-201738 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): warning: (KVM_AMD_SEV) selects CRYPTO_DEV_SP_PSP which has unmet direct dependencies (CRYPTO && CRYPTO_HW && CRYPTO_DEV_CCP && CRYPTO_DEV_CCP_DD) --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi Brijesh, [auto build test ERROR on kvm/linux-next] [also build test ERROR on v4.14-rc1 next-20170922] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Brijesh-Singh/x86-Secure-Encrypted-Virtualization-AMD/20170923-033600 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next config: x86_64-rhel (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> ERROR: "sev_platform_shutdown" [arch/x86/kvm/kvm-amd.ko] undefined! >> ERROR: "sev_guest_decommission" [arch/x86/kvm/kvm-amd.ko] undefined! >> ERROR: "sev_platform_init" [arch/x86/kvm/kvm-amd.ko] undefined! >> ERROR: "sev_platform_status" [arch/x86/kvm/kvm-amd.ko] undefined! >> ERROR: "sev_guest_deactivate" [arch/x86/kvm/kvm-amd.ko] undefined! >> ERROR: "sev_guest_df_flush" [arch/x86/kvm/kvm-amd.ko] undefined! >> ERROR: "sev_issue_cmd_external_user" [arch/x86/kvm/kvm-amd.ko] undefined! >> ERROR: "sev_guest_activate" [arch/x86/kvm/kvm-amd.ko] undefined! --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 3ea624452f93..06d3d221a503 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -79,6 +79,14 @@ config KVM_AMD To compile this as a module, choose M here: the module will be called kvm-amd. +config KVM_AMD_SEV + def_bool y + bool "AMD Secure Encrypted Virtualization (SEV) support" + depends on KVM_AMD + select CRYPTO_DEV_SP_PSP + ---help--- + Provides support for Encrypted VMs on AMD processors. + config KVM_MMU_AUDIT bool "Audit KVM MMU" depends on KVM && TRACEPOINTS diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index d997f63c765d..f9878efb808a 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1143,7 +1143,8 @@ static __init int svm_hardware_setup(void) kvm_tsc_scaling_ratio_frac_bits = 32; } - if (boot_cpu_has(X86_FEATURE_SEV)) + if (boot_cpu_has(X86_FEATURE_SEV) && + IS_ENABLED(CONFIG_KVM_AMD_SEV)) sev_hardware_setup(); if (nested) {
The config option can be used to enable SEV support on AMD Processors. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: Borislav Petkov <bp@suse.de> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> --- arch/x86/kvm/Kconfig | 8 ++++++++ arch/x86/kvm/svm.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-)