Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5430259ybp; Mon, 14 Oct 2019 22:36:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxs1IZRj/1xtE8XMthpNPVuO/HB+YJ8yWPsL+s20lqtXFFBR0DhtAVDO2VS1k6Xf/xxYiYy X-Received: by 2002:aa7:d304:: with SMTP id p4mr31793280edq.224.1571117777518; Mon, 14 Oct 2019 22:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571117777; cv=none; d=google.com; s=arc-20160816; b=qiAvgvPAEFQhaBhcbFxBaAku6dRPzsLEvG3Zi7WjBRMdPY7x9wE+Dv6c9OCm65dujM ee161s0/r9Lbm/Gjb90947fTenzt14V9TfXstTdwE0Jxj1fMpRyGmqtAKrQbaLPNV/au CAFQCvPoK+m3hTo54QmAWCIQOmAPhyfOf+cVRTotq3tKCR5yDbfkJsz7t+7RK+fvtY0f UT0m6xm2pDqzxRVr90+6Re1hmvyAWOOWw+itesRl68Tn5FU3agTPxnt5PMA84a7hI6cJ OWk42NcnSWjx5pv/dxTk+UW8PnrAhUuEakrUfS5CuhJUtWuDEWVhNM+yWPl2eQ+T7A7+ /mJQ== 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=9IQPnTAZCUR4EL33FjeE3odm+93DLk9K9yqtgqbLgls=; b=R5PUezmaQ7ObbzDqO8Pja/+0TSouoz78nqNaHqoA+qvV4+HMXzxzr+/aKiFmGRMAGv YZqIS/fPEqan0bN/tJk3sJmOT32Tz+nSY3r8S/sDC9JKwr7vYETCz09pfkwlWaNbi/t/ LoPtx6DV3+mTP/ScQu5BwMG2FWRcVLCbUCE65/0mMW/F1gfIfjeYxgCz61bRSC217PiX qTYmr+NYAOpTu9Rp+oKpCn8RnktbHlOpMMCTqSSGs+TqhrLneXUVzYkjYFB/9G70PmJt nwGp4HugTH4gK9DhTQw7+AAlxxs23VXuSzzhiH84ecWGKcicWMWD0h6B/1gRIzJ3YKE6 geew== 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 gf5si12348665ejb.324.2019.10.14.22.35.54; Mon, 14 Oct 2019 22:36:17 -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 S1727706AbfJODQV (ORCPT + 99 others); Mon, 14 Oct 2019 23:16:21 -0400 Received: from mga09.intel.com ([134.134.136.24]:22884 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727697AbfJODQV (ORCPT ); Mon, 14 Oct 2019 23:16:21 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 20:16:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,297,1566889200"; d="scan'208";a="208093307" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.41]) by fmsmga001.fm.intel.com with ESMTP; 14 Oct 2019 20:16:19 -0700 Date: Mon, 14 Oct 2019 20:16:19 -0700 From: Sean Christopherson To: Andrea Arcangeli Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Vitaly Kuznetsov Subject: Re: [PATCH 02/14] KVM: monolithic: x86: disable linking vmx and svm at the same time into the kernel Message-ID: <20191015031619.GD24895@linux.intel.com> References: <20190928172323.14663-1-aarcange@redhat.com> <20190928172323.14663-3-aarcange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190928172323.14663-3-aarcange@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 Sat, Sep 28, 2019 at 01:23:11PM -0400, Andrea Arcangeli wrote: > Linking both vmx and svm into the kernel at the same time isn't > possible anymore or the kvm_x86/kvm_x86_pmu external function names > would collide. > > Reported-by: kbuild test robot > Signed-off-by: Andrea Arcangeli > --- > arch/x86/kvm/Kconfig | 24 ++++++++++++++++++++++-- > 1 file changed, 22 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig > index 840e12583b85..e1601c54355e 100644 > --- a/arch/x86/kvm/Kconfig > +++ b/arch/x86/kvm/Kconfig > @@ -59,9 +59,29 @@ config KVM > > If unsure, say N. > > +if KVM=y Hmm, I see why the previous patch left KVM as a tristate. I tried a variety of hacks to let KVM be a bool but nothing worked. > + > +choice > + prompt "To link KVM statically into the kernel you need to choose" > + help > + In order to build a kernel with support for both AMD and Intel > + CPUs, you need to set CONFIG_KVM=m. > + > +config KVM_AMD_STATIC > + select KVM_AMD > + bool "Link KVM AMD statically into the kernel" > + > +config KVM_INTEL_STATIC > + select KVM_INTEL > + bool "Link KVM Intel statically into the kernel" The prompt and choice text is way too long, e.g. in my usual window it cuts off at: To link KVM statically into the kernel you need to choose (Link KVM Intel statically into Without the full text (the -> at the end), it's not obvious it's an option menu (AMD was selected by default for me and it took me a second to figure out what to hit enter on). 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" endchoice The ends up looking like: <*> Kernel-based Virtual Machine (KVM) support KVM built-in support (KVM Intel) ---> -*- KVM for Intel processors support > + > +endchoice > + > +endif > + > config KVM_INTEL > tristate "KVM for Intel processors support" > - depends on KVM > + depends on (KVM && !KVM_AMD_STATIC) || KVM_INTEL_STATIC > # for perf_guest_get_msrs(): > depends on CPU_SUP_INTEL > ---help--- > @@ -73,7 +93,7 @@ config KVM_INTEL > > config KVM_AMD > tristate "KVM for AMD processors support" > - depends on KVM > + depends on (KVM && !KVM_INTEL_STATIC) || KVM_AMD_STATIC > ---help--- > Provides support for KVM on AMD processors equipped with the AMD-V > (SVM) extensions.