lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191015152305.GB15015@linux.intel.com>
Date:   Tue, 15 Oct 2019 08:23:05 -0700
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Andrea Arcangeli <aarcange@...hat.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Vitaly Kuznetsov <vkuznets@...hat.com>
Subject: Re: [PATCH 02/14] KVM: monolithic: x86: disable linking vmx and svm
 at the same time into the kernel

On Tue, Oct 15, 2019 at 10:21:59AM +0200, Paolo Bonzini wrote:
> On 15/10/19 05:16, Sean Christopherson wrote:
> > I think short and sweet is enough for the prompt, with the details of how
> > build both buried in the help text.
> > 
> > choice
> > 	prompt "KVM built-in support"
> > 	help
> > 	  Here be a long and detailed help text.
> > 
> > config KVM_AMD_STATIC
> > 	select KVM_AMD
> > 	bool "KVM AMD"
> > 
> > config KVM_INTEL_STATIC
> > 	select KVM_INTEL
> > 	bool "KVM Intel"
> 
> Or even just
> 
> 	bool "AMD"
> 	...
> 	bool "Intel"

Ya.

> > endchoice
> > 
> > The ends up looking like:
> > 
> >    <*>   Kernel-based Virtual Machine (KVM) support
> >            KVM built-in support (KVM Intel)  --->
> >    -*-   KVM for Intel processors support
> 
> On top of this, it's also nice to hide the KVM_INTEL/KVM_AMD prompts if
> linking statically.  You can achieve that with
> 
> config KVM_INTEL
>     tristate
>     prompt "KVM for Intel processors support" if KVM=m

That's painfully obvious now that I see it.  I always forget about putting
conditionals at the end...

>     depends on (KVM=m && m) || KVM_INTEL_STATIC
> 
> config KVM_AMD
>     tristate
>     prompt "KVM for AMD processors support" if KVM=m
>     depends on (KVM=m && m) || KVM_AMD_STATIC
> 
> The left side of the "||" ensures that, if KVM=m, you can only choose
> module build for both KVM_INTEL and KVM_AMD.  Having just "depends on
> KVM" would allow a pre-existing .config to choose the now-invalid
> combination
> 
> 	CONFIG_KVM=y
> 	CONFIG_KVM_INTEL=y
> 	CONFIG_KVM_AMD=y
> 
> The right side of the "||" part is just for documentation, to avoid that
> a selected symbol does not satisfy its dependencies.
> 
> Thanks,
> 
> Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ