From nobody Tue Mar 3 03:08:39 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; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1772024410; cv=none; d=zohomail.com; s=zohoarc; b=Kv8Wgm9m1v+J4GTrozEfiayvXuu/r3c5rkv0PkMzNhr4mIWBJN37qIuxQI8mvbCPcRx7ak29Ngzi9mVQGfzY2c89d94Vw5v0y0HGimhhF4OuyGnFBPR+NtfhWDLyISOa5wR7j+im8qjywYkfj3flugKgfx7WQT4huCO63tEJuCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772024410; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wILc9CGEf1WIqbCiw3qNVsNe1/HTYv9pl3xfzMp11zI=; b=dSVodOdq83tNx5e9rg32MLmqXgodEefQhBF1CbyoqKinfl6ScYPQJrA1NZsgWTNAz1mmhBrtccVCDCOYU/Wgo8iD0+N50ZrT3e/NMQG80GqDy6K9OfKWF9G30TYQyNu0sxwun+Z4s6RSQe6T1euN7d7/Ea2RV1LzfZVn2hLE4EE= 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 1772024410696532.9447488179144; Wed, 25 Feb 2026 05:00:10 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1240732.1542015 (Exim 4.92) (envelope-from ) id 1vvEUa-0006bn-2v; Wed, 25 Feb 2026 12:59:52 +0000 Received: by outflank-mailman (output) from mailman id 1240732.1542015; Wed, 25 Feb 2026 12:59:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vvEUa-0006bg-0O; Wed, 25 Feb 2026 12:59:52 +0000 Received: by outflank-mailman (input) for mailman id 1240732; Wed, 25 Feb 2026 12:59:50 +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 1vvEUY-0006bY-9i for xen-devel@lists.xenproject.org; Wed, 25 Feb 2026 12:59:50 +0000 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [2a00:1450:4864:20::336]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id db087ef3-1249-11f1-9ccf-f158ae23cfc8; Wed, 25 Feb 2026 13:59:44 +0100 (CET) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-482f454be5bso8272965e9.0 for ; Wed, 25 Feb 2026 04:59:44 -0800 (PST) Received: from localhost.localdomain (host-92-22-18-152.as13285.net. [92.22.18.152]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483bd732eb1sm69925795e9.12.2026.02.25.04.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Feb 2026 04:59:42 -0800 (PST) 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: db087ef3-1249-11f1-9ccf-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1772024383; x=1772629183; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wILc9CGEf1WIqbCiw3qNVsNe1/HTYv9pl3xfzMp11zI=; b=InEI5je8+7v+78AqYekmmp7ZYvejFrqlqQ0Aai4jVVCpC/vZjhZg7m+msJTCOskJX9 DtwEyJT6fUa63+Eq9Jcb4MS9Ru1YUQR56+bwhyD/kkBDVs0IiYfqpg48s9anzU7ee00G hcgiFIdUUQ79ogh9Tfjag5qlIWtoGZApfTOBk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772024383; x=1772629183; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wILc9CGEf1WIqbCiw3qNVsNe1/HTYv9pl3xfzMp11zI=; b=EEaf6YHFkPbsW113BydjExD6TDcxCDZTWJ9uNJtVjbm6z0d6QAPizW9Rc7+uIpU3G1 NbzM/tHCapjtOahLLgAF4qingMfn7GK6TD0+BFDXs1mTcO2s5Di9grJb5qSvEzsteloM MaLGFCl6DP4dxUCK6h/QAwTQ9u4Qi74f6jmNcWf/M2qi2bW7EcsyJ26hHeFBRMURqiRi qnaIjq0wcKOLJ1OR+SPvZ46n+zTe6gH7CU90p5toa414Ff662i6JcsDBZ16uiUqy7CCJ M3x4k2AOQwdZY9H1DBo2AeEE+ox98Cn7bpIgK52jLsa6GpuGQyV4ePW4hR3h3/05cP/S zqUw== X-Gm-Message-State: AOJu0Yxf1ap7o0kryIsqEA4gjKaKgBupyfvdoB9pIbdiWIN2FBVZ2y0A xXPMYN4lX3hlqA0l418F+R7YL0eYZVjFm7PwWxpu9aHiWzjg+Pxw1zkleBLibAwLN2/i7iYFIID R9L2s X-Gm-Gg: ATEYQzwL+hz1KiaDfeAK5reuutl1A/99aosr3ktjGYBj88Ldm754/g4PFvivt4mcvV2 v4RzvLgTcZQSHMv/4vTY/AVHSv6nYF9YBpea3DXpvOjgpFGlqGMpG9Kk7Dl3JwnGtNx3CayDwyC n6TqJO8zgmcI3z3Rzsld1vpX7XXs160t0x9YdmFRoOitsvHJv4Rp+S7jOI2BoZkl9TlmXJ4IiWo HKvW+8iVK/79wqEpH1jpMDTnZlJvstRJNDHFcgyz3RzWxAcKltk/dJmFFjE6SoutjsnE8Iw/1yD gDxQlmbsmIzYWLP/HHejb09qlr+2bSeRM3uBUzyGGfhntBVwZGAOJI7KFGc28H0t7XEiF0NjC/i TLudRfhgM/bXfdnOhkigU4lSWnIzxd2AfpyH1AZef3k08llGWD0OHiFXQCoOlXAMieGTg8iMPhu gCgeTZnQeTtZ74tkqnCRIcHV3oJunsdgMyu8jy94CJMJ+YxMTehVnRly8ZOklSRNCa+JHr1pA= X-Received: by 2002:a05:600c:21d4:b0:483:7eeb:4558 with SMTP id 5b1f17b1804b1-483bd713d0bmr45333455e9.2.1772024382569; Wed, 25 Feb 2026 04:59:42 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH] xen/mm: Remove claim that INVALID_{MFN,GFN}_INITIALIZER is for older toolchains Date: Wed, 25 Feb 2026 12:59:40 +0000 Message-Id: <20260225125940.3804137-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 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: 1772024413086158501 This was never because of a bug in GCC. C requires that static objects are initialised with constant expressions; _mfn(), as a static inline, is not and cannot be made to be. Correct the comments. No functional change. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini Slightly RFC. I left 'global variable' alone in the comment, because C's "object with static storage durations" also isn't ideal; there's one user which is non-static in terms of visibility. I'm open to adjusting if we can figure out some better wording. In C++, we'd just make _mfn() be constexpr. It turns out that C23 added th= is keyword but restricted it to objects and therefore useless. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm literally admits that constexpr on objects exists only to force some diagnostics which were previously optional. --- xen/include/xen/mm-frame.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/include/xen/mm-frame.h b/xen/include/xen/mm-frame.h index d973aec901fa..80885415a78a 100644 --- a/xen/include/xen/mm-frame.h +++ b/xen/include/xen/mm-frame.h @@ -9,8 +9,7 @@ TYPE_SAFE(unsigned long, mfn); #define INVALID_MFN_RAW (~0UL) #define INVALID_MFN _mfn(INVALID_MFN_RAW) /* - * To be used for global variable initialization. This workaround a bug - * in GCC < 5.0. + * To be used for global variable initialization. */ #define INVALID_MFN_INITIALIZER { INVALID_MFN_RAW } =20 @@ -45,8 +44,7 @@ TYPE_SAFE(unsigned long, gfn); #define INVALID_GFN_RAW (~0UL) #define INVALID_GFN _gfn(INVALID_GFN_RAW) /* - * To be used for global variable initialization. This workaround a bug - * in GCC < 5.0 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64856 + * To be used for global variable initialization. */ #define INVALID_GFN_INITIALIZER { INVALID_GFN_RAW } =20 --=20 2.39.5