From patchwork Tue Sep 5 08:26:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13374380 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 6AD0DC83F2C for ; Tue, 5 Sep 2023 08:27:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.595440.928997 (Exim 4.92) (envelope-from ) id 1qdROV-00066a-M8; Tue, 05 Sep 2023 08:26:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 595440.928997; Tue, 05 Sep 2023 08:26:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qdROV-00066T-JE; Tue, 05 Sep 2023 08:26:43 +0000 Received: by outflank-mailman (input) for mailman id 595440; Tue, 05 Sep 2023 08:26:42 +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 1qdROU-00066N-Aj for xen-devel@lists.xenproject.org; Tue, 05 Sep 2023 08:26:42 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20624.outbound.protection.outlook.com [2a01:111:f400:7d00::624]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id efe3b5ec-4bc5-11ee-9b0d-b553b5be7939; Tue, 05 Sep 2023 10:26:40 +0200 (CEST) Received: from DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by AS1PR04MB9262.eurprd04.prod.outlook.com (2603:10a6:20b:4c6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.32; Tue, 5 Sep 2023 08:26:38 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::f749:b27f:2187:6654]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::f749:b27f:2187:6654%6]) with mapi id 15.20.6745.030; Tue, 5 Sep 2023 08:26:38 +0000 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: efe3b5ec-4bc5-11ee-9b0d-b553b5be7939 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kmiK7gcobTEwJ1ZVrnCLcr2AnHc88NVOzsQ2dbZqutZIoOWGHk5Tn9+dA5lzxa8hfJClNDvAj91P+qi/WWC85jjk4vx0ZzgNvSLp3WOJl0QXf7U0evFC7+nauSBnzZ4ecNVEZ/jtHpOUMg40ZHhH4VLjQG/KWxmqvuxqCpNIl1fSQlJKnS4bz2s2miQK7JM/2IDgfwqdxZio3gebpk/qgKiEd246vvXEdFrVzuxbOHs1XfOzagD2o/vdmKY4dVQVZz/m9js/az5ouy+yPxXmvyvIe1c2VWyqsnRaWTAjWHSvbxS0Lr6H4dBFiEiywJW1Eowpon/vxWlNWkkCyBndmA== 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bCjZhitKxoSe0B59YDSAKns2l7OfkDSX/iRNgrXhgrM=; b=PpojojDA3+wYqbRd7DmNXJxM2tbB03H7rmVTTKoOooPEGaCUdpeDpMw8HjRSjHsl+c0ygtykdz4XGERgum5TbPI2BNumnXiSF5dPKMTzEGw/crGUt6vT/92gpa9jN1l17dkVk+IxTmQ8w0aKRcHDnKsFMltGUS5DsHM6TaZY4mA1LPAqAaxCbj580gyIl2zLoGxKfGFKG8FlKwD1IF4xTT1NmMckjRc4hJAORq8Tv/Xm7QARccRxhaheyqzNYhS3LG0sGD2L8GI6vI/JWT8fN29hjZkeWCy8KhzpPFcGhl7nbf+gpjRI5VmUo1CDtlN9M7z4TmtTUSDET1LlnBKOww== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bCjZhitKxoSe0B59YDSAKns2l7OfkDSX/iRNgrXhgrM=; b=lHYJnao2Ln68YzmR7tLSR9BrWydvHi+93bDrYvspEbdyVbznrA83Zy83V0ZjFcCSvMznTGtiribBewMFPLpA45wkIitj/9W7bkRgKFEEPx8BFIPAuDiGC+F3NIgL1R88/aDihuqCGudGOgTybBSHrZo+MlQ6yHQJhLSCfW1WL/H+8QLzpay1ScBdFrllrNUc6rMxlxGmSLdmOPxWxSUcKqVpmoBN5Ko+QIeBhrN+rVsQLFDTA01QP+v0iXfwkayQNgE9lq2fRgcC30C/vW2RrzqjfGyyzTMN+4mz1o3EY/JL17xgKpPLKmuYXkdrqxb1Rwo/FamPeY/xcYQ4mNI1lw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <6bea2061-e6df-2cea-4bff-858b0f44a0c2@suse.com> Date: Tue, 5 Sep 2023 10:26:36 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 From: Jan Beulich Subject: [PATCH v2] Arm: constrain {,u}int64_aligned_t in public header To: "xen-devel@lists.xenproject.org" Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk , Bertrand Marquis , Henry Wang Content-Language: en-US X-ClientProxiedBy: FR2P281CA0143.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:98::16) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|AS1PR04MB9262:EE_ X-MS-Office365-Filtering-Correlation-Id: 996495c6-d118-4cd3-37e2-08dbade9d303 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RV5adJSCGbsQp/z1zAKYX4WJm7LSHVA3aXe2134H4j805HLXhB6344nhdz4OKQ3v3rctEB/MXjpcFplDrUCXxMwgZkt3ipFmFZ8WtWJsvHw1clEx18O4dq+TBr6U6ntjjt7JtFZQ0AYrwq6dCWPBYlAw+q5Mq0XqFIyx+VzQQVOYUSGXtsK029JAQxLfJmo+81r2iiSzfHdqNZw9bYRmxQ19W7gPbOkFmyU0uYivXg87khPzHziWWQClUhMrDDTvQbdBBClgSl3MwCrY+fxqBbObCoy6Fg/8VSliJoZ/cUGy+VyvEf7h5/k6vU73XhGdF6IqshOTfrIWkLYZmYL2vHuD/fyrr2dTiuEJS7G2TU2S5AHR0jjiAhHR9omdgtkkXtrbt0ReNhwhlOfxF+z0zYi7kahXZfgXxIfBzCxNyadkGLQbNDONuee922LAIVlki8M0WORPLM/R4nmn6iGiMe/e6iTcNEuwiRgV2oKhsxyrrx1EC9A0MIKDJqHf5/+/bxEfwGzifka4ProttSxHcfGG22LEbkXUKxnzIoODDRpwFAcfNlGe8VTNr4yjRL0AoNG8A/Q1wBVs4EnGAL5aZMG+WU5GU00GIEH0pIvqNHt3bILsEnf/q9mAZifj0qtXuLAd9FOpRvaEj7AgUsC/bg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8790.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(366004)(376002)(136003)(39860400002)(396003)(1800799009)(451199024)(186009)(8936002)(31686004)(5660300002)(2906002)(6916009)(36756003)(316002)(54906003)(66946007)(66556008)(66476007)(8676002)(4326008)(41300700001)(6506007)(6486002)(6512007)(26005)(478600001)(38100700002)(2616005)(86362001)(31696002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6FjtQfZv1w+HH33wiL2r59ZdU6Tm?= =?utf-8?q?SZq96KBxjCettUxpbIq0UU8hXdYPrayT3uUprRYl/0jseXG4mxVZQ9PyMBdNneMCP?= =?utf-8?q?R+pmfZ1XzfbELMbAmMPCQ8P8NG5SnVozc9pqNUr+n1Crx/WmDXyIbFaURURi1CfTL?= =?utf-8?q?iCaC7jrKKuj0qeUWr+kw0RE2pSn/yHex5vJ/ULIh6sfs4RrLGwqornUjG/a7NpKIc?= =?utf-8?q?Pg5t85hpO2OssoMoEcYaDT3iW37jU/hHTPdJb6tkB3LqNZcJaaLHuz0NIYe6jINtB?= =?utf-8?q?Z4l9SxYKCpBDLEaBGe20l2NNK5zbrBiL+/NVk/K2xti3Cts/90IWFOyzhjVk4wxuT?= =?utf-8?q?YuVdXwaSZ5qKVA1plCUQPx1DNbaS1rLDNWPfJS/YUhmvmP/POMZApZmtGmfQ2P0lG?= =?utf-8?q?RmZ9R3psKBgZ2b88KKVOxsLo6XpQTtPtEDadb/2kasCFjgXa3WDmBmAwhRHmOaaQ9?= =?utf-8?q?5ZjGt8ioKHAGG7Nqh72yGHkmVrHaX3Sia4pykOmoe3e/AHtNLLVpa9zfbzoyESnwd?= =?utf-8?q?51hSJAstMjhfgAB0R0i+MK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DUfRtE7eqIL7R+RTAMbTrpDEab1pliY8NO90U?= =?utf-8?q?8Ylpsh9JFh1JrteWLjYerYcGnIJYUTKqz4ZACE/+vpiFm1h8KMA5kD0IexQ9EKnt3?= =?utf-8?q?cmtVqxzBtguI?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 996495c6-d118-4cd3-37e2-08dbade9d303 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2023 08:26:38.3586 (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: BiQaGBeBo1NCQphipK5n4K5S4Mg4RZkWLBq9WTiYRkGNWPCfFHEc5TJ+WIdXWl0ljfafnOHOoEYVsThUni59pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9262 For using a GNU extension, it may not be exposed in general, just like is done on x86 (except that here we need to also work around not all of the tool stack actually defining __XEN_TOOLS__). External consumers (not using gcc or a compatible compiler) need to make this type available up front (just like we expect {,u}int_t to be supplied) - unlike on x86 the type is actually needed outside of tools-only interfaces, because guest handle definitions use it. While there also add underscores around "aligned". Signed-off-by: Jan Beulich Tested-by: Henry Wang Reviewed-by: Stefano Stabellini --- v2: Also check for __GNUC__. --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -152,8 +152,10 @@ #define XEN_HYPERCALL_TAG 0XEA1 -#define int64_aligned_t int64_t __attribute__((aligned(8))) -#define uint64_aligned_t uint64_t __attribute__((aligned(8))) +#if defined(__XEN__) || defined(__XEN_TOOLS__) || defined(__GNUC__) +#define int64_aligned_t int64_t __attribute__((__aligned__(8))) +#define uint64_aligned_t uint64_t __attribute__((__aligned__(8))) +#endif #ifndef __ASSEMBLY__ #define ___DEFINE_XEN_GUEST_HANDLE(name, type) \