From patchwork Fri Feb 7 22:03:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Mukhin X-Patchwork-Id: 13965999 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A9E1C0219D for ; Fri, 7 Feb 2025 22:03:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.884063.1293867 (Exim 4.92) (envelope-from ) id 1tgWRv-0005Qd-Bu; Fri, 07 Feb 2025 22:03:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 884063.1293867; Fri, 07 Feb 2025 22:03:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgWRv-0005QW-9R; Fri, 07 Feb 2025 22:03:47 +0000 Received: by outflank-mailman (input) for mailman id 884063; Fri, 07 Feb 2025 22:03:45 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgWRs-0005QK-MC for xen-devel@lists.xenproject.org; Fri, 07 Feb 2025 22:03:45 +0000 Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 642c1b26-e59f-11ef-b3ef-695165c68f79; Fri, 07 Feb 2025 23:03:41 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 642c1b26-e59f-11ef-b3ef-695165c68f79 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=ylfen2wamra23moezntanaucte.protonmail; t=1738965820; x=1739225020; bh=qLwORsXQ/fz16eGds0srU91tSd+MVBDLpltzvtPapis=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=RjuBplT+SGoPnCdsivFi8iS/2JAV83J7rfvoUYdckZAZtgfshmonLlJGF90Tk++2Q sM01bjE3zVOqvDJtxh69pGdRzk1q9/rAQr6NeQasmfCHI/UWrjmGn5Fev2cRKkOZNw EgoPSlsAmqauSygbltm5vO9aL8J0+LIYTDzrtov63vwfzKWJqktpK/mdVk4XeYZolW HMOBewEb6QfnIOBG0HDW9F3iZ7BmCmRGOIfeJNSsCTzd8vyMb8RpR2FryCcNsvXQm7 opS1EiU+l6xf0RDx1QXh0vcXC5poVCbVAHjnGGuFjHRlij2/xk5UKDM25EAIZWpMMF c1Xda8Gnm8xeQ== Date: Fri, 07 Feb 2025 22:03:35 +0000 To: xen-devel@lists.xenproject.org From: dmkhn@proton.me Cc: andrew.cooper3@citrix.com, anthony.perard@vates.tech, jbeulich@suse.com, julien@xen.org, michal.orzel@amd.com, roger.pau@citrix.com, sstabellini@kernel.org, dmukhin@ford.com Subject: [PATCH] x86/hvm: add HVM-specific Kconfig Message-ID: <20250207220302.4190210-1-dmukhin@ford.com> Feedback-ID: 123220910:user:proton X-Pm-Message-ID: f2fa37a8f5635486a761c1645273e1e5d4868cf8 MIME-Version: 1.0 Add separate menu for configuring HVM build-time settings to help organizing HVM-specific options. Signed-off-by: Denis Mukhin --- Link to the original patch: https://lore.kernel.org/xen-devel/20250103-vuart-ns8250-v3-v1-20-c5d36b31d66c@ford.com/ --- --- xen/arch/x86/Kconfig | 76 +--------------------------------------- xen/arch/x86/hvm/Kconfig | 73 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 75 deletions(-) create mode 100644 xen/arch/x86/hvm/Kconfig diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 9cdd04721a..37362c205d 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -30,7 +30,6 @@ config X86 select HAS_SCHED_GRANULARITY select HAS_UBSAN select HAS_VMAP - select HAS_VPCI if HVM select NEEDS_LIBELF config ARCH_DEFCONFIG @@ -107,42 +106,7 @@ config PV_LINEAR_PT If unsure, say Y. -config HVM - bool "HVM support" - depends on !PV_SHIM_EXCLUSIVE - default !PV_SHIM - select COMPAT - select IOREQ_SERVER - select MEM_ACCESS_ALWAYS_ON - help - Interfaces to support HVM domains. HVM domains require hardware - virtualisation extensions (e.g. Intel VT-x, AMD SVM), but can boot - guests which have no specific Xen knowledge. - - This option is needed if you want to run HVM or PVH domains. - - If unsure, say Y. - -config AMD_SVM - bool "AMD-V" if EXPERT - depends on HVM - default y - help - Enables virtual machine extensions on platforms that implement the - AMD Virtualization Technology (AMD-V). - If your system includes a processor with AMD-V support, say Y. - If in doubt, say Y. - -config INTEL_VMX - bool "Intel VT-x" if EXPERT - depends on HVM - default y - select ARCH_VCPU_IOREQ_COMPLETION - help - Enables virtual machine extensions on platforms that implement the - Intel Virtualization Technology (Intel VT-x). - If your system includes a processor with Intel VT-x support, say Y. - If in doubt, say Y. +source "arch/x86/hvm/Kconfig" config XEN_SHSTK bool "Supervisor Shadow Stacks" @@ -201,25 +165,6 @@ config BIGMEM If unsure, say N. -config HVM_FEP - bool "HVM Forced Emulation Prefix support (UNSUPPORTED)" if UNSUPPORTED - default DEBUG - depends on HVM - help - - Compiles in a feature that allows HVM guest to arbitrarily - exercise the instruction emulator. - - This feature can only be enabled during boot time with - appropriate hypervisor command line option. Please read - hypervisor command line documentation before trying to use - this feature. - - This is strictly for testing purposes, and not appropriate - for use in production. - - If unsure, say N. - config TBOOT bool "Xen tboot support (UNSUPPORTED)" depends on INTEL && UNSUPPORTED @@ -348,14 +293,6 @@ config HYPERV_GUEST endif -config MEM_PAGING - bool "Xen memory paging support (UNSUPPORTED)" if UNSUPPORTED - depends on HVM - -config MEM_SHARING - bool "Xen memory sharing support (UNSUPPORTED)" if UNSUPPORTED - depends on HVM - config REQUIRE_NX bool "Require NX (No eXecute) support" help @@ -372,17 +309,6 @@ config REQUIRE_NX was unavailable. However, if enabled, Xen will no longer boot on any CPU which is lacking NX support. -config ALTP2M - bool "Alternate P2M support" if EXPERT - depends on INTEL_VMX - default y - help - Alternate-p2m allows a guest to manage multiple p2m guest physical - "memory views" (as opposed to a single p2m). - Useful for memory introspection. - - If unsure, stay with defaults. - endmenu source "common/Kconfig" diff --git a/xen/arch/x86/hvm/Kconfig b/xen/arch/x86/hvm/Kconfig new file mode 100644 index 0000000000..cbfeb5e4f4 --- /dev/null +++ b/xen/arch/x86/hvm/Kconfig @@ -0,0 +1,73 @@ +menuconfig HVM + bool "HVM support" + depends on !PV_SHIM_EXCLUSIVE + default !PV_SHIM + select COMPAT + select HAS_VPCI + select IOREQ_SERVER + select MEM_ACCESS_ALWAYS_ON + help + Interfaces to support HVM domains. HVM domains require hardware + virtualisation extensions (e.g. Intel VT-x, AMD SVM), but can boot + guests which have no specific Xen knowledge. + + This option is needed if you want to run HVM or PVH domains. + + If unsure, say Y. + +if HVM + +config AMD_SVM + bool "AMD-V" if EXPERT + default y + help + Enables virtual machine extensions on platforms that implement the + AMD Virtualization Technology (AMD-V). + If your system includes a processor with AMD-V support, say Y. + If in doubt, say Y. + +config INTEL_VMX + bool "Intel VT-x" if EXPERT + default y + select ARCH_VCPU_IOREQ_COMPLETION + help + Enables virtual machine extensions on platforms that implement the + Intel Virtualization Technology (Intel VT-x). + If your system includes a processor with Intel VT-x support, say Y. + If in doubt, say Y. + +config ALTP2M + bool "Alternate P2M support" if EXPERT + depends on INTEL_VMX + default y + help + Alternate-p2m allows a guest to manage multiple p2m guest physical + "memory views" (as opposed to a single p2m). + Useful for memory introspection. + + If unsure, stay with defaults. + +config MEM_PAGING + bool "Xen memory paging support (UNSUPPORTED)" if UNSUPPORTED + +config MEM_SHARING + bool "Xen memory sharing support (UNSUPPORTED)" if UNSUPPORTED + +config HVM_FEP + bool "HVM Forced Emulation Prefix support (UNSUPPORTED)" if UNSUPPORTED + default DEBUG + help + Compiles in a feature that allows HVM guest to arbitrarily + exercise the instruction emulator. + + This feature can only be enabled during boot time with + appropriate hypervisor command line option. Please read + hypervisor command line documentation before trying to use + this feature. + + This is strictly for testing purposes, and not appropriate + for use in production. + + If unsure, say N. + +endif