From nobody Sat Nov 23 03:44:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=quarantine dis=quarantine) header.from=epam.com ARC-Seal: i=1; a=rsa-sha256; t=1717412884; cv=none; d=zohomail.com; s=zohoarc; b=KnI8xKLSgb0HiKp7Gug3sDA4s+Or4yuhh9SHBGlH/e4KZOunRgS6Z9rcW+e7D9fp3nBB/dvA/D1kuIr4/32tmTVO8IeXlyXTMCv7W9UwcgfxUiu+vx7ljioC/kKj9B0ehkerU7hfLQbGIiOLpqBTZHZUdPRk41HbQ/XJeQ7FNN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717412884; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3odzLgaXLrw028eUZtro4lyei7jeNpZtZCqyQsygZrU=; b=NvujNop4fF7XPq5VNiHRIc2S2gmJx9OA7eNO7syZpkz6Uj316HMxK0I1QygyHd9inP1iULGrmT/1h4oRKzuG+uqnnqpSmBQM+OkFczX7S7is6eQsqmejUavlGnJX69vIkP9IlNgzleL6f9Q8s4flJGkraLAxBhEymR+jbPY1Yi8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=quarantine dis=quarantine) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1717412884486941.6039752246508; Mon, 3 Jun 2024 04:08:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.734803.1140876 (Exim 4.92) (envelope-from ) id 1sE5XY-0007IF-Gj; Mon, 03 Jun 2024 11:07:48 +0000 Received: by outflank-mailman (output) from mailman id 734803.1140876; Mon, 03 Jun 2024 11:07:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sE5XY-0007I8-Dt; Mon, 03 Jun 2024 11:07:48 +0000 Received: by outflank-mailman (input) for mailman id 734803; Mon, 03 Jun 2024 11:07:47 +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 1sE5XW-0007I2-UT for xen-devel@lists.xenproject.org; Mon, 03 Jun 2024 11:07:46 +0000 Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7fbc3c67-2199-11ef-b4bb-af5377834399; Mon, 03 Jun 2024 13:07:44 +0200 (CEST) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 60D4131584; Mon, 3 Jun 2024 07:07:42 -0400 (EDT) (envelope-from sakib@darkstar.site) Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 59D7B31583; Mon, 3 Jun 2024 07:07:42 -0400 (EDT) (envelope-from sakib@darkstar.site) Received: from localhost (unknown [185.130.54.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 13F4931582; Mon, 3 Jun 2024 07:07:39 -0400 (EDT) (envelope-from sakib@darkstar.site) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 7fbc3c67-2199-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=sasl; bh=x+pyBWLmT+o8FD/HTumT5AioH ODe7ZP15Is2zs12tZU=; b=Qst45r6mx/Nd4gbGNoc2Igg+WPHgY8G64WZPpHSHi h7ELaEBkZJiD1Wia1jaLYWYH56tfpnYy+2d6XAce68R5CX5d8mFFuCoCYpsCJhY8 m1rWr4IpzxWQk6/BiyhuiQJXncJhojp1kOItgDO+nlq0rwFgyczD5wMprbGtSuTK Hc= From: Sergiy Kibrik To: xen-devel@lists.xenproject.org Cc: Xenia Ragiadakou , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , George Dunlap , Stefano Stabellini , Xenia Ragiadakou , Sergiy Kibrik Subject: [XEN PATCH v3 01/16] x86: introduce AMD-V and Intel VT-x Kconfig options Date: Mon, 3 Jun 2024 14:07:35 +0300 Message-Id: <72439ab1749b4bdca3c74a7d2af0254d23626797.1717410850.git.Sergiy_Kibrik@epam.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Pobox-Relay-ID: 7D7F25B4-2199-11EF-AD40-8F8B087618E4-90055647!pb-smtp21.pobox.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @pobox.com) X-ZM-MESSAGEID: 1717412886449100001 Content-Type: text/plain; charset="utf-8" From: Xenia Ragiadakou Introduce two new Kconfig options, SVM and VMX, to allow code specific to each virtualization technology to be separated and, when not required, stripped. CONFIG_SVM will be used to enable virtual machine extensions on platforms t= hat implement the AMD Virtualization Technology (AMD-V). CONFIG_VMX will be used to enable virtual machine extensions on platforms t= hat implement the Intel Virtualization Technology (Intel VT-x). Both features depend on HVM support. Since, at this point, disabling any of them would cause Xen to not compile, the options are enabled by default if HVM and are not selectable by the use= r. No functional change intended. Signed-off-by: Xenia Ragiadakou Signed-off-by: Sergiy Kibrik Acked-by: Jan Beulich --- changes in v3: - tag added changes in v2: - simplify kconfig expression to def_bool HVM - keep file list in Makefile in alphabetical order changes in v1: - change kconfig option name AMD_SVM/INTEL_VMX -> SVM/VMX --- xen/arch/x86/Kconfig | 6 ++++++ xen/arch/x86/hvm/Makefile | 4 ++-- xen/arch/x86/mm/Makefile | 3 ++- xen/arch/x86/mm/hap/Makefile | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 7e03e4bc55..8c9f8431f0 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -122,6 +122,12 @@ config HVM =20 If unsure, say Y. =20 +config SVM + def_bool HVM + +config VMX + def_bool HVM + config XEN_SHSTK bool "Supervisor Shadow Stacks" depends on HAS_AS_CET_SS diff --git a/xen/arch/x86/hvm/Makefile b/xen/arch/x86/hvm/Makefile index 3464191544..8434badc64 100644 --- a/xen/arch/x86/hvm/Makefile +++ b/xen/arch/x86/hvm/Makefile @@ -1,5 +1,5 @@ -obj-y +=3D svm/ -obj-y +=3D vmx/ +obj-$(CONFIG_SVM) +=3D svm/ +obj-$(CONFIG_VMX) +=3D vmx/ obj-y +=3D viridian/ =20 obj-y +=3D asid.o diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index 0803ac9297..0128ca7ab6 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_MEM_SHARING) +=3D mem_sharing.o obj-$(CONFIG_HVM) +=3D nested.o obj-$(CONFIG_HVM) +=3D p2m.o obj-y +=3D p2m-basic.o -obj-$(CONFIG_HVM) +=3D p2m-ept.o p2m-pod.o p2m-pt.o +obj-$(CONFIG_VMX) +=3D p2m-ept.o +obj-$(CONFIG_HVM) +=3D p2m-pod.o p2m-pt.o obj-y +=3D paging.o obj-y +=3D physmap.o diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index 8ef54b1faa..98c8a87819 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -3,4 +3,4 @@ obj-y +=3D guest_walk_2.o obj-y +=3D guest_walk_3.o obj-y +=3D guest_walk_4.o obj-y +=3D nested_hap.o -obj-y +=3D nested_ept.o +obj-$(CONFIG_VMX) +=3D nested_ept.o --=20 2.25.1