Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6017189ybp; Tue, 15 Oct 2019 08:24:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVqDQB/R09YD20Tz0uAdD3UNzBsv9gUWf2ojMv+qQoTAOTyAgkEY6Vesx/Y8a4R+92aEiI X-Received: by 2002:a17:906:4cd2:: with SMTP id q18mr11626019ejt.319.1571153076214; Tue, 15 Oct 2019 08:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571153076; cv=none; d=google.com; s=arc-20160816; b=RzrAkYYNhF1ycgb+mk1GSN+0sXIP0WcJ0BlAFJVrkNvnlRbs2fvjMG4jM45s2glQ52 fTNeaV45vxduNs6r7mTsmIB6GfRoUPselZHqOnup/xW3+4MNcM3D9ry51iSBaTOsgUIw qZQtn0CbySDkFfkpFGrnGON2v2VfGJWsT19BRutlJOWBmZIdiegXUYlZGmA/0KsVIjnL Iz+yO+moNpZ1dqVacOdZwjef+Inl/g6AOdPbdwwV7NPL+4EP7uOQcU09TS6LkO9oaVXS /jtrAewowKkWlEEbq7Lgt+EKDd+UsQTkq17zwvDkco4BJoYIZa5/BdJ58BxSTcmQ8K6V zVow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=kBaJpcaDgsSZXVC/4G4ms2l9euZX8k8RS2Xt8yPwJ/s=; b=aFBAMYKJJTU3ZQ+7xfDUR/3c7GyF7n6qmj3rHv8JxfkjjxZoQ3gQhcI5R1mbk2u66K m22qgy+Rpihr3x2VrKAFY95x/wWchamDMLaCnWKjXNfr2Myp2E91mgYDUb6geMON63ZS cu/bh4GlDuJ1NVOIS6N5Fg/TMUEs9Inkf84ZrkOeJFkN7fdli/Z3IAGpps8b4t8ow0WU AMMAxeo+XjnakvEJcYV8YrGMTaYMjZRP3f/AvmQ2K9EVYRTgkG/g3xmwo9DUrG+LA2rh k6xDjXDEpYstMQlZFoQyphjj5A0D2PGH/Wz3dvkMSgl62tI4jB9VGdW8z/xtrnI+h/Y4 YstA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g23si12382949ejm.398.2019.10.15.08.24.12; Tue, 15 Oct 2019 08:24:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387433AbfJOPXO (ORCPT + 99 others); Tue, 15 Oct 2019 11:23:14 -0400 Received: from mga07.intel.com ([134.134.136.100]:37513 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726523AbfJOPXO (ORCPT ); Tue, 15 Oct 2019 11:23:14 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 08:23:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,300,1566889200"; d="scan'208";a="220454839" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.41]) by fmsmga004.fm.intel.com with ESMTP; 15 Oct 2019 08:23:05 -0700 Date: Tue, 15 Oct 2019 08:23:05 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Andrea Arcangeli , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Vitaly Kuznetsov Subject: Re: [PATCH 02/14] KVM: monolithic: x86: disable linking vmx and svm at the same time into the kernel Message-ID: <20191015152305.GB15015@linux.intel.com> References: <20190928172323.14663-1-aarcange@redhat.com> <20190928172323.14663-3-aarcange@redhat.com> <20191015031619.GD24895@linux.intel.com> <94f1e36e-90b8-8b7d-57a5-031c65e415c4@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <94f1e36e-90b8-8b7d-57a5-031c65e415c4@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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