From nobody Fri Oct 31 03:54:05 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; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1750950859; cv=none; d=zohomail.com; s=zohoarc; b=XOxOFIapAT28aXQRA13oCHfv26/gW+JSGszSmva9re2KjIMnf4uw9LrV7BkKrL2n0Z4m1rVWSmxnRRth1QSW1NO43+lD+QYPsTlvhu0l6fN+eE/TCEdf4GnDXGaNGql8t99fHIS0tWpQR0oxAK1+eHQW3pEWBLtmjhz5jSzDxhY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750950859; 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=AhGYBQwHApEqN1+5+tUHs1qBVwnk8aDK8vn7IKkZCtY=; b=XsZXclqp881fH6VqjzJQbwWyAmbIVW9KG8RcdcQAOu60Fz8HshG4EYWlGRojcXRy5xQSfHxF78mdXCQJ541GgskbUT4u5blbIj612tsFFolgXpbhEXMm0CSTPETs8Aysn1FXgVaMaYJE6X+snmjj2EVGuukc1VWvquLgXj2xRJA= 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1750950854563749.9165592173696; Thu, 26 Jun 2025 08:14:14 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1026652.1401841 (Exim 4.92) (envelope-from ) id 1uUoIX-00046w-HB; Thu, 26 Jun 2025 15:13:57 +0000 Received: by outflank-mailman (output) from mailman id 1026652.1401841; Thu, 26 Jun 2025 15:13:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uUoIX-00046p-Ed; Thu, 26 Jun 2025 15:13:57 +0000 Received: by outflank-mailman (input) for mailman id 1026652; Thu, 26 Jun 2025 15:13:56 +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 1uUoIW-00046W-JX for xen-devel@lists.xenproject.org; Thu, 26 Jun 2025 15:13:56 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2d007de0-52a0-11f0-a30f-13f23c93f187; Thu, 26 Jun 2025 17:13:55 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DAEF421168; Thu, 26 Jun 2025 15:13:52 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id AC8EF13188; Thu, 26 Jun 2025 15:13:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OZaZKLBjXWjuOgAAD6G6ig (envelope-from ); Thu, 26 Jun 2025 15:13:52 +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: 2d007de0-52a0-11f0-a30f-13f23c93f187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1750950833; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AhGYBQwHApEqN1+5+tUHs1qBVwnk8aDK8vn7IKkZCtY=; b=GY15QzAa6URhOhe3Z3MZYdNM9+tp/jpv+lcT7sAgNinru9ScYhVxWUf9n8szNPzPLzrZK5 hTzlDAsdh1+994zZLXj6+1tpbxh9vs8EXITx0/rKm6Bhf3cpVO+gdEbRcp71HLthuxhxrb TYa6MqsPcR1FLf55trk5AJtW5PU5wVU= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1750950832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AhGYBQwHApEqN1+5+tUHs1qBVwnk8aDK8vn7IKkZCtY=; b=LSZ7UzjvXwUVDrUsyrzSGwkqxgS6G2SBUi2yw8zrbNZyprOH8uPwHdt8bN2CyxFa8zniFg DAZCcmV9+LXtb1iykQ/AtAfdP9bafl/XFSbDdfpTVnxjU4Z2VpO6Q0mx4SEna1Q6t4W+pH SP1J1znXcuxjhzj7v+cYqaDhSnL7GFA= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Samuel Thibault , Jason Andryuk Subject: [PATCH v2 1/3] stubdom/grub: avoid relying on start_info definition Date: Thu, 26 Jun 2025 17:13:42 +0200 Message-ID: <20250626151344.6971-2-jgross@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250626151344.6971-1-jgross@suse.com> References: <20250626151344.6971-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Flag: NO X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[amd.com:email,imap1.dmz-prg2.suse.org:helo,suse.com:mid,suse.com:email] X-Spam-Level: X-ZohoMail-DKIM: pass (identity @suse.com) (identity @suse.com) X-ZM-MESSAGEID: 1750950860911116600 Content-Type: text/plain; charset="utf-8" The kexec() function of grub-pv is relying on the exact definition of start_info from Mini-OS by having an "#undef start_info" and a few lines later a copy of the Mini-OS definition again. This is bad practice by making all attempts of Mini-OS to change that definition impossible. Avoid that dependency by moving the code fragment in question to the very end of the source file, allowing to drop the copy of the definition. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - add comment (Jan Beulich) --- stubdom/grub/kexec.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/stubdom/grub/kexec.c b/stubdom/grub/kexec.c index 3da80b5b4a..b423e856a4 100644 --- a/stubdom/grub/kexec.c +++ b/stubdom/grub/kexec.c @@ -209,6 +209,8 @@ static void tpm_hash2pcr(struct xc_dom_image *dom, char= *cmdline) shutdown_tpmfront(tpm); } =20 +static void call_start_info_hook(struct xc_dom_image *dom); + void kexec(void *kernel, long kernel_size, void *module, long module_size,= char *cmdline, unsigned long flags) { struct xc_dom_image *dom; @@ -330,10 +332,7 @@ void kexec(void *kernel, long kernel_size, void *modul= e, long module_size, char } =20 /* start info page */ -#undef start_info - if ( dom->arch_hooks->start_info ) - dom->arch_hooks->start_info(dom); -#define start_info (start_info_union.start_info) + call_start_info_hook(dom); =20 xc_dom_log_memory_footprint(dom); =20 @@ -432,3 +431,11 @@ out: allocated =3D 0; xc_interface_close(xc_handle ); } + +/* No references to start_info of Mini-OS after this function. */ +static void call_start_info_hook(struct xc_dom_image *dom) +{ +#undef start_info + if ( dom->arch_hooks->start_info ) + dom->arch_hooks->start_info(dom); +} --=20 2.43.0 From nobody Fri Oct 31 03:54:05 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; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1750950855; cv=none; d=zohomail.com; s=zohoarc; b=JleOeerKU1DcsLP/pNJMmYZn2/BCPprMb5Tgw0ZRc6ocOMGP5kOdlkG6jhb21gObiaYTBZvvixbiaApNm36HBZvtFuoi2LNfvoCzuwS5/oHtGhoXKkefwlRQoJgvjLuHiDHrjI6+WYZBH0XVl7GmPlKpivVfPn7Uq+fjpl19jRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750950855; 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=MsNYyEfvb5jYbzHJ2E51/v1/xsNYdiKTSuL/Sh/LsmA=; b=QXeIBbX3I8/hqSaKwDK8jKW7upU9USHK6uZq7k9GUmZV9RMy0VPo76ElO0pFdscoMMQ5VT+8LI91oOzJjqELE+YZEE+AEq00FZCXTn0+tJFf7qyCfTWpIo6vdRZCA/4IoSLSKrKMoRB0qGVZsWWs8QsCgDHwxGkS6gIF99dIjaQ= 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1750950855622236.01378177133756; Thu, 26 Jun 2025 08:14:15 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1026653.1401852 (Exim 4.92) (envelope-from ) id 1uUoIa-0004Me-Pe; Thu, 26 Jun 2025 15:14:00 +0000 Received: by outflank-mailman (output) from mailman id 1026653.1401852; Thu, 26 Jun 2025 15:14:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uUoIa-0004MU-M9; Thu, 26 Jun 2025 15:14:00 +0000 Received: by outflank-mailman (input) for mailman id 1026653; Thu, 26 Jun 2025 15:13:59 +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 1uUoIZ-00046W-KG for xen-devel@lists.xenproject.org; Thu, 26 Jun 2025 15:13:59 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2f48dc7d-52a0-11f0-a30f-13f23c93f187; Thu, 26 Jun 2025 17:13:59 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B1F7C21160; Thu, 26 Jun 2025 15:13:58 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5045C13188; Thu, 26 Jun 2025 15:13:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4PTTEbZjXWj1OgAAD6G6ig (envelope-from ); Thu, 26 Jun 2025 15:13:58 +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: 2f48dc7d-52a0-11f0-a30f-13f23c93f187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1750950838; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MsNYyEfvb5jYbzHJ2E51/v1/xsNYdiKTSuL/Sh/LsmA=; b=a2qkNvNUCc1rfEIgIGag4Fb7dMwh44gx1IcCc2s7uvXIqToLirV3Oo8TAfuLcXOVV7whg/ GQbzV0Cwc/sfcBXan3FVq/ywlfN5lR8QHpRIv/KA/ziN+iyGjKskg40qn/EB3JHQ0Lg22x aPFluaB3it/q37XoQbYPTAPRFaDCW7o= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1750950838; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MsNYyEfvb5jYbzHJ2E51/v1/xsNYdiKTSuL/Sh/LsmA=; b=a2qkNvNUCc1rfEIgIGag4Fb7dMwh44gx1IcCc2s7uvXIqToLirV3Oo8TAfuLcXOVV7whg/ GQbzV0Cwc/sfcBXan3FVq/ywlfN5lR8QHpRIv/KA/ziN+iyGjKskg40qn/EB3JHQ0Lg22x aPFluaB3it/q37XoQbYPTAPRFaDCW7o= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v2 2/3] Config: update Mini-OS commit id Date: Thu, 26 Jun 2025 17:13:43 +0200 Message-ID: <20250626151344.6971-3-jgross@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250626151344.6971-1-jgross@suse.com> References: <20250626151344.6971-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Flag: NO X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1750950864400116600 Content-Type: text/plain; charset="utf-8" Use the newest Mini-OS. Signed-off-by: Juergen Gross Acked-by: Jan Beulich --- V2: - new patch --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index 3ebc9ac125..55b1b83d49 100644 --- a/Config.mk +++ b/Config.mk @@ -208,7 +208,7 @@ QEMU_UPSTREAM_URL ?=3D https://xenbits.xen.org/git-http= /qemu-xen.git QEMU_UPSTREAM_REVISION ?=3D master =20 MINIOS_UPSTREAM_URL ?=3D https://xenbits.xen.org/git-http/mini-os.git -MINIOS_UPSTREAM_REVISION ?=3D d273a44cec90dad5d3f0bc361a6fea41e0288a56 +MINIOS_UPSTREAM_REVISION ?=3D 2d3b22f842a969574cf967925b435c5913e8a6e0 =20 SEABIOS_UPSTREAM_URL ?=3D https://xenbits.xen.org/git-http/seabios.git SEABIOS_UPSTREAM_REVISION ?=3D rel-1.16.3 --=20 2.43.0 From nobody Fri Oct 31 03:54:05 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; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1750950863; cv=none; d=zohomail.com; s=zohoarc; b=n71pZxFo9mOBFSbMVN+vaszU+P/JXTAnHP2JpmvO+064m43F06DWtgEnMh1ddL6lwcKbpOgIke+2/OPTSNspo9AwVRW43osGLQyeoAeBEnUdJ0D1vA/ZuNBfdYQm74giB9+lYRuEFpC5s7s6CSFV25PhY2g7EHAkH0JM2o9/nIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750950863; 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=5aD+bS4T0OmGOE8GUbzM6J/43FA2KaMdcwiETXcLbNs=; b=c3pUAx2zF055Kt+8elIIy3R950WCjqZ7y0vnvluPb/7K3yLt5K8zKd6XdcueMbghxzfE2qhtcNWJ7XylgsFrh1/5vrgTiyUqkfmyKbsBUnt4SV8lamC/9CPDPcP5cK/Soy1sK0AueoJMvYaPM9PVv8/ZxHVUqFGvrHUyOCY/SO8= 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 17509508627601017.0951645209119; Thu, 26 Jun 2025 08:14:22 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1026655.1401862 (Exim 4.92) (envelope-from ) id 1uUoIh-0004hd-2e; Thu, 26 Jun 2025 15:14:07 +0000 Received: by outflank-mailman (output) from mailman id 1026655.1401862; Thu, 26 Jun 2025 15:14:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uUoIg-0004hT-V6; Thu, 26 Jun 2025 15:14:06 +0000 Received: by outflank-mailman (input) for mailman id 1026655; Thu, 26 Jun 2025 15:14:05 +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 1uUoIf-00046W-GI for xen-devel@lists.xenproject.org; Thu, 26 Jun 2025 15:14:05 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 328ed4bb-52a0-11f0-a30f-13f23c93f187; Thu, 26 Jun 2025 17:14:04 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4B1B721160; Thu, 26 Jun 2025 15:14:04 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2092C13188; Thu, 26 Jun 2025 15:14:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YfNXBrxjXWgAOwAAD6G6ig (envelope-from ); Thu, 26 Jun 2025 15:14:04 +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: 328ed4bb-52a0-11f0-a30f-13f23c93f187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1750950844; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5aD+bS4T0OmGOE8GUbzM6J/43FA2KaMdcwiETXcLbNs=; b=Gh60U7kudqIgV5k0t2pBSXmrOQTQhVd0Nyfa78osydhR2c9FGpfyZImZAvxheY4jXNK3UW hUsDVZ01RSkJetiY+ABDjGAdAB9k1Z0pZ8TXC9qYDAv4ztl/lJ7AWX7MVShbWGXrpAabHb 6ClmhVS+oJBFJavLn8Mg9cNpO2Qf0O8= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=Gh60U7ku DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1750950844; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5aD+bS4T0OmGOE8GUbzM6J/43FA2KaMdcwiETXcLbNs=; b=Gh60U7kudqIgV5k0t2pBSXmrOQTQhVd0Nyfa78osydhR2c9FGpfyZImZAvxheY4jXNK3UW hUsDVZ01RSkJetiY+ABDjGAdAB9k1Z0pZ8TXC9qYDAv4ztl/lJ7AWX7MVShbWGXrpAabHb 6ClmhVS+oJBFJavLn8Mg9cNpO2Qf0O8= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Samuel Thibault Subject: [PATCH v2 3/3] stubdom/grub: swap start_info usage with start_info_ptr Date: Thu, 26 Jun 2025 17:13:44 +0200 Message-ID: <20250626151344.6971-4-jgross@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250626151344.6971-1-jgross@suse.com> References: <20250626151344.6971-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Queue-Id: 4B1B721160 X-Rspamd-Action: no action X-Spam-Flag: NO X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:dkim,suse.com:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.com:+] X-Spam-Score: -3.01 X-Spam-Level: X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1750950864927116600 Content-Type: text/plain; charset="utf-8" Now that Mini-OS is exporting start_info_ptr, use that instead of the tedious start_info macro. Note that the Mini-OS macro still needs to be undefined, but now it can be done right at the top of kexec.c. Undo the previous move of the "other" start_info into a dedicated function. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - new patch --- stubdom/grub/kexec.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/stubdom/grub/kexec.c b/stubdom/grub/kexec.c index b423e856a4..92646ad8cd 100644 --- a/stubdom/grub/kexec.c +++ b/stubdom/grub/kexec.c @@ -34,6 +34,8 @@ =20 #include "mini-os.h" =20 +#undef start_info + #if 0 #define DEBUG(fmt, ...) printk(fmt, ## __VA_ARGS__) #else @@ -86,10 +88,10 @@ static void do_exchange(struct xc_dom_image *dom, xen_p= fn_t target_pfn, xen_pfn_ xen_pfn_t source_pfn; xen_pfn_t target_mfn; =20 - for (source_pfn =3D 0; source_pfn < start_info.nr_pages; source_pfn++) + for (source_pfn =3D 0; source_pfn < start_info_ptr->nr_pages; source_p= fn++) if (dom->pv_p2m[source_pfn] =3D=3D source_mfn) break; - ASSERT(source_pfn < start_info.nr_pages); + ASSERT(source_pfn < start_info_ptr->nr_pages); =20 target_mfn =3D dom->pv_p2m[target_pfn]; =20 @@ -209,8 +211,6 @@ static void tpm_hash2pcr(struct xc_dom_image *dom, char= *cmdline) shutdown_tpmfront(tpm); } =20 -static void call_start_info_hook(struct xc_dom_image *dom); - void kexec(void *kernel, long kernel_size, void *module, long module_size,= char *cmdline, unsigned long flags) { struct xc_dom_image *dom; @@ -242,8 +242,8 @@ void kexec(void *kernel, long kernel_size, void *module= , long module_size, char xc_dom_module_mem(dom, module, module_size, NULL); =20 dom->flags =3D flags; - dom->console_evtchn =3D start_info.console.domU.evtchn; - dom->xenstore_evtchn =3D start_info.store_evtchn; + dom->console_evtchn =3D start_info_ptr->console.domU.evtchn; + dom->xenstore_evtchn =3D start_info_ptr->store_evtchn; =20 tpm_hash2pcr(dom, cmdline); =20 @@ -279,7 +279,7 @@ void kexec(void *kernel, long kernel_size, void *module= , long module_size, char errnum =3D ERR_EXEC_FORMAT; goto out; } - dom->total_pages =3D start_info.nr_pages; + dom->total_pages =3D start_info_ptr->nr_pages; =20 /* equivalent of arch_setup_meminit */ dom->p2m_size =3D dom->total_pages; @@ -306,7 +306,7 @@ void kexec(void *kernel, long kernel_size, void *module= , long module_size, char } =20 /* Equivalent of xc_dom_boot_image */ - dom->shared_info_mfn =3D PHYS_PFN(start_info.shared_info); + dom->shared_info_mfn =3D PHYS_PFN(start_info_ptr->shared_info); =20 if (!xc_dom_compat_check(dom)) { printk("xc_dom_compat_check failed\n"); @@ -315,8 +315,8 @@ void kexec(void *kernel, long kernel_size, void *module= , long module_size, char } =20 /* Move current console, xenstore and boot MFNs to the allocated place= */ - do_exchange(dom, dom->console_pfn, start_info.console.domU.mfn); - do_exchange(dom, dom->xenstore_pfn, start_info.store_mfn); + do_exchange(dom, dom->console_pfn, start_info_ptr->console.domU.mfn); + do_exchange(dom, dom->xenstore_pfn, start_info_ptr->store_mfn); DEBUG("virt base at %llx\n", virt_base); DEBUG("bootstack_pfn %lx\n", dom->bootstack_pfn); _boot_target =3D virt_base + PFN_PHYS(dom->bootstack_pfn); @@ -332,7 +332,8 @@ void kexec(void *kernel, long kernel_size, void *module= , long module_size, char } =20 /* start info page */ - call_start_info_hook(dom); + if ( dom->arch_hooks->start_info ) + dom->arch_hooks->start_info(dom); =20 xc_dom_log_memory_footprint(dom); =20 @@ -371,7 +372,7 @@ void kexec(void *kernel, long kernel_size, void *module= , long module_size, char DEBUG("boot page mfn %lx\n", boot_page_mfn); _boot_page_entry =3D PFN_PHYS(boot_page_mfn) | L1_PROT; DEBUG("boot page entry %llx\n", _boot_page_entry); - _boot_oldpdmfn =3D virt_to_mfn(start_info.pt_base); + _boot_oldpdmfn =3D virt_to_mfn(start_info_ptr->pt_base); DEBUG("boot old pd mfn %lx\n", _boot_oldpdmfn); DEBUG("boot pd virt %lx\n", dom->pgtables_seg.vstart); _boot_pdmfn =3D dom->pv_p2m[PHYS_PFN(dom->pgtables_seg.vstart - virt_b= ase)]; @@ -384,12 +385,12 @@ void kexec(void *kernel, long kernel_size, void *modu= le, long module_size, char DEBUG("boot start %lx\n", _boot_start); =20 /* Keep only useful entries */ - for (nr_m2p_updates =3D pfn =3D 0; pfn < start_info.nr_pages; pfn++) + for (nr_m2p_updates =3D pfn =3D 0; pfn < start_info_ptr->nr_pages; pfn= ++) if (dom->pv_p2m[pfn] !=3D pfn_to_mfn(pfn)) nr_m2p_updates++; =20 m2p_updates =3D malloc(sizeof(*m2p_updates) * nr_m2p_updates); - for (i =3D pfn =3D 0; pfn < start_info.nr_pages; pfn++) + for (i =3D pfn =3D 0; pfn < start_info_ptr->nr_pages; pfn++) if (dom->pv_p2m[pfn] !=3D pfn_to_mfn(pfn)) { m2p_updates[i].ptr =3D PFN_PHYS(dom->pv_p2m[pfn]) | MMU_MACHPH= YS_UPDATE; m2p_updates[i].val =3D pfn; @@ -431,11 +432,3 @@ out: allocated =3D 0; xc_interface_close(xc_handle ); } - -/* No references to start_info of Mini-OS after this function. */ -static void call_start_info_hook(struct xc_dom_image *dom) -{ -#undef start_info - if ( dom->arch_hooks->start_info ) - dom->arch_hooks->start_info(dom); -} --=20 2.43.0