Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-09 Thread Paolo Bonzini
On 08/10/2018 19:32, Borislav Petkov wrote: > On Mon, Oct 08, 2018 at 02:52:46PM +, Singh, Brijesh wrote: >> Does it make sense to move all the SEV specific code in svm-sev.c ? >> I am looking to add SEV migration support very soon, and can see >> myself adding more SEV command handling which

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-09 Thread Paolo Bonzini
On 08/10/2018 19:32, Borislav Petkov wrote: > On Mon, Oct 08, 2018 at 02:52:46PM +, Singh, Brijesh wrote: >> Does it make sense to move all the SEV specific code in svm-sev.c ? >> I am looking to add SEV migration support very soon, and can see >> myself adding more SEV command handling which

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-08 Thread Borislav Petkov
On Mon, Oct 08, 2018 at 02:52:46PM +, Singh, Brijesh wrote: > Does it make sense to move all the SEV specific code in svm-sev.c ? > I am looking to add SEV migration support very soon, and can see > myself adding more SEV command handling which will grow svm.c further. Amen to that - svm.c is

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-08 Thread Borislav Petkov
On Mon, Oct 08, 2018 at 02:52:46PM +, Singh, Brijesh wrote: > Does it make sense to move all the SEV specific code in svm-sev.c ? > I am looking to add SEV migration support very soon, and can see > myself adding more SEV command handling which will grow svm.c further. Amen to that - svm.c is

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-08 Thread Singh, Brijesh
On 10/08/2018 06:27 AM, Paolo Bonzini wrote: > On 06/10/2018 22:43, Guenter Roeck wrote: >>> > Maybe this works as well?  I haven't tested it yet: > I am sure there are many possible solutions. I would personally prefer one that enforces KVM_AMD=m with CRYPTO_DEV_CCP_DD=m,

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-08 Thread Singh, Brijesh
On 10/08/2018 06:27 AM, Paolo Bonzini wrote: > On 06/10/2018 22:43, Guenter Roeck wrote: >>> > Maybe this works as well?  I haven't tested it yet: > I am sure there are many possible solutions. I would personally prefer one that enforces KVM_AMD=m with CRYPTO_DEV_CCP_DD=m,

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-08 Thread Paolo Bonzini
On 06/10/2018 22:43, Guenter Roeck wrote: >> Maybe this works as well?  I haven't tested it yet: >>> I am sure there are many possible solutions. I would personally >>> prefer one >>> that enforces KVM_AMD=m with CRYPTO_DEV_CCP_DD=m, but that is just me. >> >> Well, KVM_AMD=y is a

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-08 Thread Paolo Bonzini
On 06/10/2018 22:43, Guenter Roeck wrote: >> Maybe this works as well?  I haven't tested it yet: >>> I am sure there are many possible solutions. I would personally >>> prefer one >>> that enforces KVM_AMD=m with CRYPTO_DEV_CCP_DD=m, but that is just me. >> >> Well, KVM_AMD=y is a

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-06 Thread Guenter Roeck
Hi Paolo, On 10/05/2018 03:18 PM, Paolo Bonzini wrote: On 06/10/2018 00:03, Guenter Roeck wrote: This should be handled by config KVM_AMD_SEV def_bool y bool "AMD Secure Encrypted Virtualization (SEV) support" depends on KVM_AMD && X86_64 depends on

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-06 Thread Guenter Roeck
Hi Paolo, On 10/05/2018 03:18 PM, Paolo Bonzini wrote: On 06/10/2018 00:03, Guenter Roeck wrote: This should be handled by config KVM_AMD_SEV def_bool y bool "AMD Secure Encrypted Virtualization (SEV) support" depends on KVM_AMD && X86_64 depends on

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-05 Thread Paolo Bonzini
On 06/10/2018 00:03, Guenter Roeck wrote: >> This should be handled by >> >> config KVM_AMD_SEV >> def_bool y >> bool "AMD Secure Encrypted Virtualization (SEV) support" >> depends on KVM_AMD && X86_64 >> depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y &&

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-05 Thread Paolo Bonzini
On 06/10/2018 00:03, Guenter Roeck wrote: >> This should be handled by >> >> config KVM_AMD_SEV >> def_bool y >> bool "AMD Secure Encrypted Virtualization (SEV) support" >> depends on KVM_AMD && X86_64 >> depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y &&

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-05 Thread Guenter Roeck
On Fri, Oct 05, 2018 at 10:41:55PM +0200, Paolo Bonzini wrote: > On 05/10/2018 20:46, Guenter Roeck wrote: > > 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

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-05 Thread Guenter Roeck
On Fri, Oct 05, 2018 at 10:41:55PM +0200, Paolo Bonzini wrote: > On 05/10/2018 20:46, Guenter Roeck wrote: > > 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

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-05 Thread Paolo Bonzini
On 05/10/2018 20:46, Guenter Roeck wrote: > 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

Re: [PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-05 Thread Paolo Bonzini
On 05/10/2018 20:46, Guenter Roeck wrote: > 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

[PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-05 Thread Guenter Roeck
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

[PATCH] KVM: X86: Add missing KVM_AMD dependency

2018-10-05 Thread Guenter Roeck
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