Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4953319ybn; Sat, 28 Sep 2019 10:25:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9yXWNA5l0AjMMa+4kWwXK2TAuLkYitgl8o49sVfcMI/Su8n3SkMN8O7Ah9seuoSLVKwtX X-Received: by 2002:a50:979b:: with SMTP id e27mr10735797edb.173.1569691505735; Sat, 28 Sep 2019 10:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569691505; cv=none; d=google.com; s=arc-20160816; b=StSPshzrJv0IJhTuu92B5MLawDQ+doGUbuyYHNAJ88Tg7059oYQv0qNYUJGBYA/T8E QVg4Ri345Cwm/04S9rwULu1fJQ+g2efi9xQTy1fiVp7ykub/rULqMKa2IMhyUmP1Lfvp kUGAGpZ4z/8QMSvtYeCaTekt9fzn1rkNtp8qRAzW6te5gssjgjaK4/qKDk5tEqWFl9Cq mdNIXMRPbKftkJ932yLvlorvZwx02fYHMUTN8AP1dLf68MAlyt8soolUXK4gDMKQ3g4Z n+Ak9uxJHIvbEDxHvPcmGc+PCBVv+NdSETY7L6OwDOJVeX6FQZ1WQnfvj6wm+5t2yqGJ n1aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mD8hQ1OU4rrynK7/G5B2X+wlyOeqEyeN8GjJCc9/T2U=; b=j3DCDG92PyaRVmlUfE4OzzwyzW6ykyqFKVAfIg6dbtgY+m5UOCxOrznUCGPdhEqRbD gPA/G1PqQsw+cdkMkHNVfYDgKXfixT1K4y9D3p77C5fOTwTeV+MMVvoTAFq6KhZx8z8b vsWfpmZRusQt8Kxhu5mttg7S3cpK6jwZXnHs850lUt8RnbPrRdM/nT79fj7JF3l2Jmu8 XWxQTfK2M58yfs5Qw91vWUyyjsQCqhe4nQw8sASlQQohQA+vA8DNRaoE4S8zvFyWPl2y L7op3DG39g8R8rBFLg7U06lpg5rxfIRp0DPvkXjFzFXC+JUkRNcyVkZ1C9Ewxd1LTUMR ETVQ== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si3728970edv.76.2019.09.28.10.24.41; Sat, 28 Sep 2019 10:25:05 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729003AbfI1RYA (ORCPT + 99 others); Sat, 28 Sep 2019 13:24:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47872 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728788AbfI1RX0 (ORCPT ); Sat, 28 Sep 2019 13:23:26 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13F39898104; Sat, 28 Sep 2019 17:23:26 +0000 (UTC) Received: from mail (ovpn-125-159.rdu2.redhat.com [10.10.125.159]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4839260C4B; Sat, 28 Sep 2019 17:23:24 +0000 (UTC) From: Andrea Arcangeli To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Paolo Bonzini , Vitaly Kuznetsov , Sean Christopherson Subject: [PATCH 02/14] KVM: monolithic: x86: disable linking vmx and svm at the same time into the kernel Date: Sat, 28 Sep 2019 13:23:11 -0400 Message-Id: <20190928172323.14663-3-aarcange@redhat.com> In-Reply-To: <20190928172323.14663-1-aarcange@redhat.com> References: <20190928172323.14663-1-aarcange@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Sat, 28 Sep 2019 17:23:26 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 + +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" + +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.