From patchwork Mon Feb 13 14:57:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xenia Ragiadakou X-Patchwork-Id: 13138547 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 CA408C6379F for ; Mon, 13 Feb 2023 14:58:24 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.494621.764829 (Exim 4.92) (envelope-from ) id 1pRaHa-0004Mh-Qq; Mon, 13 Feb 2023 14:58:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 494621.764829; Mon, 13 Feb 2023 14:58:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pRaHa-0004MP-JG; Mon, 13 Feb 2023 14:58:18 +0000 Received: by outflank-mailman (input) for mailman id 494621; Mon, 13 Feb 2023 14:58:17 +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 1pRaHY-0001Ha-Vn for xen-devel@lists.xenproject.org; Mon, 13 Feb 2023 14:58:17 +0000 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [2a00:1450:4864:20::52b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d7fe0c09-abae-11ed-93b5-47a8fe42b414; Mon, 13 Feb 2023 15:58:15 +0100 (CET) Received: by mail-ed1-x52b.google.com with SMTP id eq11so13272291edb.6 for ; Mon, 13 Feb 2023 06:58:15 -0800 (PST) Received: from uni.router.wind (adsl-89.109.242.225.tellas.gr. [109.242.225.89]) by smtp.googlemail.com with ESMTPSA id v1-20020a50a441000000b004aab66d34c7sm6787617edb.7.2023.02.13.06.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:58:14 -0800 (PST) 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: d7fe0c09-abae-11ed-93b5-47a8fe42b414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z4XxNzz7rqsriFu3pt/xtkLxxWkI8GAzMmbRJ9k+P3k=; b=LIVU7Nn9rKw1Sx2lMV6AQsc501lDTNYf4YUZT8T+RQe3HEnEcWlUAkLkCDBPHdyeSn XSYCHC2ioaJPSJBc9pmsL4o4K9FZBIOKyLkM+ScNiB2zZEifYfYubSp1CnZJGEdhwE6x PHhKCUpimVfjTaqgC101oXU7Im8XBkpB4N8GxkE9RsIvnkNhzgp+nD1yLT2wWwD7jvqj o6LRjEXXX8Qw1wVsBF/nMyLFE6X4ngRMNvQJ9U4AEaUZ3NA4QZjiCId7fNHfCavXhEWm aqdlxa7HOc8BCSlnKFYsicDqhdiUQAVxRU7nnmyfSja0TYVaUVx6q/crAORjbImsbOWF dYOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z4XxNzz7rqsriFu3pt/xtkLxxWkI8GAzMmbRJ9k+P3k=; b=RTHCgql5+CuBdg8LBKmmeiPQeOiuEGakkJluYntETneh5YBkzxlPoWB97cBKrWizf6 PKqyA0oE/9coMAUCKcTWHvE/VYr2KXk4lOiUTriei+ltK8K67w2Bo/Jmp26FA3IRqcR2 o35djpte9YEY4jVmoDkhovnU2t+a4mH+BCMThysTP0TYfLQTFN5ZZNmPxuDqrRv+V6Ft YAaAGTDb/looVP3W5gXmtLP1BT+sXyG1tAg1DuC6mDSvkTsg2yUDWk6mcM9+YLHMdCaP dh91JrHB2YH6lFI8G5jk/hRSCPB7AfN5v27dz2eOVbgmw1Oh1J4DWWnqEPujdySmFq7z STqw== X-Gm-Message-State: AO0yUKX4PSsLK1nMcYDMEQvxOx1LYHiOSACou3GNhHFDMJQ9GugjRAtK GdWdiowsdimlqMmDUAgewqXdnM/xTIY= X-Google-Smtp-Source: AK7set+qOVFZEYPqf6090xY3A1jG/4TWdiNMUokFCls7wZJZ0YWyYbbwmfdRqnyNYh17MWf/omyhwg== X-Received: by 2002:a50:8705:0:b0:4ab:4569:4b9f with SMTP id i5-20020a508705000000b004ab45694b9fmr10836818edb.0.1676300294999; Mon, 13 Feb 2023 06:58:14 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [RFC 10/10] x86/hvm: make AMD-V and Intel VT-x support configurable Date: Mon, 13 Feb 2023 16:57:51 +0200 Message-Id: <20230213145751.1047236-11-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230213145751.1047236-1-burzalodowa@gmail.com> References: <20230213145751.1047236-1-burzalodowa@gmail.com> MIME-Version: 1.0 Provide the user with configuration control over the cpu virtualization support in Xen by making AMD_SVM and INTEL_VMX options user selectable. To preserve the current default behavior, both options depend on HVM and default to Y. To prevent users from unknowingly disabling virtualization support, make the controls user selectable only if EXPERT is enabled. No functional change intended. Signed-off-by: Xenia Ragiadakou --- xen/arch/x86/Kconfig | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 2a72111c23..fce40f08b1 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -118,10 +118,24 @@ config HVM If unsure, say Y. config AMD_SVM - def_bool y if HVM + 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 - def_bool y if HVM + bool "Intel VT-x" if EXPERT + depends on HVM + default y + 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 XEN_SHSTK bool "Supervisor Shadow Stacks"