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 69F68D3F070 for ; Wed, 28 Jan 2026 14:35:48 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1215735.1525853 (Exim 4.92) (envelope-from ) id 1vl6dv-0008It-95; Wed, 28 Jan 2026 14:35:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1215735.1525853; Wed, 28 Jan 2026 14:35: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 1vl6dv-0008Im-6G; Wed, 28 Jan 2026 14:35:39 +0000 Received: by outflank-mailman (input) for mailman id 1215735; Wed, 28 Jan 2026 14:35:38 +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 1vl6du-0008Ic-Cg for xen-devel@lists.xenproject.org; Wed, 28 Jan 2026 14:35:38 +0000 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazlp170110009.outbound.protection.outlook.com [2a01:111:f403:c111::9]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9afc01ca-fc56-11f0-b160-2bf370ae4941; Wed, 28 Jan 2026 15:35:36 +0100 (CET) Received: from DM6PR07CA0132.namprd07.prod.outlook.com (2603:10b6:5:330::25) by LV2PR12MB5965.namprd12.prod.outlook.com (2603:10b6:408:172::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.8; Wed, 28 Jan 2026 14:35:22 +0000 Received: from DS2PEPF00003447.namprd04.prod.outlook.com (2603:10b6:5:330:cafe::c8) by DM6PR07CA0132.outlook.office365.com (2603:10b6:5:330::25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9564.8 via Frontend Transport; Wed, 28 Jan 2026 14:35:14 +0000 Received: from satlexmb07.amd.com (165.204.84.17) by DS2PEPF00003447.mail.protection.outlook.com (10.167.17.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.3 via Frontend Transport; Wed, 28 Jan 2026 14:35:22 +0000 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Wed, 28 Jan 2026 08:35:22 -0600 Received: from [172.23.49.162] (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Wed, 28 Jan 2026 08:35:21 -0600 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: 9afc01ca-fc56-11f0-b160-2bf370ae4941 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jxA/2Xii0HEaj18jv2jcXYbcsSf+MC4DYE/NjR9cojO+w7AlJdDjHctH4aNRY1rkp/pttBCAyoea8Td9loM5zxg87CLPE1i3hQK/uTiSUH/knRfZ5gn37C1aKEFxG8teDgjYBzp9Td5+DylCMdyUJgN7uVdJ77YddhjcsbrQLgitc7vT3V2EKH/rYB4WL+k+XND2beee0UPnkBM2QXilRi+JNEie7kdNMAw5AQUuhEbiqkoFtz5NzTMMF03m2h1qVh0p6AIIGI3MN1Sg4Ns5ht4a0J5b8WumAnMd0N5iucx4Qk25NjW/L6bODv/xo2yf2QZRU85pdk/uucIgA/rIXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NHu8Cz4NJZCZKEg8BY5ysWNTXUrzN9kwI/SmKpiBfws=; b=lqlnUk9NBeQqw3Id4YkXMLTBpvJ+KRRxQmR8PAKEEdTEQIHHTzmVe+MQtJ8u6N/UrcgpI6IeTHSwE8EJ3QaQzebFBGfxumirQcym8NXFZ3NWlYI/1HQrCNfniPhAKaLJVD6YvkU6w0IHNbTrvZjyisi+YD0v+G4e7iXHeehnCBdt46CYmgkCjS5TVVbY1GkinUndOiuweo3uLCT0Ca/tBAjtDT3YMjj3xCnZRuhmoAJ931htYj/XyMEVDwrfiBXwPO1cdIUESCxN+x+1MKQUh9VwyE2lOxHE+B1x6HwFVf1vLOxFqTqnjaRSnIRNqfRU4JoYB4Qt+DIvs83yLixGOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NHu8Cz4NJZCZKEg8BY5ysWNTXUrzN9kwI/SmKpiBfws=; b=xReESmj4mSpNy9hl7BZEZNhV99hgjq5mcBcH5hI7HzYeVRX28IbhN4Oj/OricbBjgkgt74Kn8gLHQYheTvdQlPq4eEXQIOA5Iu6f4jtKZaeoNZiEgNiehUmfX7dqDDWCwOEeu2baI73ajcyDT5gZt8NzqKk+6jlYCHQ3jXvLFL0= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Message-ID: Date: Wed, 28 Jan 2026 09:35:48 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Jason Andryuk Subject: Re: [PATCH v9] common: honor CONFIG_CC_SPLIT_SECTIONS also for assembly functions To: Jan Beulich , "xen-devel@lists.xenproject.org" CC: Andrew Cooper , Julien Grall , Stefano Stabellini , Anthony PERARD , Michal Orzel , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Bertrand Marquis , Volodymyr Babchuk , Oleksii Kurochko References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003447:EE_|LV2PR12MB5965:EE_ X-MS-Office365-Filtering-Correlation-Id: b1c93adc-c0b4-4694-6918-08de5e7a77dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|376014|7416014|36860700013|7053199007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?L1kzVFo3UERlN3VvOWhvb09SYkJMUjl2bWRJcjcyMHc5QUF0Y2N3S2trSG9m?= =?utf-8?B?di9YM0lJenZQa2hlUjFHM2xFQzVnakV1dkdnY2FmQlZsenFSWVZGcE8zaW4y?= =?utf-8?B?YzA5UDVWTjZmOWp2aU9kNENabElHY1ZwSzNhVTdJcHlyRDl4ZHZ3eWRmdjZ4?= =?utf-8?B?VkdIYStyekN6ckt6a05TTnNDeW1Rc1p1bmxCTDMzZ3ZTTlduYTl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-8?B?bE9XUjdFbStuY2JPK3hERFNENE93YWtjcUpsVTkzekNLT0EvZEg0UUNyVnJY?= =?utf-8?B?ZmFSNUFYeXROcldCU2xlcjNaVGxLbmdVdi8za3NWcHNrMm5taG1yNFd3emp5?= =?utf-8?B?bERTVVFrZURJdHBFTXdoSEJSN2wvRUtOakxzbG9BdU1ZOHlDVlJPN2NQQzFn?= =?utf-8?B?aVdhSW1YemhpVmFEbFBneVFCR1NkSC9RWmExM203RHdXVlNaU0hrOUo3K1k2?= =?utf-8?B?QStzVHZzVjA2MFRaODlraExhNHRRPT0=?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(376014)(7416014)(36860700013)(7053199007);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jan 2026 14:35:22.2318 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1c93adc-c0b4-4694-6918-08de5e7a77dd X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF00003447.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5965 On 2025-04-01 06:58, Jan Beulich wrote: > Leverage the new infrastructure in xen/linkage.h to also switch to per- > function sections (when configured), deriving the specific name from the > "base" section in use at the time FUNC() is invoked. > > Signed-off-by: Jan Beulich > Tested-by: Luca Fancellu # arm Reviewed-by: Jason Andryuk Though I have two suggestions below. > --- > TBD: Since we use .subsection in UNLIKELY_START(), a perhaps not really > wanted side effect of this change is that respective out-of-line > code now moves much closer to its original (invoking) code. > > TBD: Of course something with the same overall effect, but less > impactful might do in Config.mk. E.g. $(filter-out -D%,$(3)) > instead of $(firstword (3)). In fact Roger wants the detection to > be in Kconfig, for LIVEPATCH to depend on it. Yet the whole > underlying discussion there imo would first need settling (and > therefore reviving). > > Note that we'd need to split DATA() in order to separate r/w, r/o, and > BSS contributions. Further splitting might be needed to also support > more advanced attributes (e.g. merge), hence why this isn't done right > here. Sadly while a new section's name can be derived from the presently > in use, its attributes cannot be. Perhaps the only thing we can do is > give DATA() a 2nd mandatory parameter. Then again I guess most data > definitions could be moved to C anyway. > --- > v9: Move Arm32 SYM_PUSH_SECTION() overrides here. > v7: Override SYM_PUSH_SECTION() in arch/x86/indirect-thunk.S. Re-base, > notably to deal with fallout from fba250ae604e ("xen/arm64: head: > Add missing code symbol annotations"). > v6: Deal with x86'es entry_PF() and entry_int82() falling through to the > next "function". Re-base. > v5: Re-base over changes earlier in the series. > v4: Re-base. > v2: Make detection properly fail on old gas (by adjusting > cc-option-add-closure). > > --- a/Config.mk > +++ b/Config.mk > @@ -102,7 +102,7 @@ cc-option = $(shell if $(1) $(2:-Wno-%=- > # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6) Maybe expand to illustrate extra flags will also be passed (-DHAVE_AS_SECTNAME_SUBST)? > cc-option-add = $(eval $(call cc-option-add-closure,$(1),$(2),$(3))) > define cc-option-add-closure > - ifneq ($$(call cc-option,$$($(2)),$(3),n),n) > + ifneq ($$(call cc-option,$$($(2)),$(firstword $(3)),n),n) > $(1) += $(3) > endif > endef > --- a/xen/arch/arm/arm32/head.S > +++ b/xen/arch/arm/arm32/head.S > @@ -48,6 +48,13 @@ > > .section .text.header, "ax", %progbits > .arm > +/* > + * Code below wants to all live in the section established above. Annotations > + * from xen/linkage.h therefore may not switch sections (honoring > + * CONFIG_CC_SPLIT_SECTIONS). Override the respective macro. > + */ > +#undef SYM_PUSH_SECTION > +#define SYM_PUSH_SECTION(name, attr) I put this through CI and it passed as-is, so it doesn't need to change. However, included in a different branch with some --gc-sections experiments, I needed to add SYM_PUSH_SECTION re-definitions like above to: xen/arch/ppc/ppc64/head.S or ppc failed the linker script ASSERT(_stext_exceptions == EXCEPTION_VECTORS_START); And these: xen/arch/riscv/riscv64/head.S xen/arch/arm/arm64/mmu/head.S riscv and arm64 built, but hung when booting in CI tests. There are also these: xen/arch/arm/arm32/mpu/head.S xen/arch/arm/arm64/mpu/head.S They aren't built or tested in CI, FWICT. And they are not in alternate sections. Maybe an ARM person can chime in on those. Thanks, Jason