Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3612842pxb; Tue, 7 Sep 2021 03:45:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRyBh0fStNAQK9GZA4LyxGW7/xaRnDsRPpWbnTDDm1MHHx6XzNs0r8ayJumF3pDebkXC7g X-Received: by 2002:a17:906:1b08:: with SMTP id o8mr18220934ejg.21.1631011541636; Tue, 07 Sep 2021 03:45:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631011541; cv=pass; d=google.com; s=arc-20160816; b=D6GhuFPki/T/qMqHEnFu5SurGKga5BtJDZDJHjn3xYD1vblzH+oLhMEDKTsZIEjyOt Ew1L+fe9LX2HJWk6HB5shxSyUrmjy+ijtOfwbNe/Xk/EbrwO10RkpyR0fx9PGwwGaXbZ I5aV7nXr9d4TDv9uQrh+aF707Lb1ZTXY28I4obEW7dcu8HEl1MvG6AItlYg9XvBS+gNZ EsGNjr/RPe8GaWtvESbIIBCsfD6iwix9wEpUF+gkZcuQI4CbrhMb+KBkZaQtw/otRDnd efWCIPr+sn03Ur2Lzr3vycjLi4E5qq31d6Y1ZsXkAngc/HRKAsilYsQ4iyKG2S4MUa1p EYew== 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=NoqsE6RzeJ63b2XMCTslouLkpUVTdP62+7GdGZP4LU0=; b=L4CjgE1SfLlyAniRxNal9ZeyF/sQLDRTvKDY2VDfd3yG80+9e6iGFEYMgYF4by/TIt +PX8oXQBAtDEKYZYnvPufqYYts5GKk+kqFJW9GX4Gq88w9uQJP1oy4QkAy7+y89JSe0E a8tRTpVTYgC+P01kRRHTsgwibzS6JE5uZNer0JrRSEPmslUFJsaiTp9bkXm2r7vDHEbT NV+OVy05C70oT0UwrJdg/3hcqIilPeh2XXNHEwHeszFKfacA3DYOvFI7PlmGjNyVcxTu csW0VSlHJmg0tkvRlSLM09m4+v7I/F9AlSYKiRbPPp+Y5RwTONCN1M/9hLwKlYSV1Onv 82hw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=i3CHbROn; 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 z3si9729801ejc.215.2021.09.07.03.45.16; Tue, 07 Sep 2021 03:45:41 -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=i3CHbROn; 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 S245216AbhIGKNp (ORCPT + 99 others); Tue, 7 Sep 2021 06:13:45 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:23913 "EHLO de-smtp-delivery-102.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245105AbhIGKNo (ORCPT ); Tue, 7 Sep 2021 06:13:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1631009558; 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=NoqsE6RzeJ63b2XMCTslouLkpUVTdP62+7GdGZP4LU0=; b=i3CHbROn0nt1byhiqZugM7lG3rh7L2nDA/NFS7+5A1HuvYTBClaMvaAd+eKj9yx6sMO1wn qWIhKx7rqORLqf+Evvgm5EGS1Q3DaxzS8xhHePMR+JfuQOrNkr5+N1zY481k2/RQThZiUb pJ3MtXavHgUfjvoVxJAI1Fe9/81r+HY= Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02lp2051.outbound.protection.outlook.com [104.47.6.51]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-32--O8Ql131P1-FXDx8m-4q6A-1; Tue, 07 Sep 2021 12:12:37 +0200 X-MC-Unique: -O8Ql131P1-FXDx8m-4q6A-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LnMaN/3OzsXcZ3gXFpzLWzvagDaAfbNrTLv5rFJH+hLkrJJjjTQzG4yzs65RgVJUs0Kw8ZpDQkFKsf0y1Vej/7fcgXASh0HgxKWMOh0dF0kx3MyW2C72peug4iX1OJTNoH3d11gHh899NlWXzmDJm4O2aibvvc27dnTNRYfBhI0sYArEEmT+UgOsbY6+IObrrGuTuQFLrYf55n9kr5L+/P++lSxmrxdMYcfuY99z0O/iXUpDRIQCUHZUsbPLe5Vmkim61pWAeqMRiPFJ+R9dZzXu4VJwFdp490rzp0GmwXpszSskNweay3xsXYuPsIWio28a/6MdnzwY7C2BX4JE5g== 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=NoqsE6RzeJ63b2XMCTslouLkpUVTdP62+7GdGZP4LU0=; b=kge3izk4Fd0bUQuG8G+Snz+9pyivcl9ZW/sw4nSkHSnmV88faIA2+UglbW2bhYyrNQIvQ77m1b39Gckw1myUAZAk68xNRT+7ge/TRVeN8WUYOsL4PrMp9wzzM2bhA1VYQV6t055HNu8YwKv5jQSdMtxUZBnZ9Zdm5mUJgzziC7WdanslfaG5JGoPNoU3WEW04T7nEQmBXChqlxAUSuvHd0CsfO3DWhlw/UdDu2ffORiLfpJKKmW4coqxiCh0NV4+IrPnihyMTYvYeiI87zcG9K9/7u2IdrY32k2k94Z9xyyfe9UgmLDa1egWNyu/x6i0pACDjz/dipv7QLZ/WEBlJg== 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:12:33 +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:12:33 +0000 Subject: [PATCH 8/9] x86/PVH: adjust function/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:12:32 +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: PR3P193CA0016.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:50::21) 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 PR3P193CA0016.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:50::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Tue, 7 Sep 2021 10:12:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 68249380-d5a4-4ca9-8f0e-08d971e8026e 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:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fG3g44J0l6hwlac5jI3G0mfTy/DXJoU+bFuTnoRWmaEf0fUH+NouvKFRCJqleNM3Yb3gjMsn/BozIZAbIZK/3cLVsMMewJC4KlWCjIXWX6IYo7xbUgU7yj9Z7AQFEhtlG3bmJUsr0aLhLj3BK913X/AnehzXCPL50ADvGhxuJCGFj9wj2UJcaMy7ToverXo3VP/SXjRwYjAn4gwFjvo6hrKEu6e4IP3XkRahrn/hzlUSaSf2DhNK2N0hL3FnMHXTQ0WqZ3/yUQES+MY7d9+ymH/rB0fhenJMEeiUnUWKnyt7k34hhJa7W60qg1sWDeiOY40GiktubBvGPNtJjzXR+EkDzeHQFsEuxE3NQxfKkFApH2F/ji2XjnRrzn7PJJl8kAA8qSvpi9gtbfZiFNzz38tYNfBUUG4hhB+7281pXeztqvnPAxe2B7PpYqfy8rLJAgf9I2N3KsjN98u33Aw7mgnLgAnZ1nvHs0P274ITf5K+lc+EGFTMZwIlkUJTVGmueHy5tkAtxibFWUEVYSqnIy4lztJyYnW4QLmufrh1B8n3rVSXI67DBW8ucjrkGvncANLYqpfIh0jZleiD4XotAGmph46ZUGqdgwfMZhlmaaCMW1I50HPPA+p1JgOS7TpdgaMnzYy5SrgV2iU0QrKafPx/P+t95+UBIrnGb1lKJnADd5dEFoXY776y4Xk+yPODEIBtYoQ7ws9EhuuzBp2356BXRhIsdsHtQ1SmdFa2BxI= 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?MXRxamZQT3A4WnRGMkRhVDlQYVlqVjFIdjNZUmVXMlQzTFdwRHBIOU5saGJW?= =?utf-8?B?cHprTnNybEVhRXFyY21PVXZOd3duRmJGTDJiUFQvLzErSzFiZ2d0VUJsRUNh?= =?utf-8?B?eGJNaDgrTkpDdnFaMlhBRmNwcVI1aXhCbWJTZlJPNzJRVWt2REl3QkVIK1BX?= =?utf-8?B?SWZPYTl5RUdlWW43TTlHL3Z6Mm5BYWphVVRkMkNsNDJWRmNKZXlWNDNPZGI5?= =?utf-8?B?TGl6dHcwV3ErSm93NDc5cjhQYzZPTklpSWdaeDBOUWZua2FSRlVGdUFCaHla?= =?utf-8?B?aG4zMGxmV2VSalpWOVRzQ013VDZMd0cyVXJHRERFejJ4L1U4Lyt6eit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iOVR4RVNxRWxNUmFHaHg5MXlJ?= =?utf-8?B?cXRDOUs1cXBPMy9LWFE5RjluWWs0V0NwbnpSTFBGbVRadnFBV0k2YWVQS3dS?= =?utf-8?B?V2FESmMxMU9FSlBCTmdGODYwbkpia0c5MHdjWkRjeFZlYjdnZHZ5bVlBYjlx?= =?utf-8?B?aWdKaVkvbG1SYmJheTZxeTZWNUgzdVRrOHpXSzlXZ1hXMHVPK2tzYzBxRmcr?= =?utf-8?B?d09uYXdqamZQRXVOZmFIL0JiZTJkanZVTzhsWkVEZlh4VVladkY2MzlybFhW?= =?utf-8?B?bXhRd05pSUNxeEtnRjZzVVY2Y21jZDJ3aUUrVzN5OFY5bkFSMjU1Lzh3S2h6?= =?utf-8?B?NS90dUEzUkZPT0lRVGhXb3pqeHpHYk8xdGdMbEo3R3RlU2gzSGtnUmZIOFZC?= =?utf-8?B?cjVJNURqWEcvNGRISWlNTHFLVzFvQWVEdUtsZGR2VjFDUjRyVy9IZEx0RjNQ?= =?utf-8?B?aUVRSEo4by9uUjJObFpwRzYzUUlycXJHSjU3czMweWM1ZWhOS2VTc1ExRGZw?= =?utf-8?Q?+y4oKiIhmNMgYHsIJNYXUUj34aPo4GubsUT43LK?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68249380-d5a4-4ca9-8f0e-08d971e8026e 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:12:33.8016 (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: HYL9YPnNvYfATx1Ct6kT41TdXHkvilXZ+D11gSzDaxvwQ2EmUjX48GJ5ylrJcqA/67UTDyKYc5b+KiXV+Fy+/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB2703 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Two of the variables can live in .init.data, allowing the open-coded placing in .data to go away. Another "variable" is used to communicate a size value only to very early assembly code, which hence can be both const and live in .init.*. Additionally two functions were lacking __init annotations. Signed-off-by: Jan Beulich --- a/arch/x86/platform/pvh/enlighten.c +++ b/arch/x86/platform/pvh/enlighten.c @@ -16,15 +16,15 @@ /* * PVH variables. * - * pvh_bootparams and pvh_start_info need to live in the data segment since + * pvh_bootparams and pvh_start_info need to live in a data segment since * they are used after startup_{32|64}, which clear .bss, are invoked. */ -struct boot_params pvh_bootparams __section(".data"); -struct hvm_start_info pvh_start_info __section(".data"); +struct boot_params __initdata pvh_bootparams; +struct hvm_start_info __initdata pvh_start_info; -unsigned int pvh_start_info_sz = sizeof(pvh_start_info); +const unsigned int __initconst pvh_start_info_sz = sizeof(pvh_start_info); -static u64 pvh_get_root_pointer(void) +static u64 __init pvh_get_root_pointer(void) { return pvh_start_info.rsdp_paddr; } @@ -107,7 +107,7 @@ void __init __weak xen_pvh_init(struct b BUG(); } -static void hypervisor_specific_init(bool xen_guest) +static void __init hypervisor_specific_init(bool xen_guest) { if (xen_guest) xen_pvh_init(&pvh_bootparams);