Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4143409pxb; Tue, 17 Nov 2020 12:27:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxtrl28qrgVlgZUInlrOHzaCGJn6kis0CfFCPBTZS2wsy4gsJtEltjYLFVFKYI+D6TTCgv X-Received: by 2002:a50:fa92:: with SMTP id w18mr22025186edr.44.1605644832601; Tue, 17 Nov 2020 12:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605644832; cv=none; d=google.com; s=arc-20160816; b=Guy4KTw+AzZvBK9/38w44cm/9LW+NqZaco+MAnjVOC+1VtkidRZHGmkhPiDHCiopLd tlLn25RPiSDGk9L7+KfNdpvKUsUmwGivseZ4vAbbcgN5DLq6qTCWHnwHPO9zosuuDqRv muMiXBluPLLS23q2ZsUszEHL93O/qCLWYkQMaLFW4ZRA6LarKfjrLVuM7pLNRE+FiMiz yQw5YCIpMacCYY33ysttp1yAa4z/Bp0b+XB29bB0h+YHOp5dwfIPYFRVH35PwJEHGOEb OKxCCTY+OnNW63oMQPxXrfrFoLDirDAFE8Auna10wQv23aia3EEfB9fQwWOE2oudEHoT TFnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=OvMJCKS+659/J4zVHFf8rb4hiHDbszON8tzQXuHrNhM=; b=cqgcKSso0i7CwE5cAq+mMtB0AWljLkodrQ9QpOySEFQPPjU5VnI0RdpzCptiwD+8cW Uc5Bc4626blzWVg8NhagNt69RHlrExsDbY920Wp/h5xZTRxQ7ijpzFWHDUcJGeuWESZX v6nfYftfQhatAKch1eCTBDHIRVAP1QOxZmR4Qnmb/l4+k3P4ddDvjEZQeD9k+YQZRZOK Pd313wk9+39U3wywskhKTvmx9swy6j2+U/MypWLFsdU2AIin89bfoBisI+TrRLhNvAx7 TtTtQ9oSubw9gwunGtOKp5RADeJiVnTBAJxZ23Ca9+TWb1tJxa/Z7kpo4TmSOh1yLyI2 7cEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si11169350edp.102.2020.11.17.12.26.49; Tue, 17 Nov 2020 12:27:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727137AbgKQUXm (ORCPT + 99 others); Tue, 17 Nov 2020 15:23:42 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:51667 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgKQUXl (ORCPT ); Tue, 17 Nov 2020 15:23:41 -0500 Received: from orion.localdomain ([95.118.38.12]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MPXMa-1ksvIj1mVO-00MgRQ; Tue, 17 Nov 2020 21:23:11 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dmitry.torokhov@gmail.com, derek.kiernan@xilinx.com, dragan.cvetic@xilinx.com, richardcochran@gmail.com, linux-hyperv@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 2/2] x86: make hyperv support optional Date: Tue, 17 Nov 2020 21:23:08 +0100 Message-Id: <20201117202308.7568-2-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201117202308.7568-1-info@metux.net> References: <20201117202308.7568-1-info@metux.net> X-Provags-ID: V03:K1:BgMdxQqz+4cbD/qdDNJN3Ul44DDzOcucX7OQQF5mExr0hrvibj3 jlliB9hkpyWQ7fm7aEw+TiHppj4aHIRMU9L4t32Dvpl/YQX1IyijLcrspy4r6AMsNX5hSv+ jKNM76P58FwQhs/mng8MWZsJ9jRzkL7LU++z4Ob0TSqVS9WERPnzEbSFK0HrmEaRGuLvjHd jFm4lD/jJpv5uxAJr8nMA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:3yLVPCypgnA=:XprJRzAno0MASne4OrR4Jl BvlRoNricagJ8yqm1/R8KWFUNWiw5MKakpnSNICGMP3BAKPjzauaR54ikOGfNdBPwk2BXnV3O xQtazhVh7AQRzZOGQGbj+1GeqCizu/94x8G7to+C9PdiEDI3JyrN2t/zyqdt290qxN3G7fteX L3klq1bkTACe7MnxhJqbfKe1HpCo053FYrXFqWvYbdfkJ4e/lRVSdvVbIJ+ZAiLRQiuYFMeQI RX8CKav8e/oAd53h+thfVKcq8FY583xS7mYYI2n3vo8sgkxarUrnXNlWEQf3EFeN7QyII4UZy ZARR0IKd+qTKmkS35p85LOljKdpJ7gKmWRvRan3/A+yxsFlao0w7a+V9MwkthXrPbcADoyCPY Rf55RS6yA+eoFnonzF6AE3bZN6QI0dnRpK002FaACaLrUwxxNiGwI7CFewuWK Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make it possible to opt-out from hyperv support. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/x86/Kconfig | 7 +++++++ arch/x86/kernel/cpu/Makefile | 4 ++-- arch/x86/kernel/cpu/hypervisor.c | 2 ++ drivers/hv/Kconfig | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c227c1fa0091..60aab344d6ab 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -808,6 +808,13 @@ config VMWARE_GUEST This option enables several optimizations for running under the VMware hypervisor. +config HYPERV_GUEST + bool "HyperV Guest support" + default y + help + This option enables several optimizations for running under the + HyperV hypervisor. + config KVM_GUEST bool "KVM Guest support (including kvmclock)" depends on PARAVIRT diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index a615b0152bf0..5536b801cb44 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile @@ -51,9 +51,9 @@ obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/ obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o -obj-$(CONFIG_HYPERVISOR_GUEST) += hypervisor.o mshyperv.o +obj-$(CONFIG_HYPERVISOR_GUEST) += hypervisor.o obj-$(CONFIG_VMWARE_GUEST) += vmware.o - +obj-$(CONFIG_HYPERV_GUEST) += mshyperv.o obj-$(CONFIG_ACRN_GUEST) += acrn.o ifdef CONFIG_X86_FEATURE_NAMES diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c index c0e770a224aa..32d6b2084d05 100644 --- a/arch/x86/kernel/cpu/hypervisor.c +++ b/arch/x86/kernel/cpu/hypervisor.c @@ -37,7 +37,9 @@ static const __initconst struct hypervisor_x86 * const hypervisors[] = #ifdef CONFIG_VMWARE_GUEST &x86_hyper_vmware, #endif +#ifdef CONFIG_HYPERV_GUEST &x86_hyper_ms_hyperv, +#endif #ifdef CONFIG_KVM_GUEST &x86_hyper_kvm, #endif diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig index 79e5356a737a..7b3094c59a81 100644 --- a/drivers/hv/Kconfig +++ b/drivers/hv/Kconfig @@ -4,7 +4,7 @@ menu "Microsoft Hyper-V guest support" config HYPERV tristate "Microsoft Hyper-V client drivers" - depends on X86 && ACPI && X86_LOCAL_APIC && HYPERVISOR_GUEST + depends on X86 && ACPI && X86_LOCAL_APIC && HYPERV_GUEST select PARAVIRT select X86_HV_CALLBACK_VECTOR help -- 2.11.0