From nobody Mon Feb 9 23:08:38 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1745334711; cv=none; d=zohomail.com; s=zohoarc; b=H8VbFNVrn8j/EUlf3AbkFjkFPbHCpKxbL0Nsw/ufZFD1valT57XSYqY+jXy0DZR7VHnoCsbsoqczGH1w70ivwWqe+x+3GpZOWV4MiNavEgCN7N2Ebhn/Wwqg0xyvQDdg1y+h5oGB/A9vkFP5vTwo0ppY3uE//37MHexJH0oCEWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745334711; h=Content-Type: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=QnIKAND7PaaYiBZpdm/P7GTarwHPzvaPJ5XCEeh+pOQ=; b=VjsXfdPhbMI1SUO5C4IcZy0ETOWKhk0YAAwA9hGB5T80D6fRdObaWHmjYa7fqko5lyVKt1+0UM8xpUoIKShUv0rnhC52dV3YkSSzjsoNUY1ee9Akk+8ImOrxPFtExmlHqdjuYzKT3Kw7XTEU9TakRFzQCmV+qj3UC4Sq5nlvlY0= 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1745334711653752.6430273600755; Tue, 22 Apr 2025 08:11:51 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.962912.1354059 (Exim 4.92) (envelope-from ) id 1u7FHf-0001kL-RG; Tue, 22 Apr 2025 15:11:39 +0000 Received: by outflank-mailman (output) from mailman id 962912.1354059; Tue, 22 Apr 2025 15:11:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u7FHf-0001kE-Oe; Tue, 22 Apr 2025 15:11:39 +0000 Received: by outflank-mailman (input) for mailman id 962912; Tue, 22 Apr 2025 15:11:38 +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 1u7FDy-0008SP-56 for xen-devel@lists.xenproject.org; Tue, 22 Apr 2025 15:07:50 +0000 Received: from 1.mo576.mail-out.ovh.net (1.mo576.mail-out.ovh.net [178.33.251.173]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 89296b44-1f8b-11f0-9ffb-bf95429c2676; Tue, 22 Apr 2025 17:07:41 +0200 (CEST) Received: from director5.ghost.mail-out.ovh.net (unknown [10.109.148.79]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id 4ZhlwD2hlvz2D5X for ; Tue, 22 Apr 2025 15:07:40 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-fbc5b (unknown [10.110.113.124]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id C4B0F1FEB5; Tue, 22 Apr 2025 15:07:39 +0000 (UTC) Received: from 3mdeb.com ([37.59.142.113]) by ghost-submission-5b5ff79f4f-fbc5b with ESMTPSA id k7jPJruwB2hGLQgAnYYF5A (envelope-from ); Tue, 22 Apr 2025 15:07:39 +0000 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: 89296b44-1f8b-11f0-9ffb-bf95429c2676 Authentication-Results: garm.ovh; auth=pass (GARM-113S0071813dc17-e6f0-4e43-af1d-cc6a0fd55999, 7E508E014E7E7C169EB13C6E22C3C4EBF1F0FDD7) smtp.auth=sergii.dmytruk@3mdeb.com X-OVh-ClientIp: 176.111.181.178 From: Sergii Dmytruk To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , trenchboot-devel@googlegroups.com Subject: [PATCH 13/21] x86/hvm: Check for VMX in SMX when slaunch active Date: Tue, 22 Apr 2025 18:06:47 +0300 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 12735053849832436892 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgeegtdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefuvghrghhiihcuffhmhihtrhhukhcuoehsvghrghhiihdrughmhihtrhhukhesfehmuggvsgdrtghomheqnecuggftrfgrthhtvghrnhepgeekffeiiedtveekhfdugeffveeigefgleegvdeghefftdetheefueeliedukedvnecukfhppeduvdejrddtrddtrddupddujeeirdduuddurddukedurddujeekpdefjedrheelrddugedvrdduudefnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehsvghrghhiihdrughmhihtrhhukhesfehmuggvsgdrtghomhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeigvghnqdguvghvvghlsehlihhsthhsrdigvghnphhrohhjvggtthdrohhrghdpoffvtefjohhsthepmhhoheejiegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=QnIKAND7PaaYiBZpdm/P7GTarwHPzvaPJ5XCEeh+pOQ=; c=relaxed/relaxed; d=3mdeb.com; h=From; s=ovhmo3617313-selector1; t=1745334460; v=1; b=Ob2XXwnh0Oj98vogXenJ8/EWMgUpQW3+GA5zPSWUc5+XX34PxAcT1hozWlaBYkR9pkRbl/7F LD3HA30FU/FaXL4cvLtEyTdtn/927e53xOMGzw3yYVzhRDE58doLrEUd/MWaUUoyNdtGI0jtNPp iWc5nYsM03154Sbost0vQ5U1cYGnnZMrDkma7AuWI6JBigzGmOoOFNEFKrIR2acpVM6pBRS+hxm FU3AUh+bqzncY7pzbEO5ZInWDq1Bbie4Rb9N9db8a0gOxgzifIZPqTKurpgd6QH22blQapgdvHp uB7J2RZ5EAG9dD5cqVgBFruCqcM8x++806RwMaRvY/aWQ== X-ZohoMail-DKIM: pass (identity @3mdeb.com) X-ZM-MESSAGEID: 1745334712214019000 From: Micha=C5=82 =C5=BBygowski Check whther IA32_FEATURE_CONTROL has the proper bits enabled to run VMX in SMX when slaunch is active. Signed-off-by: Micha=C5=82 =C5=BBygowski --- xen/arch/x86/hvm/vmx/vmcs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index a44475ae15..ef38903775 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -724,7 +725,7 @@ static int _vmx_cpu_up(bool bsp) bios_locked =3D !!(eax & IA32_FEATURE_CONTROL_LOCK); if ( bios_locked ) { - if ( !(eax & (tboot_in_measured_env() + if ( !(eax & (tboot_in_measured_env() || slaunch_active ? IA32_FEATURE_CONTROL_ENABLE_VMXON_INSIDE_SMX : IA32_FEATURE_CONTROL_ENABLE_VMXON_OUTSIDE_SMX)) ) { --=20 2.49.0