From mboxrd@z Thu Jan 1 00:00:00 1970 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 D6216109C02F for ; Wed, 25 Mar 2026 15:32:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1262643.1555068 (Exim 4.92) (envelope-from ) id 1w5QDn-0005VO-5f; Wed, 25 Mar 2026 15:32:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1262643.1555068; Wed, 25 Mar 2026 15:32: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 1w5QDn-0005VH-36; Wed, 25 Mar 2026 15:32:39 +0000 Received: by outflank-mailman (input) for mailman id 1262643; Wed, 25 Mar 2026 15:32:38 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w5QDl-0005V5-TP for xen-devel@lists.xenproject.org; Wed, 25 Mar 2026 15:32:38 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1w5QDl-005Us2-93 for xen-devel@lists.xenproject.org; Wed, 25 Mar 2026 16:32:37 +0100 Received: from [10.42.69.7] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69c40015-e002-0a2a0a5209dd-0a2a4507a83e-2 for ; Wed, 25 Mar 2026 16:32:37 +0100 Received: from [103.168.172.145] (helo=fout-a2-smtp.messagingengine.com) by tlsNG-ef75cf.mxtls.expurgate.net with ESMTPS (eXpurgate 4.55.2) (envelope-from ) id 69c40012-fd74-0a2a45070019-67a8ac91e5e1-3 for ; Wed, 25 Mar 2026 16:32:35 +0100 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id 70A3EEC0230; Wed, 25 Mar 2026 11:32:33 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Wed, 25 Mar 2026 11:32:33 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Mar 2026 11:32:31 -0400 (EDT) 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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=fm1 header.d=invisiblethingslab.com header.i="@invisiblethingslab.com" header.h="Cc:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=fm1 header.d=messagingengine.com header.i="@messagingengine.com" header.h="Cc:Content-Type:Date:Feedback-ID:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To:X-ME-Proxy:X-ME-Sender" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1774452753; x=1774539153; bh=bi0KmjW0NjZi8YPs0MLZpFRH/I6FhGD+iMHvjkZWXzc=; b= D7a2iQ+zM05W9otpFkCZzS5n/qFh0d/SZb3yi2TgWfFTaHJ9GV1Uxa6e4HN0nWpr IsyQNCUjxetyJzlZpxKcXRPLGNj6SdsNZ2Qn6Nec2n1cM7qqcfZ8atkL4kpdhe2V cgO3xjHB6SIeuJqMIYHLM6Iq8omhTRbW7j/uqpVUowsMPDfGuTVYm+0xEIgb6aQt +/XJ+866JnwjVcFYotCPh1RQHCWs203wZagxwWOxWOdPsiPoSnM7xeKGw+yVDykx rY5vKmT8Uym+OfADMWGdCLBHMnwRpoYOt9F+zBZByS47a7FMX33l2nijlZK8WHHj cNzFWJ7ZoMoW/ie+GEPZgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1774452753; x=1774539153; bh=bi0KmjW0NjZi8YPs0MLZpFRH/I6FhGD+iMH vjkZWXzc=; b=jTcqzRzS7/uHiV38QuXZY8kNvbvuLQO/XwPyM5M+eX32ymdSF3V 0ds7+WXqvPVjHpBgSFDzuMHP49HW2smLVWs836SPvxX+AJX2fsyN6l/EPrjn3y0G yezm8jnHDyhjj6rvvWppMgULgPtGi+IUjVo9p6mAoAk1D9WUL+jA9WDW0DvjWB2s CDE1UpoZ2u3Sill5DsfY8OzKWAy10XO6RE/ero+KZVHPIWPbZSqvmBJ42sSL7rLc IYa0QLsPulNKGMExr1QUr3pujVA7aScCuQkLLQhyeIx/tISMjRvJ4LjoYtMF7Z51 EPGTyaLi7QSe+9m+MItBC2faBNzIOpaO/5w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdegkeefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepofgrrhgvkhcu ofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinhhvih hsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepgfduleet feevhfefheeiteeliefhjefhleduveetteekveettddvgeeuteefjedunecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehi nhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdpnhgspghrtghpthhtohepjedpmh houggvpehsmhhtphhouhhtpdhrtghpthhtohepjhgsvghulhhitghhsehsuhhsvgdrtgho mhdprhgtphhtthhopehsohhumhihrghjhihothhishgrrhhkrghrvdefsehgmhgrihhlrd gtohhmpdhrtghpthhtoheprghnughrvgifrdgtohhophgvrhefsegtihhtrhhigidrtgho mhdprhgtphhtthhopeguphhsmhhithhhsegrphgvrhhtuhhsshholhhuthhiohhnshdrtg homhdprhgtphhtthhopehrohhgvghrrdhprghusegtihhtrhhigidrtghomhdprhgtphht thhopehsrghrkhgrrhhsohhumhihrghjhihothhivdefsehgmhgrihhlrdgtohhmpdhrtg hpthhtohepgigvnhdquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhg X-ME-Proxy: Feedback-ID: i1568416f:Fastmail Date: Wed, 25 Mar 2026 16:32:29 +0100 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Jan Beulich Cc: Soumyajyotii Ssarkar , Andrew Cooper , "Daniel P . Smith" , Roger Pau =?utf-8?B?TW9ubsOp?= , sarkarsoumyajyoti23@gmail.com, xen-devel@lists.xenproject.org Subject: Re: [PATCH v5 2/3] x86/acpi: Integrate BGRT preservation with status reporting Message-ID: References: <20260324123312.11076-1-soumyajyotisarkar23@gmail.com> <20260324123312.11076-3-soumyajyotisarkar23@gmail.com> <751e1d3e-d95a-4129-8baa-450a53d15efa@suse.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZBEFYMWGX+DlEeZ/" Content-Disposition: inline In-Reply-To: <751e1d3e-d95a-4129-8baa-450a53d15efa@suse.com> X-purgate-ID: tlsNG-ef75cf/1774452755-578A4303-8DB9859E/0/0 X-purgate-type: clean X-purgate-size: 3678 --ZBEFYMWGX+DlEeZ/ Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Wed, 25 Mar 2026 16:32:29 +0100 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Jan Beulich Cc: Soumyajyotii Ssarkar , Andrew Cooper , "Daniel P . Smith" , Roger Pau =?utf-8?B?TW9ubsOp?= , sarkarsoumyajyoti23@gmail.com, xen-devel@lists.xenproject.org Subject: Re: [PATCH v5 2/3] x86/acpi: Integrate BGRT preservation with status reporting On Wed, Mar 25, 2026 at 04:16:25PM +0100, Jan Beulich wrote: > On 24.03.2026 13:33, Soumyajyotii Ssarkar wrote: > > @@ -327,6 +328,11 @@ static int __init cf_check acpi_parse_hpet(struct = acpi_table_header *table) > > return 0; > > } > >=20 > > +/* > > + * Invalidate BGRT if image is in conventional RAM (preservation faile= d). > > + * If preservation succeeded, image is in EfiACPIReclaimMemory, which > > + * won't match RAM_TYPE_CONVENTIONAL check, so table remains valid. > > + */ > > static int __init cf_check acpi_invalidate_bgrt(struct acpi_table_head= er *table) > > { > > struct acpi_table_bgrt *bgrt_tbl =3D > > @@ -754,5 +760,7 @@ int __init acpi_boot_init(void) > >=20 > > acpi_table_parse(ACPI_SIG_BGRT, acpi_invalidate_bgrt); > >=20 > > + efi_bgrt_status_info(); > > + > > return 0; > > } >=20 > Does this really need doing from here? If you called it ... >=20 > > --- a/xen/common/efi/boot.c > > +++ b/xen/common/efi/boot.c > > @@ -1911,6 +1911,22 @@ static bool __init cf_check rt_range_valid(unsig= ned long smfn, unsigned long emf > > return true; > > } > >=20 > > +void __init efi_bgrt_status_info(void) > > +{ > > + if ( !efi_enabled(EFI_BOOT) ) > > + return; > > + > > + if ( bgrt_info.preserved ) > > + { > > + printk(XENLOG_INFO "EFI: BGRT image preserved: %lu KB\n", > > + bgrt_info.size / 1024); > > + printk(XENLOG_INFO "EFI: BGRT relocated from %p to %p\n", > > + bgrt_info.old_addr, bgrt_info.new_addr); > > + } > > + else if ( bgrt_info.failure_reason[0] ) > > + printk(XENLOG_WARNING "EFI: BGRT preservation failed: %s\n", > > + bgrt_info.failure_reason); > > +} > >=20 > > void __init efi_init_memory(void) > > { >=20 > ... out of this function, it could be static and no stub (misplaced in > the earlier patch) would be needed either. It was here before, and I complained about it, because it printed the invalidation reason way later than the actual invalidation. > Furthermore, is the EFI_BOOT check really needed? Without taking either > of the EFI boot paths, neither bgrt_info.preserved nor > bgrt_info.failure_reason[0] would have been altered from their initial > values. >=20 > Jan --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab --ZBEFYMWGX+DlEeZ/ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmnEAA4ACgkQ24/THMrX 1ywjXAf/U3cDCgX6UIk/F81aZu5KdGwE4xEeIb9MvH1RT/37z+7h6bQOwM6ip6bb vzZgFXseF+Hb6vnCo65ZDeleBVnehDFGxtsPfVFtiZPOdKtuuncPHQMD12f5Rq/8 KnjFIEG7ZLdseQPdIS4OfDuZvyQtObfldW9SdYNJpSWGV9tWlR7xvKCRiLEYRrlv PKtRBTmLIjbzkg6SiY+1O3yfvegrD1idNqmUzWCDjvRAIZcECRsul1r4z2v3gC6W EjxMAgFK8uteM2hpV1ST0LEEyL3npysVKajcrkFK13DWLcPUSQYsoSiFb2bwQVVd WqBYVWBR0/JaAlfy2UbTPysC7eTBoQ== =oI9H -----END PGP SIGNATURE----- --ZBEFYMWGX+DlEeZ/--