From nobody Fri Oct 31 16:00:15 2025 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=1748611412; cv=none; d=zohomail.com; s=zohoarc; b=gOl6ZZR/nTCWp6HCuH85ODOyZVT5OEAyFWE6ygWeBYOiJKiKEQesq0ei9JIFuUrk++fY3zc1eJqDNhpGRdk1oklSFu9DIIXznFK9WDQkBF+wAtzYu2DxttWGW1xnCGQsovzhFwCTzGUrJJzpjFBdoSTctPFP7PZ30HXBFd1VmDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748611412; 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=GDql3BTKkItj9wJ+5Y5x33V6WArPQmOVJIP++1bnZvg=; b=JpNjUlBhZck9ak47X/RxTzU0wLEKBKp/YRHs+b/gXXtzxITVQM5Mv9gDCBoStnc/p3dii+S7LaTdm0uFcgjYfMQ9G5MYk7/0HzfPPOWfKMskG+6IbHqIKfbzv+mGKAXVZtMNE++zSUnYVDv3EIQJpBMFKSSJX5kAN0PYQ1m5lYk= 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 1748611412377131.94252190637792; Fri, 30 May 2025 06:23:32 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1001061.1381316 (Exim 4.92) (envelope-from ) id 1uKzhg-0004cE-6U; Fri, 30 May 2025 13:23:20 +0000 Received: by outflank-mailman (output) from mailman id 1001061.1381316; Fri, 30 May 2025 13:23:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uKzhg-0004c7-3g; Fri, 30 May 2025 13:23:20 +0000 Received: by outflank-mailman (input) for mailman id 1001061; Fri, 30 May 2025 13:23:18 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uKzdt-0008Jy-Lj for xen-devel@lists.xenproject.org; Fri, 30 May 2025 13:19:25 +0000 Received: from 14.mo550.mail-out.ovh.net (14.mo550.mail-out.ovh.net [178.32.97.215]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b22512b8-3d58-11f0-a2ff-13f23c93f187; Fri, 30 May 2025 15:19:20 +0200 (CEST) Received: from director7.ghost.mail-out.ovh.net (unknown [10.109.148.49]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 4b83jh1WJ5z1lvF for ; Fri, 30 May 2025 13:19:20 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-595tn (unknown [10.110.113.13]) by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 8AD7EC06E0; Fri, 30 May 2025 13:19:19 +0000 (UTC) Received: from 3mdeb.com ([37.59.142.114]) by ghost-submission-5b5ff79f4f-595tn with ESMTPSA id TNHOGFewOWjNxwAAeVbzSg (envelope-from ); Fri, 30 May 2025 13:19:19 +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: b22512b8-3d58-11f0-a2ff-13f23c93f187 Authentication-Results: garm.ovh; auth=pass (GARM-114S00895dc382f-a550-4f6b-b404-f0cac4229ca3, A4E380CC922F0B59227EC5DCC46884561651840B) smtp.auth=sergii.dmytruk@3mdeb.com X-OVh-ClientIp: 176.111.184.221 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 v3 17/22] x86/acpi: disallow S3 on Secure Launch boot Date: Fri, 30 May 2025 16:17:59 +0300 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 12706906350127527068 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvleduudculddtuddrgeefvddrtddtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefuvghrghhiihcuffhmhihtrhhukhcuoehsvghrghhiihdrughmhihtrhhukhesfehmuggvsgdrtghomheqnecuggftrfgrthhtvghrnhephfehfeehudeileeikeffgfffgfefuddtveelvedvhfffgfelvdfgtddutdehfeeinecukfhppeduvdejrddtrddtrddupddujeeirdduuddurddukeegrddvvddupdefjedrheelrddugedvrdduudegnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehsvghrghhiihdrughmhihtrhhukhesfehmuggvsgdrtghomhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeigvghnqdguvghvvghlsehlihhsthhsrdigvghnphhrohhjvggtthdrohhrghdpoffvtefjohhsthepmhhoheehtdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=GDql3BTKkItj9wJ+5Y5x33V6WArPQmOVJIP++1bnZvg=; c=relaxed/relaxed; d=3mdeb.com; h=From; s=ovhmo3617313-selector1; t=1748611160; v=1; b=VisO5To8RRu8TC0ZFsf9Gfi3F2pq+oFPXbyOfsoWBWec/iz+gmWk7FcqiZOMnht0TmDHwhsM 7q2T2kZdE6di2acc+rnLeFMqRDkERQkYfH4TXf2qgTCHjlVc+DlnGrMrMYxhVpuPAVguxXVr1KN CjWepru+WVBQx7iYx0gH0pgSkbmPCYs7Z7ctKQAGTw4ecgA/rmdty8DXK+BRufHQi4G6q0zHPmD 30mYab7ia4SbIesn6X/Dv8A0V3CJXc+h+oOUVbNFaD1yGMnZqKt9/TRdY60507zBLPEuOhMtxMs QAGODC0YsBg2Fyhh7oqap0w91NxL5DYa1zU/54bEM4AhA== X-ZohoMail-DKIM: pass (identity @3mdeb.com) X-ZM-MESSAGEID: 1748611413370116600 Content-Type: text/plain; charset="utf-8" Secure Launch won't initiate DRTM on S3 resume (the code for starting DRTM is not part of Xen), so abort a request to perform S3 suspend to not lose the state of DRTM PCRs. Signed-off-by: Sergii Dmytruk --- xen/arch/x86/acpi/power.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c index 448aa9f3a7..6a53c6718c 100644 --- a/xen/arch/x86/acpi/power.c +++ b/xen/arch/x86/acpi/power.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -356,6 +357,13 @@ int acpi_enter_sleep(const struct xenpf_enter_acpi_sle= ep *sleep) PAGE_SIZE - acpi_sinfo.vector_width / 8)) ) return -EOPNOTSUPP; =20 + /* Secure Launch won't initiate DRTM on S3 resume, so abort S3 suspend= . */ + if ( sleep->sleep_state =3D=3D ACPI_STATE_S3 && slaunch_active ) + { + printk(XENLOG_INFO "SLAUNCH: refusing switching into ACPI S3 state= .\n"); + return -EPERM; + } + if ( sleep->flags & XENPF_ACPI_SLEEP_EXTENDED ) { if ( !acpi_sinfo.sleep_control.address || --=20 2.49.0