Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Brijesh Singh <brijesh.singh@amd.com>
To: Borislav Petkov <bp@suse.de>
Cc: brijesh.singh@amd.com,
	Richard Weinberger <richard.weinberger@gmail.com>,
	Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	x86@kernel.org, kvm <kvm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Radim Krcmar <rkrcmar@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
	felix@feldspaten.org
Subject: Re: [PATCH] Use 'imply' with SEV Kconfig CRYPTO dependencies
Date: Tue, 19 Jun 2018 14:22:53 -0500	[thread overview]
Message-ID: <3953c12f-c2fe-5d1d-bee2-ac9a230300b8@amd.com> (raw)
In-Reply-To: <20180619094658.GB31750@zn.tnic>

Hi Boris,


On 06/19/2018 04:46 AM, Borislav Petkov wrote:
> On Thu, Jun 14, 2018 at 07:08:26AM -0500, Brijesh Singh wrote:
>> I think depends should look like this:
>>
>> config KVM_AMD_SEV
>>      def_bool y
>>      bool "AMD Secure Encrypted Virtualization (SEV) support"
>>      depends KVM_AMD && X86_64
>>      depends CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m)
> 
> CRYPTO_DEV_CCP_DD - this still doesn't belong here. KVM_AMD_SEV doesn't
> care about what kind of functionality the PSP needs to function and
> select it - it should only depend on a single symbol.
> 


It would be nice to have a single depends. But the main issue is, PSP 
support is provided through the ccp driver (aka CRYPTO_DEV_CCP_DD). 
Hence KVM_AMD_SEV need to have some level of dependency with ccp driver. 
This is to ensure that the ccp was 'y' when kvm-amd=y for SEV to work.


> Now, you can add a separate CRYPTO .config item which collects all
> required functionality for SEV guests and have KVM_AMD_SEV depend
> on that. Or a similar solution. But not have KVM_AMD_SEV poke into
> CRYPTO...PSP dependencies because it doesn't need to know about it.
> 


I am sorry but I am not able to follow you on how creating a separate 
CRYPTO .config item will solve this problem. Creating a separate config 
will be useful if we are okay with calling 'select' from kvm (i.e if 
kvm-amd is 'y' then all the symbols from crypto will be 'y').

I looked at other drivers where they have similar situation and it seems 
like solution is same as what I have used above.


-Brijesh

  reply	other threads:[~2018-06-19 19:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 15:12 [PATCH] Use 'imply' with SEV Kconfig CRYPTO dependencies Janakarajan Natarajan
2018-05-23 14:46 ` Borislav Petkov
2018-06-14  7:58   ` Richard Weinberger
2018-06-14 12:08     ` Brijesh Singh
2018-06-14 12:37       ` Felix Niederwanger
2018-06-19  9:46       ` Borislav Petkov
2018-06-19 19:22         ` Brijesh Singh [this message]
2018-06-19 19:43           ` Borislav Petkov
2018-06-19 20:46             ` Brijesh Singh
2018-06-19 21:32               ` Borislav Petkov
2018-06-19 21:44                 ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3953c12f-c2fe-5d1d-bee2-ac9a230300b8@amd.com \
    --to=brijesh.singh@amd.com \
    --cc=Janakarajan.Natarajan@amd.com \
    --cc=bp@suse.de \
    --cc=felix@feldspaten.org \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=richard.weinberger@gmail.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox