From patchwork Fri Apr 14 18:57:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Hildebrand X-Patchwork-Id: 13211913 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 B78E7C77B71 for ; Fri, 14 Apr 2023 18:58:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.521214.809642 (Exim 4.92) (envelope-from ) id 1pnOcF-0001eI-A2; Fri, 14 Apr 2023 18:57:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 521214.809642; Fri, 14 Apr 2023 18:57:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pnOcF-0001eB-6u; Fri, 14 Apr 2023 18:57:47 +0000 Received: by outflank-mailman (input) for mailman id 521214; Fri, 14 Apr 2023 18:57:45 +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 1pnOcD-0001O1-SR for xen-devel@lists.xenproject.org; Fri, 14 Apr 2023 18:57:45 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20601.outbound.protection.outlook.com [2a01:111:f400:fe59::601]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3d0f641f-daf6-11ed-b21e-6b7b168915f2; Fri, 14 Apr 2023 20:57:45 +0200 (CEST) Received: from CYZPR17CA0005.namprd17.prod.outlook.com (2603:10b6:930:8c::21) by SA1PR12MB8599.namprd12.prod.outlook.com (2603:10b6:806:254::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.28; Fri, 14 Apr 2023 18:57:42 +0000 Received: from CY4PEPF0000C977.namprd02.prod.outlook.com (2603:10b6:930:8c:cafe::5) by CYZPR17CA0005.outlook.office365.com (2603:10b6:930:8c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.36 via Frontend Transport; Fri, 14 Apr 2023 18:57:42 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by CY4PEPF0000C977.mail.protection.outlook.com (10.167.241.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6298.27 via Frontend Transport; Fri, 14 Apr 2023 18:57:41 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 14 Apr 2023 13:57:40 -0500 Received: from ubuntu.mshome.net (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 14 Apr 2023 13:57:39 -0500 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: 3d0f641f-daf6-11ed-b21e-6b7b168915f2 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZVHNIhQawx2IMLPEDwhhvyQ0AskgqeAeqibmTkNk0c73CcLlidKXboAqFzuqLznrR4S6rD0D11mXho7iarj6vuSLsQhq9QAfwW0PjzJD6RO3Y3P9MQIRtAY3R6CwmXXtS0ybmAdUilByhfQOsDebq6YxwiCCObFXAqBH5A7hpVLsq2HFZEIUqvs04DvAwmiyHszIh/CyAnjcElHtdf8swOmdfaFKBM1I+V83Lgz/p22QY5GRhHKf6GvdXpzNDkiJpVb/iEb4CLoeb+fi08MPvhigVDe4NhXt9thD+DI7CmLaOQLiLzfK4NWBZDUzfLA6tqwo2yPG0wPJqT4Jz6l4eA== 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=z33OHiDZlWIHfUqu2WZ+dteJoaqpdcUN2xGgnP65iNE=; b=A3mE3zhgQQMTKZGlbzpiW3sBgba8XcUINhrq7m92V9Fvm+vTk0YrqswIrPi46ARpnEccJP8jIf2FGj/Qe2CEuVb92hyYD25GykGld5t1IREpXCS+AF7Yz86/tRmU89+LeltefTYNlU4E/JaPK7WRL3dFkDTvPbw4kQ5HICgydxOmSwGPV2Duhbffk8uybx5H1HIuNzK6EpI4SLgE1DXYtg2+wHisFd2cmCspWiAn/6qpJwj0XwgrWd8NYD3osLpWOpzDyDttMsbHMzTAeIFUksUISCc0vLmdXGO9WAXy0rANna9CRYDK3MJBwITEU2Jt7wOIQ8FJKTTXqMLZb0EX0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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 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=z33OHiDZlWIHfUqu2WZ+dteJoaqpdcUN2xGgnP65iNE=; b=kJD5WWKbFY8zyBHg9v8QvIhNtbyngzYa/AZOTwccVLfv3rBFrloYesqyh8e/99Oe7YPAU3Bld8/t3jsX/bLT8ZlJWI92xZuYfN/eIx4L6DJBqBWQBuwV73tcgYNQZ2BKKIg+P5/3KUO08Dahkz/qe2OqgH//Dgbm+upD0URVCiM= 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=SATLEXMB03.amd.com; pr=C From: Stewart Hildebrand To: CC: Stewart Hildebrand , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Andrew Cooper Subject: [PATCH 1/3] xen/arm: mark __guest_cmpxchg always_inline Date: Fri, 14 Apr 2023 14:57:12 -0400 Message-ID: <20230414185714.292881-2-stewart.hildebrand@amd.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230414185714.292881-1-stewart.hildebrand@amd.com> References: <20230414185714.292881-1-stewart.hildebrand@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C977:EE_|SA1PR12MB8599:EE_ X-MS-Office365-Filtering-Correlation-Id: 8598bab1-0dbd-4004-299e-08db3d1a1fca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wA+Jg7uRF9g5PnFKZUnpgcCiILrMoIUHeTMMQCkSlKSHyW9lhOwsiLwAtOekh4nzTNKKCqGEqvoHfXv65CdFXG6yx14/rmuI7QPvpEIqSgh2+My53Z2MogVu+49VHJx05bxf2faVlevcUbqOgCz1Xzgu2937PWfDWisOtKVeWCabiCrwKgSFrTyn/Ja4gpc6QFODy8qiEBFVhL2EF5khFrLvv2cBjRbSxgLOqhEosM/ekNhhNpP8UAoQ9HowE4AXZ1fo08n9y2/dFYtCfK3+E59zDcT2hDZ1pzAfjDCjHqUUJUHdTXQK6B92Ue5YnDJyNFQOu+jZRO/NSmIAJEEWgKRSCWnHNxKNwMMvDednyfZDr8v2VgjUD+qWd1mtNQ1gTthiRWpzHKE2BfG9u6BrfypnSaUGXflxnyntOOKvBmjBmJB2jVQ5YO1O39tB5h7MDQ/HV1J1s+/T1ge6cMxRLy2MRaN/OtkuWLerdyZkod0dzoWlh+MulvKCuA8R7D86UkTZbA/rj7gUrXZEIhMJUiXeMbUzoKcjDFun6z7me6Ea7adaHNXNcNqwj/p0cxNh0da7RzDQ7MAb289Fu4aKPXLQaoNCaKluudpWY1RujglJHthcByiJLry/b/hNmy7Kl0RqvLtuqC93ZLkq2+htPqbvTgnNdhofWFmwQDkGut+8sfQqhushKpfSOhcXR0a5ZRIJgK/wFBgEmGioMOKCZgqd4DmgBkQU+sLZOKyyddg= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(136003)(39860400002)(396003)(451199021)(46966006)(40470700004)(36840700001)(2906002)(70206006)(70586007)(426003)(336012)(82310400005)(5660300002)(44832011)(36756003)(8676002)(40460700003)(8936002)(41300700001)(316002)(6916009)(4326008)(40480700001)(478600001)(54906003)(6666004)(26005)(81166007)(82740400003)(2616005)(1076003)(83380400001)(356005)(47076005)(36860700001)(86362001)(186003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2023 18:57:41.3749 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8598bab1-0dbd-4004-299e-08db3d1a1fca 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000C977.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8599 When building the hypervisor with -Og, we run into a __bad_cmpxchg link error: aarch64-none-linux-gnu-ld: prelink.o: in function `__int_cmpxchg': .../xen/./arch/arm/include/asm/arm64/cmpxchg.h:117: undefined reference to `__bad_cmpxchg' aarch64-none-linux-gnu-ld: .../xen/./arch/arm/include/asm/arm64/cmpxchg.h:117: undefined reference to `__bad_cmpxchg' aarch64-none-linux-gnu-ld: ./.xen-syms.0: hidden symbol `__bad_cmpxchg' isn't defined aarch64-none-linux-gnu-ld: final link failed: bad value This is due to the function __guest_cmpxchg not being inlined in the -Og build with gcc 12. Fix this by marking __guest_cmpxchg always_inline. Signed-off-by: Stewart Hildebrand Reviewed-by: Julien Grall --- I considered also changing "guest_cmpxchg64" just below in the same file to always_inline, but I decided not to because this function does not take a size parameter. --- xen/arch/arm/include/asm/guest_atomics.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/include/asm/guest_atomics.h b/xen/arch/arm/include/asm/guest_atomics.h index 9e2e96d4ff72..a1745f8613f6 100644 --- a/xen/arch/arm/include/asm/guest_atomics.h +++ b/xen/arch/arm/include/asm/guest_atomics.h @@ -86,11 +86,11 @@ static inline void guest_clear_mask16(struct domain *d, uint16_t mask, domain_unpause(d); } -static inline unsigned long __guest_cmpxchg(struct domain *d, - volatile void *ptr, - unsigned long old, - unsigned long new, - unsigned int size) +static always_inline unsigned long __guest_cmpxchg(struct domain *d, + volatile void *ptr, + unsigned long old, + unsigned long new, + unsigned int size) { unsigned long oldval = old; From patchwork Fri Apr 14 18:57:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stewart Hildebrand X-Patchwork-Id: 13211914 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 2DD05C77B71 for ; Fri, 14 Apr 2023 18:58:25 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.521215.809652 (Exim 4.92) (envelope-from ) id 1pnOcP-00020B-IA; Fri, 14 Apr 2023 18:57:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 521215.809652; Fri, 14 Apr 2023 18:57:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pnOcP-000204-F2; Fri, 14 Apr 2023 18:57:57 +0000 Received: by outflank-mailman (input) for mailman id 521215; Fri, 14 Apr 2023 18:57:56 +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 1pnOcO-0001yf-7e for xen-devel@lists.xenproject.org; Fri, 14 Apr 2023 18:57:56 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on20627.outbound.protection.outlook.com [2a01:111:f400:7e88::627]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4297d594-daf6-11ed-8611-37d641c3527e; Fri, 14 Apr 2023 20:57:54 +0200 (CEST) Received: from MW4PR04CA0259.namprd04.prod.outlook.com (2603:10b6:303:88::24) by CH3PR12MB8911.namprd12.prod.outlook.com (2603:10b6:610:169::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Fri, 14 Apr 2023 18:57:46 +0000 Received: from CO1NAM11FT004.eop-nam11.prod.protection.outlook.com (2603:10b6:303:88:cafe::b3) by MW4PR04CA0259.outlook.office365.com (2603:10b6:303:88::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.36 via Frontend Transport; Fri, 14 Apr 2023 18:57:45 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT004.mail.protection.outlook.com (10.13.175.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6298.33 via Frontend Transport; Fri, 14 Apr 2023 18:57:44 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 14 Apr 2023 13:57:44 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 14 Apr 2023 13:57:43 -0500 Received: from ubuntu.mshome.net (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 14 Apr 2023 13:57:42 -0500 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: 4297d594-daf6-11ed-8611-37d641c3527e ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aPo3Zkau8v5cZvvTDRT5ZDoJxjWnp46Q/ftxQaGfnfgX64fe8jZa27ISThGxZfFgj2URL0unFqPXgPe7IYajX6mvs0y9CnmofDz+hTxT2aMt+8tvYfRIkoMfX84Qaa9mSH0bLdg94thJl1E1KijBSopNwkjP+oEzi2G4MEuHaXvigdpZ3c9lgiB1uTlUJWxoIIB19nxXcMZQ75a4ZXQVNfm3hB09UuYDdjm812tQjxbPqSPVyRNStF6noawt1cdIWCThivdjFAZ0Vqp8dgQc+DnxVlOiEyq/4Vt/mzCb3WGkcWqYsTOqmBkLvfcs9w7bNuhI4RzzWJpYIIvPka0d8w== 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=Op4gLrZXr+32HM/wsQS2QIeYqXOraK+iVo5JPJFoRrg=; b=PF0tw8puEGB7V1u4jMXk65LW/+c6OHWy94UvCCX/kPCviDxl6+UFeEWStJniZa2cg8W3tp1zKG7V3uWAoXQK4FZB4G0y7GpFHVfO8PAeiv2epeGIzj61IjIBjsC+07sF7YUkgoE44KPdH11MKPAGqVEYhzrrqAvAUxEcFCMRw+JYqfLYkHxAOitSo5xv5y+NFijKm04vtBHvRtmVMdTt4WZ7344MGK4pFBbQTPimQqDbabxDYqXnwqi8RKQG0HvhpbrZzoTSt7EFu8r+2sDHUREZhXqLQiDnNBttNMaphFyKPO2PXDdkRBa8R044Vh1iOz1RF2YXf/fjTh4z5iwYkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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 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=Op4gLrZXr+32HM/wsQS2QIeYqXOraK+iVo5JPJFoRrg=; b=gOhpO5lNnnXIY4VlUUeOUNUG5dcNiTSFrhvVLUPammGnNuJIaK/2xGJJ2jhcc9MlgdxmN0vESeUqlujwSKjQnSB+HT6Mte9fHiY92/XAxhWsxYhy2LkaWBGYZZi/wxdeW95ZQ5h+jgXqangf3IZ/NkRMH2KKThjRYvv8al/fekQ= 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=SATLEXMB04.amd.com; pr=C From: Stewart Hildebrand To: CC: Stewart Hildebrand , Jan Beulich Subject: [PATCH 2/3] xen/efi: fix unitialized use warning Date: Fri, 14 Apr 2023 14:57:13 -0400 Message-ID: <20230414185714.292881-3-stewart.hildebrand@amd.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230414185714.292881-1-stewart.hildebrand@amd.com> References: <20230414185714.292881-1-stewart.hildebrand@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT004:EE_|CH3PR12MB8911:EE_ X-MS-Office365-Filtering-Correlation-Id: 03c6a0c3-bf5c-4b69-daaf-08db3d1a21e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IsgYxjrVVnc8ryVLdw6JHAKd7S4Bus9ldxYr+FiRT9sABsv4fL3jP/JAs7y607JaaF8RAC+OMQInsyCjc3yxawg5JIdVOvx68ziUFBtBgnZEcU2zdEnFEfN3S/EtiCG1T4HB9c9giYrP8OI85HGky6UaIB/jQyM/k7HwyrNeh8DqTxGPgS1syA+Gbd/VnVNTckD7EU3lFK9Syl6dR/GRrmLfrTyTyWIwfM4Zvc9p0tjjQIAIOb0jdjFUe9Ng1iFrHVwHbAf3WrJUISpcFnjWjqKZafZt26WedtrdIz9bo47N8ECM+QHzdmUMWdxLO7/uCF+kEeP3Z2HIxH4Cvwg3391ybFJKYxunJd2XQKEZbYuw/j8KZdL/lgtDkCMF33FNY6RTgMVzjfSwFGLYeGjn8TD9DWo9NWY06Ro/GHPcGNoF/zI+eM1hpx/n6S7OSTCjNbjqU06o1sGqDCwOxH4KFwIWMKWq8Z/+g3//YifkWXMHNu5x6oMH1bcwhX2w/6mGL7dygT+EDgN9hWXrdFdidVWcIQeLePBMQ9limsZuMvPyVslGEi36UlDxGu8M3rVMTzT556B7maMx4POovK+jPhy1X1hIVFmPBKUex48/8OkxgK9018IH6OzN+bniYifijBSLrEZxI003ZZPifRXgcXezB3GSd6ca1mw3ec9WRaPHSxMbrMQjZ/1fA849E0+EvxylOqbKuV81MHLET3fDe3xGGS4fE5c9FjJ4vLjUmRM= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(136003)(346002)(396003)(376002)(39860400002)(451199021)(46966006)(40470700004)(36840700001)(54906003)(2906002)(36756003)(26005)(40460700003)(478600001)(8936002)(356005)(2616005)(966005)(81166007)(47076005)(1076003)(82740400003)(44832011)(83380400001)(186003)(5660300002)(426003)(336012)(86362001)(40480700001)(36860700001)(70206006)(70586007)(4326008)(6916009)(8676002)(82310400005)(316002)(41300700001)(6666004)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2023 18:57:44.8872 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 03c6a0c3-bf5c-4b69-daaf-08db3d1a21e6 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT004.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8911 When building the hypervisor for arm64 with -Og, we encounter a (false) uninitialized use warning: arch/arm/efi/boot.c: In function ‘efi_start’: arch/arm/efi/boot.c:1468:9: error: ‘argc’ may be used uninitialized [-Werror=maybe-uninitialized] 1468 | efi_arch_handle_cmdline(argc ? *argv : NULL, options, name.s); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm/efi/boot.c:1263:21: note: ‘argc’ was declared here 1263 | unsigned int i, argc; | ^~~~ cc1: all warnings being treated as errors Fix this by initializing argc. As a precaution, also initialize argv. Signed-off-by: Stewart Hildebrand Acked-by: Jan Beulich --- See previous discussion here https://lists.xenproject.org/archives/html/xen-devel/2022-10/msg00805.html --- xen/common/efi/boot.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index b69c83e354ee..c5850c26af9f 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -1344,6 +1344,15 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) if ( !base_video ) efi_console_set_mode(); } + else + { + /* + * Some compilers may emit a false "uninitialized use" warning for argc, + * so initialize argc/argv here to avoid the warning. + */ + argc = 0; + argv = NULL; + } PrintStr(L"Xen " XEN_VERSION_STRING XEN_EXTRAVERSION " (c/s " XEN_CHANGESET ") EFI loader\r\n"); From patchwork Fri Apr 14 18:57:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stewart Hildebrand X-Patchwork-Id: 13211915 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 E6752C77B72 for ; Fri, 14 Apr 2023 18:58:25 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.521216.809662 (Exim 4.92) (envelope-from ) id 1pnOcQ-0002JA-Qz; Fri, 14 Apr 2023 18:57:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 521216.809662; Fri, 14 Apr 2023 18:57:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pnOcQ-0002Iz-NZ; Fri, 14 Apr 2023 18:57:58 +0000 Received: by outflank-mailman (input) for mailman id 521216; Fri, 14 Apr 2023 18:57:56 +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 1pnOcO-0001yf-UQ for xen-devel@lists.xenproject.org; Fri, 14 Apr 2023 18:57:56 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2061b.outbound.protection.outlook.com [2a01:111:f400:fe5b::61b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 430e94da-daf6-11ed-8611-37d641c3527e; Fri, 14 Apr 2023 20:57:55 +0200 (CEST) Received: from CY8PR19CA0009.namprd19.prod.outlook.com (2603:10b6:930:44::14) by SA3PR12MB7997.namprd12.prod.outlook.com (2603:10b6:806:307::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Fri, 14 Apr 2023 18:57:52 +0000 Received: from CY4PEPF0000C976.namprd02.prod.outlook.com (2603:10b6:930:44:cafe::b6) by CY8PR19CA0009.outlook.office365.com (2603:10b6:930:44::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.36 via Frontend Transport; Fri, 14 Apr 2023 18:57:52 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by CY4PEPF0000C976.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6298.27 via Frontend Transport; Fri, 14 Apr 2023 18:57:51 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 14 Apr 2023 13:57:51 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 14 Apr 2023 13:57:51 -0500 Received: from ubuntu.mshome.net (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 14 Apr 2023 13:57:49 -0500 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: 430e94da-daf6-11ed-8611-37d641c3527e ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A0H+L5MXch2APCSZxtNrT9Hh69YGQLyk+gOXnGelPqesd81rc4Z2e47jp+NOUEMMI2MTpPWPVdo08r2ZkO6tLYMNkV1YPQvhfvmeUYlGTCRUryXzK5n3N1pXFhyuh2BUVHS6n/UKpqFmvuj75sqoZl0Z9WR3KCu9rTITjmjtV/SPbHA2UDR6Y6qaliZJIoQopcotNipfEqdgxq8aT4vBn49Vc0o0OmNYBRDH0sCC1bmrcH0Lil78Qs5d5guAsSN9wpq6/xheCZMq+dzGD52N4PhbIV3Os4v1tLw7RL5/R4lhe/kmXrlNGhjhWjLLxuPz1LQGint5Tb/i6Cxz1TM2lA== 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=Al+YVBo/rFHAhzjUVn24nt7jKtL9yJFrezw5/WN9ImY=; b=IQ2pGTKD88+zuMPdA4wet/rig4/wySpAUmtkJ7Q5wxyP6pjpmfiBYb++Pb0DR/D0U5d16BdI8fRwCQhCkSNJt4dY2iiCeV/0Mt7fMfj2ZSWzLGoovbWsJU3RBaJ1ffF1tzwxfWO1bhwG4NUF2+Ob0z22AhZi/kSlYS4PJUlyGHZTGa72zIe0hKWp/j6ub013MP5RlPGiONui/59ZqQKpfwjjtZlCOU/zM7fYBQ7vTzexQ/B215AapaPW2C/eCmlTC0Pq0Q5uy1FujaiZhwoEQV88c2h3Z13tyAT+2Cv1+7XU1RPvzb8PX5vVDIIkVM7iy//mXgvDSkpyuKePXdpkJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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 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=Al+YVBo/rFHAhzjUVn24nt7jKtL9yJFrezw5/WN9ImY=; b=yYbMAe8et+HIY/oo+xWHW5dJ6PnoJQ7ZB485hAvYwdM1zVkZyAc46Cp9II7PgMKmtxByG/dlivHaZntZNbjbmRytIDtym/t9hxmikLzm86xLRsaAdR4DxsTEn0sGsGFQAWlhD720yDj8boZSj1+hPnZDhgvITRNbgR+doCvxpx8= 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=SATLEXMB03.amd.com; pr=C From: Stewart Hildebrand To: CC: Stewart Hildebrand , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [PATCH 3/3] xen/arm: fix unitialized use warning Date: Fri, 14 Apr 2023 14:57:14 -0400 Message-ID: <20230414185714.292881-4-stewart.hildebrand@amd.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230414185714.292881-1-stewart.hildebrand@amd.com> References: <20230414185714.292881-1-stewart.hildebrand@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C976:EE_|SA3PR12MB7997:EE_ X-MS-Office365-Filtering-Correlation-Id: 98d4bc59-f055-4c3c-33af-08db3d1a261d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HwO0CmzPGZaR7SXgWQBDb+ReAr9FYZhx95Uu3HjoATsfs5OwjYwfvxgBL/t8rcYE2GHPFGbT7DXYU0Wv+MAuNbbEGzpU7qjUzkwB/FQn0q5KWBW+g0Nf/t1gpTOvQNaRGAGo6fp85+l3iEaimAG3EzCWGtA9B5mLwN6vM2UoBIvZKHI64YdZhZiSzMRKZXkB4RqpTAo5x/r04w8ZHhU+vPRFts7PxxdA9V1zC1t4u4tHSZHiEI7RICbPTk0w43uiD1kkxjwPyxt5jUQzKtftu1zik3XQZlqsoJ9ToX0nhL14b5/aA5ctZEe0Cyz2qSoBefdXqVj+MTVNTpiNOKEU0+caFZLx3ctCH4vRrXcW5m9UMMSrXoGUO1pdlscHvw8I7SZMRb3m0p1URYM+nTYdMlFqHnCojf1ccy1fvZy5DR9HqquApX5+AQya/OGuQbDvtQuOB/lj0U6ZSLmaxd37KE9Vbk1+19IouDtT95zZZDVWoTa5VyarWXXQktdgaB/XlyBMA4cBJnbx4OvNOeUfBVvYFwvOnGLoThBB7MmiAVAryBhR461x3IdPd+dgT7DcpkCwrxOW/6PD5AgGvqI0HW5B+Mp+/jrYC87C9r6HFC8MnyGv0TEcTL+KVLz38tjXorUPsCH2RMEaKS12Fmkf+dvzFIS61gkLSghn1SUq4HGYpT9EAi+McxMKgq6Q+151ZOk9j3egKE5bInDQKxFNt580w46XB3ln1ARSPf4Ym28= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(136003)(39860400002)(346002)(396003)(376002)(451199021)(36840700001)(46966006)(40470700004)(316002)(82310400005)(81166007)(54906003)(82740400003)(36860700001)(356005)(70206006)(70586007)(8676002)(4326008)(6916009)(86362001)(478600001)(336012)(47076005)(426003)(2616005)(186003)(26005)(41300700001)(36756003)(1076003)(2906002)(83380400001)(40460700003)(44832011)(40480700001)(8936002)(6666004)(5660300002)(966005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2023 18:57:51.9856 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98d4bc59-f055-4c3c-33af-08db3d1a261d 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000C976.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7997 When building the hypervisor with -Og, we encounter the following error: arch/arm/domain_build.c: In function ‘make_cpus_node’: arch/arm/domain_build.c:2040:12: error: ‘clock_valid’ may be used uninitialized [-Werror=maybe-uninitialized] 2040 | if ( clock_valid ) | ^ arch/arm/domain_build.c:1947:10: note: ‘clock_valid’ was declared here 1947 | bool clock_valid; | ^~~~~~~~~~~ cc1: all warnings being treated as errors Fix it by initializing the variable. Signed-off-by: Stewart Hildebrand Reviewed-by: Henry Wang Reviewed-by: Julien Grall --- See previous discussion here https://lists.xenproject.org/archives/html/xen-devel/2022-10/msg00741.html --- xen/arch/arm/domain_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 4f9d4f9d8867..18b350734a8e 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1944,7 +1944,7 @@ static int __init make_cpus_node(const struct domain *d, void *fdt) /* Placeholder for cpu@ + a 32-bit hexadecimal number + \0 */ char buf[13]; u32 clock_frequency; - bool clock_valid; + bool clock_valid = false; uint64_t mpidr_aff; dt_dprintk("Create cpus node\n");