Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3589885pxb; Tue, 7 Sep 2021 03:16:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyX9JXN1cJwOa5SK5aNB6n4M5IC8/bx8xpkizGUl+5BogB6/C/PZiCt7a6LEJYuyTSjjuI X-Received: by 2002:a05:6e02:1094:: with SMTP id r20mr11305515ilj.55.1631009796632; Tue, 07 Sep 2021 03:16:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631009796; cv=pass; d=google.com; s=arc-20160816; b=JOwB7GrlD/wuhNm/IGhDan+VVma23Ra/Krrmeeb/f1zY5z4LXutkELom6osGxbSUKA QBm7WuffKjs692WZa9a0GGuXDcNBvYSUuvvkoJDgmPHah4rMV8YM780QiAIInKOsrRs7 23Ou9lxI/mFwOmQ+ng4Wncp+97acBhAHb9usjXIg/FmxqgeHc+tTOIL2GqovrI750K2y rJLwb1DEu6H51e3fNp8EsPJV/ifs+jrdnzflscaD25zfphifOP8eIWCIaz6JTsLzhjBE MJl5RMUtPC5Mi73CrwYRs43pZdrNg0YgyZY8hexlCkNehe54GZxZiMant+uUwfFmlDmw 4tWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:references :cc:to:from:subject:dkim-signature; bh=uHbz7vDnLyWZn+Vx+UcHtoqyEcsa9/5Gh3CvlM0cqI4=; b=H+RB8MgLdPteWVWaar8BHJh3TSb4F2PSdJwXWwDvWTONm8KEjYcp3DvYnKWUqfGQUS MQhHM3X9uU+eKheVM81sz7upYS8P/W2Vg6iQSwiXZaGTiJu2gc7RM5TUUP3tmIQQF4Zu ytuKowbOUZ1iQiTo8f5XoOjMtFJqIgP5EG2WYB1EhaUuQ5im2Vh7jKbVYCaqop8deoW5 gatEGr5w8yME3T9pc/5EcRKIhS8loS55AjTkOfe1e4FJ4m9WUGKQ6uQCjyQB+/OcYbau 3apPfWofVRFo/P8fMdbwHgVhKwleBltIFixxsCCKGCWP6Xo0Cc8IDhXz2FQ5ucSONPt4 klSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=KN6HwCli; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si11472340jao.99.2021.09.07.03.16.24; Tue, 07 Sep 2021 03:16:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=KN6HwCli; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245255AbhIGKOW (ORCPT + 99 others); Tue, 7 Sep 2021 06:14:22 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:48049 "EHLO de-smtp-delivery-102.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245385AbhIGKOS (ORCPT ); Tue, 7 Sep 2021 06:14:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1631009591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uHbz7vDnLyWZn+Vx+UcHtoqyEcsa9/5Gh3CvlM0cqI4=; b=KN6HwClin63jXWvTBny/tu4g59X4oqvx6zcXsbmr3lsCenbIbAJEPtapBNLZGue+NLu6du ygPD2OTXBxtxaG+REhtO8u0hPVDWxebunneTgUCiiX5xFLNuiFhALFBGIwc9piF+U3zlfq qQV70aqbPT+ruBcD9irg6DbgRC0RF/8= Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02lp2055.outbound.protection.outlook.com [104.47.6.55]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-22-lAzMNj_cNImWjXxDWmK0UQ-1; Tue, 07 Sep 2021 12:13:10 +0200 X-MC-Unique: lAzMNj_cNImWjXxDWmK0UQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CO9BcPUPSzL297plkLrfWFu7JBxYVt7I/sm2DxAIRgrmZVbvi88U8qguy6371yqm9kz8qhMwxhMFFLRlhZ5HY82bQayRNOVCOBIm24CVkrvKHw4FftUdWiMOmcgRDpXOHqTYgFxfUNaYU/yIdNnVvBOCkOwEu83JoWaGYeC3Lta0648dZZsaC9Jsu4+BzQRNV2aMnemE7SNIwIxb2Ocnevp/nvLQy2KaClYIll4E7TCpQVczB7ewPfwjulesVAp66T6xc4Qr73ObL8p1dRSa7pqfu0KJVsiwHi7oL0LWJ6hLCaTisVnRvsFdv8JzX5lYTEgGhpxOAFAH579+F0qz2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=uHbz7vDnLyWZn+Vx+UcHtoqyEcsa9/5Gh3CvlM0cqI4=; b=SV1lgHXViEVBZwaxVWq5uFMF/sQPvP/wYSZD0ULY57z+Y/56InsHTil2/lY9qNm6K86QhRH9xPTfYdOL0l61THIgqSgt1OI2bods2dHS3917F/K3IG0PJZo49riBhXU6y0Pfi66Hu0ozpLtWJYRaQjWqib8uI2OUIyhz1ipxhA5woFhokQb2P6ZLdHsqOC5/hXvsqtt0gijogZNeqcdzoHQmK3QJd1PGi0H7oNQokQDLjjY+BxkWNfe9/qU7oA0XzkfOSDZKavbrMZfqUO0k11b9xnvJ72b1q4lJyqNuxzCKUoFuVhMpApnBY0XG3Lhm4ePisABDVehASkMDl+fvQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR0402MB2703.eurprd04.prod.outlook.com (2603:10a6:800:ae::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Tue, 7 Sep 2021 10:13:09 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b%7]) with mapi id 15.20.4500.014; Tue, 7 Sep 2021 10:13:09 +0000 Subject: [PATCH 9/9] xen/x86: adjust data placement From: Jan Beulich To: Juergen Gross , Boris Ostrovsky Cc: Stefano Stabellini , lkml , "xen-devel@lists.xenproject.org" References: <4efa804e-3250-227f-00c7-347581366cd4@suse.com> Message-ID: Date: Tue, 7 Sep 2021 12:13:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: <4efa804e-3250-227f-00c7-347581366cd4@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0075.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::10) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.156.60.236] (37.24.206.209) by FR0P281CA0075.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.6 via Frontend Transport; Tue, 7 Sep 2021 10:13:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b22900b5-8fc6-421e-fa29-08d971e81776 X-MS-TrafficTypeDiagnostic: VI1PR0402MB2703: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uCMHuxX+xBvqr/iRMqO1XJwMYXmryJxG883EB/0M+NJsvlk+2wfaxDxFYjarYaf5aSVvzXW+pAZIIL/8tNo1cHdqWvzHsw3su7eudn8OT+5ARcRu/DqaHB9F4yuBy9UBAetQgm5eLw9OLeJDTe05/2xiVLHTe1KNFmasosWjJaXPWMIiGyHAnmiPD8t+VTIaoT4uHb8rZtG4xehUe6SIVE/b0HUkJM23XtwqLIgp0qX5HRiiyD82W7v814NwKhwZVckgq4umi3P6GukOc0RxMaJBqWY+m1LASLP24cCPPEApKFnso3KAxk9ly3+H3eVj/bhyT56R+1FpxD4elSqVwhTvsatXAUULBDJnBfsnKIbExC8SQ4q+4RNQIdojr5VXnuHnGwlTYWqRDGNX1nEWOiITI/CyBfubhULG6toIKJuyvIYuhl1bHzl3qkq/SVraeeShzupa1Wt4aV7A0rkSimRCzD4WLCVHP898z4I3stH3aJsd2Z9a8u4s7YNPZXyoq1Irnc1UcFDqUFn7u2qiUeN8te5H5pTGSiQDWEAVWSxuODhevEW6fhLW2dwIQaawjfYbEL8H2yCdKP9URsVNPA5QlZVwCWC5VLG1TGwGZHJxsMChbjPHewyU2s8jRijHNOGGNayhC/117DpchPBWi2dpZS0NEkAB7PzMw1pmvUAcUyEfODjNouPq27hACyNU+UbPpCAAIC7iOKqKxD2xXmkbjt5ySfNnYTtrbdclUxE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(346002)(39860400002)(366004)(376002)(136003)(4326008)(186003)(86362001)(316002)(16576012)(8936002)(31696002)(478600001)(8676002)(36756003)(2616005)(956004)(31686004)(38100700002)(2906002)(26005)(66476007)(54906003)(66556008)(6486002)(5660300002)(110136005)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WGNlRVk1NHd6cFpWVnIrb3F3bEYxSHJlTmF1ek9DcUYvblUzNWwwZWx2NWo0?= =?utf-8?B?Q3hDcnV5NHA5bW1uekFzNVZqRXlET01yUGJ1WjM0NktmQmJrbkFPQUx6SXhB?= =?utf-8?B?d2p2a2E1ZUdLZG1hUE90d3BaT2RHcm1SM29uM3N5Qjl4UFl0TDFDdmtDZGxW?= =?utf-8?B?bTZ5RmU3MkordlJXL0oxeXBSbmJ0ckNHUHdGU2Rnakg2RElGY0IvUDdGZW4y?= =?utf-8?B?SWMxc0JBVDNrMnMra3ozbkNtMkQyVkVyQXRGTDJwSzBBeXZHaUVBK0VWdFpp?= =?utf-8?B?TU5GTExoaXlCazc0NWhmeiszdDgzaXlUZTlnSzJSdEg4VDF3MzluVHVQa1F3?= =?utf-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EWlg2Q1l0VTB1?= =?utf-8?B?bCtGTUM5cXZCTm9yMnQyTS9vNm1BMElqdE5jZ3RLSVRJUTN0OGg5VTVHWjd2?= =?utf-8?B?ODAzQ21OeFR2ZmdSL1ZRZE93WW1EbWMrNGZwUEk2SDJwejJtbjhrWWVnVlM2?= =?utf-8?B?YXNHNmhjTml3TXBibTlUK1AxSm9zNWhGamduK0V5WUZiakw5UDhxaHBBakcr?= =?utf-8?B?T3Nsd2s1b215SkY0NjFTOTRhRkwwYzg3b2tzQjM2RkdHUEZkMlJSTFBnWlNm?= =?utf-8?B?dlNJUzI1TGV1VEl3eDFxWXZnZlJvelZUVTI2OGM2V0s1VkxmU1EyZzVhYzk1?= =?utf-8?B?TjV5V0RqSEl6cjFGOGxnMXdRNllBRHJISFoyaHZXSWZJQk5oeDZvVmdidnJR?= =?utf-8?B?OE84cmxyNE8xVm0wWkkzVGM1cktvUzVDWVNiVlRnajhqcXBVQ0Z3R0NuNXEz?= =?utf-8?B?Wm1VWlF4U0ZOOFptVVhIMEQrNVR3bEZ5SVhaZHFEemZvblZWTDdZckdHcVhn?= =?utf-8?Q?cwyfKC2l3iJ7Px6KrYVYCJyr9ZtMFFFAVHYvlhg?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: b22900b5-8fc6-421e-fa29-08d971e81776 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2021 10:13:09.0759 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +Uj30H/dxCjL3C4AsS8QjgM6Vtm1xcoiuIO9jw3ooI7NZY1d7mgUvG595wG/XmO773j5EXeiB/LXDbGTSMW65A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB2703 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Both xen_pvh and xen_start_flags get written just once aeryl during init. Using the respective annotation then allows the open-coded placing in .data to go away. Additionally the former, like the latter, wants exporting, or else xen_pvh_domain() can't be used from modules. Signed-off-by: Jan Beulich --- I have to admit that it is completely unclear to me which form of exporting I should have used: xen_domain_type is GPL-only while xen_start_flags is not, yet both are used in similar ways, extending to xen_pvh. --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -75,7 +75,7 @@ EXPORT_SYMBOL_GPL(xen_have_vector_callba */ enum xen_domain_type __ro_after_init xen_domain_type = XEN_NATIVE; EXPORT_SYMBOL_GPL(xen_domain_type); -uint32_t xen_start_flags __section(".data") = 0; +uint32_t __ro_after_init xen_start_flags; EXPORT_SYMBOL(xen_start_flags); /* --- a/arch/x86/xen/enlighten_pvh.c +++ b/arch/x86/xen/enlighten_pvh.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include @@ -18,10 +19,11 @@ /* * PVH variables. * - * The variable xen_pvh needs to live in the data segment since it is used + * The variable xen_pvh needs to live in a data segment since it is used * after startup_{32|64} is invoked, which will clear the .bss segment. */ -bool xen_pvh __section(".data") = 0; +bool __ro_after_init xen_pvh; +EXPORT_SYMBOL(xen_pvh); void __init xen_pvh_init(struct boot_params *boot_params) {