From nobody Fri Oct 31 09:54:14 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1749122230; cv=none; d=zohomail.com; s=zohoarc; b=BJH5D+mCQZTatROxjwUiJJbXFajdjbdRVoVTaQE8tbKWY0+WtRVFWp6E7fg/SDqVv+OcfmP5jGMQr2xuOsIt7joKxDIQ+AXsN3LY+VUVOhMwmU+St/8psl0CCM3GSRJxrIblI0TDdOOAEZ3EGEhJuD1K7ev7QiVcKBacDCphZRM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749122230; 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=3LwfB2gF9isEgIiM5Co6kyT/fwMQ7m7hvxAgSTzQdrA=; b=Dj6IXmsItlwGinMMXjLoSktbcSvdeTr0qtIxc/hk4bwx8+w1fUQgxXuyMNQivZZk85ts7pjRQR3ompPee6Xz4NM1bEaSmgiSEE6dHA5iMWK8Z8enQcU8uN09ZNDFubOL0LP+mnzpq2GTutgpirJDCsdcVUhNUgGW0hhtG1YhI+Q= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749122230103451.29142850584174; Thu, 5 Jun 2025 04:17:10 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1006655.1385892 (Exim 4.92) (envelope-from ) id 1uN8aY-0002AA-Ji; Thu, 05 Jun 2025 11:16:50 +0000 Received: by outflank-mailman (output) from mailman id 1006655.1385892; Thu, 05 Jun 2025 11:16:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uN8aY-00029H-EY; Thu, 05 Jun 2025 11:16:50 +0000 Received: by outflank-mailman (input) for mailman id 1006655; Thu, 05 Jun 2025 11:16:49 +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 1uN8aX-0001od-54 for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 11:16:49 +0000 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [2a00:1450:4864:20::435]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8f4bc1f5-41fe-11f0-b894-0df219b8e170; Thu, 05 Jun 2025 13:16:43 +0200 (CEST) Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3a522224582so484847f8f.3 for ; Thu, 05 Jun 2025 04:16:43 -0700 (PDT) Received: from localhost.localdomain (host-92-26-98-202.as13285.net. [92.26.98.202]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a526f4c808sm2043887f8f.28.2025.06.05.04.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 04:16:41 -0700 (PDT) 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: 8f4bc1f5-41fe-11f0-b894-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1749122202; x=1749727002; darn=lists.xenproject.org; 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=3LwfB2gF9isEgIiM5Co6kyT/fwMQ7m7hvxAgSTzQdrA=; b=K+v9MopssMNGw8HdOn+44h2jX56dz8SEVoNkGzOXsEG4kVoud/oRwZv7aM1ZNxnKMr +tdEdh1ltQwa0wAd2aEH4EWq1zczsj06k96uA1QUmdrX5XGTA42c5Ob8g4m5Nmd06482 nSra8EImvrPwU9jRNT9Bi6YgEYKFSySeuSV1I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749122202; x=1749727002; 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=3LwfB2gF9isEgIiM5Co6kyT/fwMQ7m7hvxAgSTzQdrA=; b=G0hfG8ij//bJs7FEU8u2lvySdXrr01B62/4Qh/gSyCMNzzTx0cVB9sv6+0WxdHXvKD EhgBzvpWgaO1vERWg2DpFQ8qaxBT/OUpgUGADVQClQNiEXjf+1h+Azyv26fycvxAuKdI r90bF7zYQAXziFaGjtoxQsK+Q6VpBdCrcoa2atIuHTZpnC0Q65UURzPUkd33pCS9fZCT fpzu3xdkDLWROpc7gWbWheDLuKLS1jYNSaGH93MHOoVBXnGAeb60hx7HfPA+yjYx6ilf EYMB/0ufgeI1Kjh8OGf4Py0kr1ZLV897JCMg7MIqh+GEBslGhZFqDurCJDG8fXvVEit3 eoug== X-Gm-Message-State: AOJu0Yw/XfiLQCTENEPBo/Dx0opkewQH4nlNyhIYR7QlOeRrDL/7In+Q OwNDgAXNLiddP3AU7jS5AXUAaUlS4QOP72gxQ+B6kF+aUBgmXcfl2DZZwiTFUMb+dDAHQhMgdAL y0xK4 X-Gm-Gg: ASbGncvflaE856IJXhJbOPAb6+mzQRC9Oj37KFas1DfxfBBTWKl+FV9cAgCp+tpj7Kg ztXOPtGi+7VsKlErKtxzEXAHC3bf1YPZ9y2CKRHn8mVVssORQf5sxUiiDE0oNfA/Ppibh+HFZIx 3gJknJ7d3BpaSyi82wvG12VnXuQW6BquvMRjnvv9Qu+bJFrLJUQaxRc28gGztFolo372I4EnDYr IalWfDkPk6kYFGUMU5LE+AJMvtR6Pe9zM09yM2IZZQg3aduMpl6rffTDVmH+Obzmndto4HIQzw+ MCQRvhJsldLeV98WLeSlcDhcKS8AFaa3gwvZ8uL0Y576+Yq6BM0TmKIVw38A0/mM7wge/KCbfn/ xhQo6no/dDEAYo6Ie5CWcvlGw X-Google-Smtp-Source: AGHT+IFVlMhltrqqcKZXTRbuUVmCW3hd9rmmakfK2vK2/mAGdohruOl3xoKC6/s8KgnJs25bYvBvig== X-Received: by 2002:a05:6000:2c0f:b0:3a4:eecf:b8cb with SMTP id ffacd0b85a97d-3a51dbe3d35mr5517306f8f.28.1749122202237; Thu, 05 Jun 2025 04:16:42 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Ross Lagerwall , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , "Daniel P . Smith" Subject: [PATCH 1/3] x86/EFI: Fix detection of buildid Date: Thu, 5 Jun 2025 12:16:36 +0100 Message-Id: <20250605111638.2869914-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250605111638.2869914-1-andrew.cooper3@citrix.com> References: <20250605111638.2869914-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1749122230642116600 The format of the buildid is a property of the binary, not a property of how it was loaded. This fixes buildid recognition when starting xen.efi from i= t's MB2 entrypoint. Suggested-by: Ross Lagerwall Signed-off-by: Andrew Cooper Acked-by: Daniel P. Smith Acked-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Frediano Ziglio Reviewed-by: Roger Pau Monn=C3=A9 --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Ross Lagerwall CC: Marek Marczykowski-G=C3=B3recki CC: Daniel P. Smith I don't like this patch and tried hard to do it in a better way, but the EFI aspects of the build system are too intractable. While on x86 I can in principle pull the same common-stubs.o trick, split on XEN_BUILD_PE rather than XEN_BUILD_EFI, that doesn't work on ARM which hand-codes it's PE-ness. Also, it's really not EFI related, other than as a consequence of that being the only reason we use PE32+ binaries. Binutils 2.25 is now the minimum, and the makefiles can be cleaned up somewhat, but I need to backport this patch, internally at least. --- xen/common/version.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/common/version.c b/xen/common/version.c index 5474b8e385be..56b51c81d2fc 100644 --- a/xen/common/version.c +++ b/xen/common/version.c @@ -203,8 +203,11 @@ void __init xen_build_init(void) rc =3D xen_build_id_check(n, sz, &build_id_p, &build_id_len); =20 #ifdef CONFIG_X86 - /* Alternatively we may have a CodeView record from an EFI build. */ - if ( rc && efi_enabled(EFI_LOADER) ) + /* + * xen.efi built with a new enough toolchain will have a CodeView reco= rd, + * not an ELF note. + */ + if ( rc ) { const struct pe_external_debug_directory *dir =3D (const void *)n; =20 --=20 2.39.5