From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749152965; cv=pass; d=zohomail.com; s=zohoarc; b=UWM38g2x+wftqZtNONk2BxRhfKwPfLIAChZSarsp3dRLeVJox8furj82BbVvMUOIi1N6pTxmCq83XJcaaOQYmak5xq41tI9+un6Rhq/G4hQHh5n5PnIDgmfIx8/OPHhIef9ntfgqJahV6SNNPdGen8u2/urbE6QJzni8/CXj+c4= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749152965; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gVCZ4mr10xTNgUay/BsdsDmnmul66uI4HIiTZagqRPM=; b=bjCNDaJO78FSYfVB2aNCM6dYqeWp1jhmO4kXKtVFXSkjg6tN9WPPc8raDehFJP50V8K4YasGUEkymxXWarb3wt477dguxjT/qS7yosafjChb9WSgJ+C0YVmmchNoicEGAAlJ2S8RiiMCFOG37BAwuFKWi7aKH4IeThbpOZHNslU= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749152965710343.14343919993496; Thu, 5 Jun 2025 12:49:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007453.1386737 (Exim 4.92) (envelope-from ) id 1uNGaA-00037g-Up; Thu, 05 Jun 2025 19:48:58 +0000 Received: by outflank-mailman (output) from mailman id 1007453.1386737; Thu, 05 Jun 2025 19:48: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 1uNGaA-00037Z-R2; Thu, 05 Jun 2025 19:48:58 +0000 Received: by outflank-mailman (input) for mailman id 1007453; Thu, 05 Jun 2025 19:48:57 +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 1uNGa9-0002tD-AD for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:48:57 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20604.outbound.protection.outlook.com [2a01:111:f403:2418::604]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1d27cfbb-4246-11f0-a300-13f23c93f187; Thu, 05 Jun 2025 21:48:55 +0200 (CEST) Received: from BN9P223CA0008.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::13) by SJ1PR12MB6313.namprd12.prod.outlook.com (2603:10b6:a03:458::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.37; Thu, 5 Jun 2025 19:48:46 +0000 Received: from BN2PEPF000055DF.namprd21.prod.outlook.com (2603:10b6:408:10b:cafe::ec) by BN9P223CA0008.outlook.office365.com (2603:10b6:408:10b::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8746.30 via Frontend Transport; Thu, 5 Jun 2025 19:48:44 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DF.mail.protection.outlook.com (10.167.245.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:48:44 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:48:41 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1d27cfbb-4246-11f0-a300-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CcG5aCmN+sLVcWelr4FxqvUy/uLTWAXBl91zZl/UgIjZ34jaA6OkR9QHnXLI1iu9xSXbzDp2IbE8sXR0EW8cOGZl2gVKIrFTPK/Paqw1Oo1ZyaNJXJnBFDWOez9AZplwR4c6pJTItz0eEbwmrFr8THqgoaOGXg0O59PCkjdjMrNwewq0v3jv3qvPupnEVDPvCLM4VNzE1FWRQcjXEAyVcIVsvqb/QgheIvhbreeDgQmYVGEIqhNrgnbcPecJtTil2uIn7GPS/r8JVMlrkrHncZPrALTdhlRyZu0I1OdSvb3P7v+jtcyOVgAdse2qqjj+6uBGAjrCvSWttbWx9Qdjng== 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=gVCZ4mr10xTNgUay/BsdsDmnmul66uI4HIiTZagqRPM=; b=R2UDXpaK84TanGZczMHhnxSeq1fvFH/v062teWAYc1tiNQAg1ryBtMzB3r7p3/0YQY2Xp6hC1KJZarMhyNcQd1WMbKphGiin0Z8vcnuHyPfLbjkBNhK46Unr/MyKIbz5KPknHRWL5BRyQan/9myj7rTh+bGlfDC+jHAlqcAtyospachncVzB1GJKjy1JkLpEMhqCmR2Ee/jE6hZF5ZoQzAe+fINEy7uhX6XBOR2Ps1huvd67xKJw23jU0tl096Qs98aZiKepxP+IVVysmPPSpQl/bbGcdU6Mc+B0t/MT/sKrdUH3vxLHUqoi63cqYRI5ZOO090+wdn/dG3mm50Gicw== 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 (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=gVCZ4mr10xTNgUay/BsdsDmnmul66uI4HIiTZagqRPM=; b=G4WyiA4A61SpCvTrL7SP97jmXCNur67B3FjtOSIK9OCbav2iyeVP8tKYQ6Jf/ObiRV1330yLc22YmRdWknF+MAgXHnor7dfgwY89Nuh2H1igguVOiSaRK8oqV94xBoBbNgRDA/u5Ex+IARfx++IuMpoisSKWlKCIMnVhZDWSBlI= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Alistair Francis , Bob Eshleman , "Connor Davis" , Oleksii Kurochko , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Stefano Stabellini" , "Daniel P. Smith" Subject: [PATCH v2 01/15] xen: Clean up asm-generic/device.h Date: Thu, 5 Jun 2025 21:47:53 +0200 Message-ID: <20250605194810.2782031-2-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DF:EE_|SJ1PR12MB6313:EE_ X-MS-Office365-Filtering-Correlation-Id: a59c1263-a5a8-4539-92c3-08dda469fad9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?vDIhsNdrI+3eujkFCT3CvpeGvRK0mbh5K73lYh7GeQJe9WAQyubWO5cB/0nc?= =?us-ascii?Q?qLQHX9N73X9KEdCBwwKIOThuuZPmBI5YSQSdnYtMB75rk9xgt8rxV8308jEs?= =?us-ascii?Q?LzblDRoTKPEjlIaa3PxiitnN44UGi498EYw6+kR+H/vxJH2ylsL8fwT3UOK6?= =?us-ascii?Q?NFbCDQVQLMkex+wHvs/QEyCcDG69NggEyhLfAQbVCebhceOQXB+NF/owSc3X?= =?us-ascii?Q?t8E/nbfghWmy8SghX26KvY4gxCx9sTfMb3qCZ/5ljjpXcKN9YN/oXgA3CoGe?= =?us-ascii?Q?1iyAGD0UTLWaLOhFVKVDhycUGAQN4vNx6ipLjBkkSBArJt6sT8SYVreqSQ+J?= =?us-ascii?Q?qDy9Kt+4SLtIwm8kGuFQq9I9ZFaP9d1z4v4jCwMQ32p5YRv7Ik1xpkhm3frF?= =?us-ascii?Q?D+t83janXvt1kSDAbiU/cHimOo8c9yO+4mRZDFY3bWCiwuPSG7Q0+iDmiJiH?= =?us-ascii?Q?uMndviypPU5a4fo2Nzdh3N0UJN927xz7CW4/D6pHFCNwRzsgk90zFXHVVLMg?= =?us-ascii?Q?SZfkd3T1C3XFAduE3XjlYVOpENeVFXW6tLuvYrGEKThD3tV1vGGV6OTMHVnG?= =?us-ascii?Q?NG6GIlt2W4eTrbl5rnFIOKJZd3qwOp+oC/is736kGLPJrml0i9Eqs68WzADm?= =?us-ascii?Q?I9tuUgkMHBnYNP4ekxPhmL1fnHeemSveUaVi18C/lMh8mbjayo8w9oyQ1JNW?= =?us-ascii?Q?30FiadWKBpqPpyva5eAnln6jVBgASBqTLkyGg/GOXOHOCfLDXZ9YDQ+I2Eud?= =?us-ascii?Q?4h8/pjNzsRxxpoNR1yKtWI1tx73OMkH1eyvaGgm4E9KckPLbxT/pvuHp5dpu?= =?us-ascii?Q?laQN4rtq0IpRVhdIbp68X+Y1uFZ6/ewakLF6TG034tQ5CqX2zh3CETGyh++Q?= =?us-ascii?Q?OufF2su/j74+p69zo+BRRGWEYL+hcsBohwRBm7clOcCwijujJCTPR0/REe2k?= =?us-ascii?Q?6Q9LfFXecta4Gkfinnpv7lQtIBYIKGps5A10/q+sp5ayRyW9xxDluvI7tmpy?= =?us-ascii?Q?wMFMZLw9I1u0UqAFitNjavoUcrS+HJWSJYJMgj+Rx7V6FzWLuQmLGRhP0GMq?= =?us-ascii?Q?w1nGuGQbfw95uDE3Bb91D72BNrUkGD4wTJFH6MeiDn4Zwf3fVVrPKfP0eoSK?= =?us-ascii?Q?pmlBFUzO2WlqC5n7MtBg6ejtnn82IGlS10beMH61eVNBtTUrWVRndAfFvQsN?= =?us-ascii?Q?5/BnU/qeefb1KoZAwC48IO3EPDp+nsgIWobGVdUbQEOqJn7MAvPka0rohfKl?= =?us-ascii?Q?bUJiABFooc42lgB44NVtxt6KUwnB5Bw/i+QQ4rL/QgGd8t8/FaN+d2bYsyV6?= =?us-ascii?Q?w2og6bcJgNa4igfP5WDNiLW1xLMBTOXNYAVcnsETVbrKGMiZELqRDt/z5m2F?= =?us-ascii?Q?HzZseg1Wr0Ze8rOwMaPxxexCDWudskkmgJG30ustuRKKf5lIDSbV6Q2ISMjG?= =?us-ascii?Q?xPQXIDZX3gKDMSATMJ1G22WZvdbWkmaYn1X5gL4Y6pU1OaC055qiUfo+sCBS?= =?us-ascii?Q?DUe3CMHsdDY32C5xI6iTt13Johr/kH6q2eCn?= 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:(13230040)(7416014)(36860700013)(82310400026)(1800799024)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:48:44.3121 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a59c1263-a5a8-4539-92c3-08dda469fad9 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: BN2PEPF000055DF.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6313 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749152966721116600 Content-Type: text/plain; charset="utf-8" There's some pretense this header may be used without CONFIG_HAS_DEVICE_TREE, but that's just wishful thinking. Only x86 lacks that option, and it fully overrides this header, typedeffing struct pci_dev to be device_t. Furthermore there's an include for xen/device_tree.h halfway through the header, but that header already includes asm/device.h, creating a cycle. Clean up the header removing ifdef guards, merging the typedef onto the struct definition for device_t and removing the spurious include. The only affected file is aplic.c, in riscv, which is forced now to include device_tree.h directly. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- v2: * Add new comment and ifdef guard with #error --- xen/arch/riscv/aplic.c | 3 ++- xen/include/asm-generic/device.h | 26 ++++++++++---------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/xen/arch/riscv/aplic.c b/xen/arch/riscv/aplic.c index 10ae81f7ac..dd7a274c52 100644 --- a/xen/arch/riscv/aplic.c +++ b/xen/arch/riscv/aplic.c @@ -9,13 +9,14 @@ * Copyright (c) 2024-2025 Vates */ =20 +#include #include #include +#include #include #include #include =20 -#include #include =20 static struct intc_info __ro_after_init aplic_info =3D { diff --git a/xen/include/asm-generic/device.h b/xen/include/asm-generic/dev= ice.h index 1acd1ba1d8..631dab046a 100644 --- a/xen/include/asm-generic/device.h +++ b/xen/include/asm-generic/device.h @@ -1,14 +1,20 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +/* + * This header helps DTB-based architectures abstract away where a particu= lar + * device came from, be it the DTB itself or enumerated on a PCI bus. + */ #ifndef __ASM_GENERIC_DEVICE_H__ #define __ASM_GENERIC_DEVICE_H__ =20 +#ifndef CONFIG_HAS_DEVICE_TREE +#error "Header for exclusive use of DTB-based architectures" +#endif + #include =20 enum device_type { -#ifdef CONFIG_HAS_DEVICE_TREE DEV_DT, -#endif DEV_PCI }; =20 @@ -23,23 +29,15 @@ enum device_class }; =20 /* struct device - The basic device structure */ -struct device +typedef struct device { enum device_type type; -#ifdef CONFIG_HAS_DEVICE_TREE struct dt_device_node *of_node; /* Used by drivers imported from Linux= */ -#endif #ifdef CONFIG_HAS_PASSTHROUGH void *iommu; /* IOMMU private data */; struct iommu_fwspec *iommu_fwspec; /* per-device IOMMU instance data */ #endif -}; - -typedef struct device device_t; - -#ifdef CONFIG_HAS_DEVICE_TREE - -#include +} device_t; =20 #define dev_is_dt(dev) ((dev)->type =3D=3D DEV_DT) =20 @@ -87,10 +85,6 @@ struct device_desc { int (*init)(struct dt_device_node *dev, const void *data); }; =20 -#else /* !CONFIG_HAS_DEVICE_TREE */ -#define dev_is_dt(dev) ((void)(dev), false) -#endif /* CONFIG_HAS_DEVICE_TREE */ - #define dev_is_pci(dev) ((dev)->type =3D=3D DEV_PCI) =20 #ifdef CONFIG_ACPI --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749152969; cv=pass; d=zohomail.com; s=zohoarc; b=L/ARBLueifLglzOwqTot0e64vFAF9dynNzkeJxmZozAZghzKNmLA2FOf5kKXf0Vz+wBks1daiX5vsxSuyn4POd7nfZz170KwoP79AODdRU1uO16Az6WJDjDFDWy3JIIWbf8bhJeZDlCHxm2UIqI1Vfz+PriHxjZgz17nwrpmtXQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749152969; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DszMyD20ThXf63bYWe7ewf2cnMilx+Yg49wMmABHUYw=; b=eXVmjos8ELWJGPgHWM7BBjae8bHP3AwY4UeyXFWhv+7i3JuNBAaFWB7XKB977P3rPOF1LJVWEPPP+bOKJY5pcMp08M9dcfesu2TzjoChIjMBoUbhiDmsRMMvlPyKPu64TmzXUUVYFG6mNlmia79OfcxVL7kViSbOlUmXIgTKscc= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749152969242895.8024652926431; Thu, 5 Jun 2025 12:49:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007456.1386767 (Exim 4.92) (envelope-from ) id 1uNGaD-0003nB-2d; Thu, 05 Jun 2025 19:49:01 +0000 Received: by outflank-mailman (output) from mailman id 1007456.1386767; Thu, 05 Jun 2025 19:49:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGaC-0003n1-VX; Thu, 05 Jun 2025 19:49:00 +0000 Received: by outflank-mailman (input) for mailman id 1007456; Thu, 05 Jun 2025 19:48:59 +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 1uNGaA-0002fZ-WF for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:48:59 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on20623.outbound.protection.outlook.com [2a01:111:f403:2413::623]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1d1bde3f-4246-11f0-b894-0df219b8e170; Thu, 05 Jun 2025 21:48:57 +0200 (CEST) Received: from BN9P223CA0007.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::12) by PH0PR12MB8823.namprd12.prod.outlook.com (2603:10b6:510:28e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.35; Thu, 5 Jun 2025 19:48:47 +0000 Received: from BN2PEPF000055DF.namprd21.prod.outlook.com (2603:10b6:408:10b:cafe::cb) by BN9P223CA0007.outlook.office365.com (2603:10b6:408:10b::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.18 via Frontend Transport; Thu, 5 Jun 2025 19:48:47 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DF.mail.protection.outlook.com (10.167.245.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:48:47 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:48:44 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1d1bde3f-4246-11f0-b894-0df219b8e170 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MCkKidObom17MOavgs/GidT57hFvSOGtso0Ar0I1O0/+vikZ+inEVblUxW+12btWFLbOXkbVOLUlXlhfuHjkypgt01ZUHPPcG7bMnsiRaU8M5qdfPgv0UVhHIAL4UFv3aftREVTNpJo4NtjbadP+e4Ewf77WaD0I1+PoC9op1zpFf8C7Hrmq7nNFITRPzPPy09Gle75wQQmUx5+XCVmlm9kLDD1S+eDCorlJPWqRfAmu0+iJa+Nn3MJUyPJaw1hlaG1D+jX+YhN12kZHpaYuHwN6UhubPAlsdD3X9DKPEGEPIY/I7JW1L4aZF2MX3sVG1vvWfWbTKYdIuhgBTlGuZg== 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=DszMyD20ThXf63bYWe7ewf2cnMilx+Yg49wMmABHUYw=; b=GPnp5AB++9S5kpFVS01Yv2wYOHMIuiFls4vU2RJbN8TGuxUF3A/k52Fb31hOs1Yy+Pei+bIFzyUSt56sAxiQ0Zu/oJnEZWNekqGfHyWiTSt44kTWiA2sBo1RxgTpbtvRziXoIWMHJCDrEJ8o0wTp6eKT2P4VoPTXFvrM7iC+silxf6Rz2HloocgZWz5YCNdOiRfcuerr9LHt7oFL6gDEIGGbEwhIH1ruEq1Wpr4IV33mVeD0KUY6+AIY2nh1ybNG1MlyFUfkNt9t+fPCuI65iIVr8wARTLwl4dX7dYXBoCgtp1HxCmp7saOyK4AyjrXn80W4+LyLKF4+CVJ5t3TBmA== 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 (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=DszMyD20ThXf63bYWe7ewf2cnMilx+Yg49wMmABHUYw=; b=gKoveL4/UOdtyLvMW4VcP2PJajkktXvT5bF8nhD9qmOR6QmTL7nUHoaZn3sQk4EF78bhhMEctI1kjF9xb1k5srK6dEMgc6Sr1Gg6Sh8Nkkzse2YAIkpeP6B+HjkT6Ux2q+1CZUfnPwYGe1qOGaYANVXr0lBcASkg8hFO0R9o6Fg= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Andrew Cooper , Anthony PERARD , "Jan Beulich" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Daniel P. Smith" Subject: [PATCH v2 02/15] arm/gnttab: Break links between asm/grant_table.h and xen/grant_table.h Date: Thu, 5 Jun 2025 21:47:54 +0200 Message-ID: <20250605194810.2782031-3-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DF:EE_|PH0PR12MB8823:EE_ X-MS-Office365-Filtering-Correlation-Id: 1927f5ab-f940-4e54-c5c9-08dda469fca1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?1n50+s2bFGK3tOOGk0E/0alKu1ghwWao2pJjpWHjiYm8taOJ6KY4hzPmTwTr?= =?us-ascii?Q?/WzjanoK45HsqKeiDBMBsKj+x1V+IfVBAmefxd+eF9ap/9jRZ9W7zRZ75MHV?= =?us-ascii?Q?wUw9jsvYYbb35pJlMZOQG+im3YOsGU1kNHzu8sLYi5ySVdA23yDbHHg6DpzO?= =?us-ascii?Q?LdL2MkpkHkvIJd6fsWB0zqpMKzuUoSiPsUNTUoSeNSY9g9jwWmIrEueJc8JF?= =?us-ascii?Q?yfplsUrUVcsSfCuVkOyG/0UVb5oWw9loxmlFsAh/sUA8BgFcpmt6prYso26N?= =?us-ascii?Q?9hvOjOlg1WaYp0hv9xsIZfJ5XJfDeYvu81UX2SpoeWBzg0ePM5cQGQJQtcdm?= =?us-ascii?Q?eNlf0YvugXYTL0NClTALtecw6LlfcV/vWGE1ZfMCi5bpFjXWo5Jp1O+n3iTJ?= =?us-ascii?Q?4duJnf4K735Geuocwvqh9AWxtuQ5fgqmirsd/r8uiZEPsZE4Q3xJ9wkzfLnQ?= =?us-ascii?Q?ZVhe24VNKoLzrJ/gNrWke80Dryh8X3vsyuZd4XCKNZZQUlJaN7g7LSWiWllc?= =?us-ascii?Q?g603xXaP6cJEcuJzXUIpYRnWTHYnzc4NKHfEtWiJ3EC2UTD6xH9GIjKqrML/?= =?us-ascii?Q?wb+cA6kaoOdjVB2ZdRdN3UK2f6U/bLiFdfOBcwl2U23p6F2pW/tnZVUZ/cC8?= =?us-ascii?Q?5nWNG7YZ/idBZqNzwzelxdovV9x9xaBJlVD4PADtmPMrkNnDRfjeckRG+Vta?= =?us-ascii?Q?CaKyhg4NJxDNRpa6jFp1AxVbAPiey4LnNd1HtbgwTT5HZ311wbBGD0V+fxnG?= =?us-ascii?Q?Tv05qPykEOds9wMgjee/8eLLqRgb3IHrcF7PVM5KeFKC0N+KeKRj7lwOyviJ?= =?us-ascii?Q?wMQofoBn7iUvlEg2zZxuIoXWhS3jC18ixR8lxyUdBPJ+plhwgzaf2tsBOvtY?= =?us-ascii?Q?Q+++e7TLS4UQ0TW8oSecIrhH+tokOjWqildVqUT0KUkzU0sN4g8JH1/FnB2E?= =?us-ascii?Q?KpmT/ZTr5DsWks7rvvM67nGtw5YGtpaje396TEjmPF8z39Nn3nMPj4pRPdW8?= =?us-ascii?Q?KFnrsnI924pwdkdfWm5hZPwGlOsc5G3NEn/BFiejWiGE6Zn0MxpRfHcMBaLj?= =?us-ascii?Q?SXD0jIlM4x9jvqAdxPHQfZ+jmdUjpS4iJA71rCZgfOdF5CNqMcbcFQuG+Vdv?= =?us-ascii?Q?Yu+lM1KQaIrSnUcW4MFvHX0n4AAwaVnbnTBYThocE4WHw59Z/TC8dhfb5qIU?= =?us-ascii?Q?oQT6Ze+3fysWnS63rSCea67SPcVgd37nQr5mXlhQ2/ALtcLyDDSwYfHkoTPE?= =?us-ascii?Q?Af9KraqQf7q1w4fP5lfie8zIaSJ1mSwctn2lb9uzgm8znSiq3tCWT6X+l3gR?= =?us-ascii?Q?pZbmfH+qW7CXebIauwjRUhWWbQm/HFnG4PXjVzv/bhoDXpCtUqOsbdid++nk?= =?us-ascii?Q?Ucw0mfKpjcd6eCpk45t42Kqq6eaEm4T5FtjfXVeAdjgqS54VxWeTAajcDSa0?= =?us-ascii?Q?envOzjIU183+eOdEx7gw+oiSVhbxr88KJL2hU5vE0HeZ814QX7kjdYuVjYC6?= =?us-ascii?Q?72VbcQhT9Ws9AkeRVfbFHWfXUsvPVLjZHoND?= 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:(13230040)(36860700013)(82310400026)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:48:47.3027 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1927f5ab-f940-4e54-c5c9-08dda469fca1 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: BN2PEPF000055DF.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8823 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749152970722116600 Content-Type: text/plain; charset="utf-8" Not a functional change Signed-off-by: Alejandro Vallejo --- v2: * Remove both links rather than just one. --- xen/arch/arm/include/asm/grant_table.h | 1 - xen/common/device-tree/dom0less-build.c | 1 + xen/common/grant_table.c | 2 ++ xen/include/xen/grant_table.h | 4 ---- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/include/asm/grant_table.h b/xen/arch/arm/include/= asm/grant_table.h index c5d87b60c4..c47058a3a0 100644 --- a/xen/arch/arm/include/asm/grant_table.h +++ b/xen/arch/arm/include/asm/grant_table.h @@ -1,7 +1,6 @@ #ifndef __ASM_GRANT_TABLE_H__ #define __ASM_GRANT_TABLE_H__ =20 -#include #include #include #include diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tr= ee/dom0less-build.c index 3d503c6973..d5bb1d5d35 100644 --- a/xen/common/device-tree/dom0less-build.c +++ b/xen/common/device-tree/dom0less-build.c @@ -26,6 +26,7 @@ #include =20 #include +#include #include =20 #include diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index cf131c43a1..1e437eff50 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -42,8 +42,10 @@ #include #include #include + #include #include +#include =20 #ifdef CONFIG_PV_SHIM #include diff --git a/xen/include/xen/grant_table.h b/xen/include/xen/grant_table.h index 297d7669e9..98c4f4136b 100644 --- a/xen/include/xen/grant_table.h +++ b/xen/include/xen/grant_table.h @@ -27,10 +27,6 @@ #include #include =20 -#ifdef CONFIG_GRANT_TABLE -#include -#endif - struct grant_table; =20 /* Seed a gnttab entry for Hyperlaunch/dom0less. */ --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749152970; cv=pass; d=zohomail.com; s=zohoarc; b=GjsF/KJL83qnM5V3d5wZ1WUdqnP2dxBkY5pko6u7uOj+jMfJHM7b5BkD2/u+KC26EM4jHXYBjATzbc3z9ExmYApnJGrDhh7GYPRUJenXcHobFe6akLnoGDWEvHh3HvaMYEYzRbdWf6g+iHY5HEeZEUjjcwIzFi6SFFf6xJkBHz4= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749152970; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PdgGRU93owYApIHVcIm7iZ88U71h29ScJQ/Sz6iodgg=; b=WV5S5HQm6FltRUM6PcE07faI7hDqqWcRTKBe0pCHTq+1pmRvXLiRRhExq5iHhQSsBoGOY2kWrieBsz8c+NKluxYrUd7xMETXyUzXyqhDvrvmMRFUoj8AXQvkAgDqDXdL4xYabMqJaF3mpABXXZAnEJwz/LCNBVH7zArYUE6JmQA= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749152970295313.79515100147194; Thu, 5 Jun 2025 12:49:30 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007452.1386727 (Exim 4.92) (envelope-from ) id 1uNGa8-0002tL-Nw; Thu, 05 Jun 2025 19:48:56 +0000 Received: by outflank-mailman (output) from mailman id 1007452.1386727; Thu, 05 Jun 2025 19:48:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGa8-0002tE-K3; Thu, 05 Jun 2025 19:48:56 +0000 Received: by outflank-mailman (input) for mailman id 1007452; Thu, 05 Jun 2025 19:48:55 +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 1uNGa7-0002fZ-MU for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:48:55 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20612.outbound.protection.outlook.com [2a01:111:f403:2009::612]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1bc05c60-4246-11f0-b894-0df219b8e170; Thu, 05 Jun 2025 21:48:54 +0200 (CEST) Received: from BN9P223CA0028.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::33) by SA0PR12MB7462.namprd12.prod.outlook.com (2603:10b6:806:24b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.35; Thu, 5 Jun 2025 19:48:50 +0000 Received: from BN2PEPF000055DF.namprd21.prod.outlook.com (2603:10b6:408:10b:cafe::a4) by BN9P223CA0028.outlook.office365.com (2603:10b6:408:10b::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.19 via Frontend Transport; Thu, 5 Jun 2025 19:48:50 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DF.mail.protection.outlook.com (10.167.245.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:48:50 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:48:46 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1bc05c60-4246-11f0-b894-0df219b8e170 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xNVPyuWLYTQT7XtRq8yNETWeiaxysNWfyMttO3W9GP2w7QvLtOJX6UEy0W5pctNWxf2OE+Y8LRDT9JT1dsItcL7Vo0lDCJMjiQMTu8KvnHNejAlCBgZ8eLWyoNQo6ZceYVL3Aa1IlNV3bBCLJB2LA1t1jXLl/6ErY79zNF1qjKTxR0KflHroylqlOQqOCtZXH+6fDuHtqnLjIylAXHJdMEyH/lAJj+1cA8ZHL1IcZchxl3PDGcb3aHGY1Tts8/tbA51RU+uLzfgOIliklcMkO06IbGds9/67sCifyvOuX0fdkOCnbf75L8rYdB+l3bWZD08h3vfcvZaO3TxRmuzlbA== 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=PdgGRU93owYApIHVcIm7iZ88U71h29ScJQ/Sz6iodgg=; b=rgZvr7REDjzjKpuGKPnVSD0WYZsGMPB43armjmgbzmG/aWJTlDe7gPr+e3hmsiqF7hJ5++K8afkTzhPVpnPKPjLnidFKOQkYMJlKk6nAIwqDi4tSY0uv/FtMQFilymMy+eKakLPgRIc2hcdd9FouFPxFQHYm4fa2wjkO54uIVjJI64irHTkaxlO63aGiuPAgipnuZBqNaJ2/BiG4ftQ/P70gta7XRFbABAznghEZwmiLq0VZBb9SSYgR3abgSN2YhKxwtGcSYmzNUgYq/jKembrj0FT1ViLjWTnx11vkpDy4+lIXLuuNR86cZ/0BHm7Ld49ILzL8Yf0M8fcLe6+dTg== 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 (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=PdgGRU93owYApIHVcIm7iZ88U71h29ScJQ/Sz6iodgg=; b=ZFb9GzLT6Bg6MO/vN8q3zZ6yL2tTJUzH85NXxk/lNq6DAUX8K15A5UNst4yK3PA0K5wSK/Lznf6a9bgb8JiA+O6D9gd9sgRABr5WcaFtvIi4VjyKkcUJbvvNJuMInFVy6vteRbmELah8B67tJH3EPMzpnG47wELnXp1TwUGI5RA= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Daniel P. Smith" Subject: [PATCH v2 03/15] xen/dt: Add BOOTMOD_MICROCODE Date: Thu, 5 Jun 2025 21:47:55 +0200 Message-ID: <20250605194810.2782031-4-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DF:EE_|SA0PR12MB7462:EE_ X-MS-Office365-Filtering-Correlation-Id: 16efe8ab-8de1-4893-c800-08dda469fe88 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?9bzTa0F8shATQti5V+211cPeq8ykB+KppC3oqZPQTJfwBuixmixGuP7U8/Rh?= =?us-ascii?Q?uN1vErjkUHY1+fnZuaJgBgdFuNS6Lk+mqFkBSR+vWXpZBoNqDT9ZZeYiIEdn?= =?us-ascii?Q?bE4TCdEhJxDvZ7ZzAx961N0PTi0odwl8ZnFLc4Xkz8d9yqryIH4+e0LzhkWv?= =?us-ascii?Q?TgR/2D5OINH/LhstA58LSCEieeR8nJQbaUCJcdEBcGmBS/xUYOzXixGv0JFy?= =?us-ascii?Q?1Xa2BJgRIQSeSenGBIHEui9zv3+YR+Wb9AH3qZQTDbhnu5v7AjUkW/glXSeq?= =?us-ascii?Q?kohzn8Rjh91h4R9fZEVSS/8mWvGFNcje6AcLaY3bHNL/jcOJ+ZngRuimdqst?= =?us-ascii?Q?yIh8mtf8BTqhwCfCoWrHZej3ww0MyslJLE0tARIr5Pju3v+GBJy8SS7Fm68f?= =?us-ascii?Q?GbQeBNpikrGkSYq9m601JhI4BnOvsX+IudAMEc7fZogctpZjCmcM87x1PQLZ?= =?us-ascii?Q?Ihd0l85mAgI3wmhGVgv0Casl+65gx028C+C/3bDE5w19Sg8YVvy8w8YC3oXk?= =?us-ascii?Q?fiKa0GZYKnrXi1UaJkYAj9VmebS9KG9sMEPIo6/HJiTI6xdBTd42UiyzzahE?= =?us-ascii?Q?CdNekEPpdmLimzYCGza4kNcz7B12onAUjxveYVDp0MMPvaybV5l9D6UITt9o?= =?us-ascii?Q?qZ5L2FeVMmRsMJ5kD9IgKMXXHx01va8b3+wKoNRNtJbGT1AW3/mt9u/Z3SxF?= =?us-ascii?Q?5bs1Ux3I0/G4n8mH8m9ZOfRPa/JPdAQifB78qE6UmR0x6Olqq3iD/rI68lb7?= =?us-ascii?Q?fEmSZkrprHKMeX+TI4eTCAfA0y3ZLtL7HOlC0JA8S3VUbdA+VgkT2MAR4jtx?= =?us-ascii?Q?AQDnd/SxWkRQXN0pnv/NE1ebByurNFeCWGmehXHzCRt+kmhevgpIbYbsj3s+?= =?us-ascii?Q?taNu+Z6Q/iFFDOE8Ec1zGejgll5nuzCafO9qPIMxuIdDBFlEwuJeB+t1J0EA?= =?us-ascii?Q?PCFZGQfsUrJnlWHAxBW/TXyKwQZEP8EVhBBC/73YNzmIuiHIiNgooiuIy52l?= =?us-ascii?Q?s5E8Hh88IvWRRMLkiSkAQXi3XRkdVY3d5OC/wV9eOSUKqkpr2c0z7GWnILAN?= =?us-ascii?Q?UPKz0mPlZR6dei6sW0m5qiv4e03CdLIvIBmEI9xzumGEiM9spRLbfIUO/jzG?= =?us-ascii?Q?7K5MiZwPf95oXThq+Xxf5RTjzcQ1fz30BJAbdETiRoYZd2nDpE+za0H0bvBk?= =?us-ascii?Q?O8Ok2YdZSs09XE0QaI+P7FHRwAA3ME6GhyP9L9m4XskY+p5YVuqXV82qoCNT?= =?us-ascii?Q?Vkncux1ac/g1SXAjOXToE5KKWtz/25/fZzz8kVZ50RH2rO2fbB89lkhT8u8M?= =?us-ascii?Q?VjmOJ1k9tSrDw2bS9E20/UvMQqzaORT0pBkPv/xK+Pm0VX1J0+tM2rxPukAg?= =?us-ascii?Q?GvCNTo3ZwMBYwZtYbW9Irl2Z8jSVTrRJ2DW2DG4IvAc0dRrKws3FUj7hOhhS?= =?us-ascii?Q?lktOL4ijDVX8DcHLeSaDrrEeT0wfILDCIFALt4e/cX4yTMVZG+rvJ5T8NsTf?= =?us-ascii?Q?v1gw5yit2QHkxjQnDE7sf93ugbZ6vNYxjtWi?= 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:(13230040)(82310400026)(376014)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:48:50.4949 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 16efe8ab-8de1-4893-c800-08dda469fe88 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: BN2PEPF000055DF.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7462 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749152970707116600 Content-Type: text/plain; charset="utf-8" In preparation for x86 to start using bootmodule instead of boot_module Signed-off-by: Alejandro Vallejo Reviewed-by: Michal Orzel --- v2: * Added microcode detection in early probing --- xen/common/device-tree/bootfdt.c | 2 ++ xen/common/device-tree/bootinfo.c | 1 + xen/include/xen/bootfdt.h | 1 + 3 files changed, 4 insertions(+) diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/boot= fdt.c index 9df80291b1..9daea06e57 100644 --- a/xen/common/device-tree/bootfdt.c +++ b/xen/common/device-tree/bootfdt.c @@ -351,6 +351,8 @@ static void __init process_multiboot_node(const void *f= dt, int node, kind =3D BOOTMOD_XSM; else if ( fdt_node_check_compatible(fdt, node, "multiboot,device-tree"= ) =3D=3D 0 ) kind =3D BOOTMOD_GUEST_DTB; + else if ( fdt_node_check_compatible(fdt, node, "multiboot,microcode") = =3D=3D 0 ) + kind =3D BOOTMOD_MICROCODE; else kind =3D BOOTMOD_UNKNOWN; =20 diff --git a/xen/common/device-tree/bootinfo.c b/xen/common/device-tree/boo= tinfo.c index 76d652c0de..717cfa0962 100644 --- a/xen/common/device-tree/bootinfo.c +++ b/xen/common/device-tree/bootinfo.c @@ -31,6 +31,7 @@ const char * __init boot_module_kind_as_string(bootmodule= _kind kind) case BOOTMOD_RAMDISK: return "Ramdisk"; case BOOTMOD_XSM: return "XSM"; case BOOTMOD_GUEST_DTB: return "DTB"; + case BOOTMOD_MICROCODE: return "Microcode"; case BOOTMOD_UNKNOWN: return "Unknown"; default: BUG(); } diff --git a/xen/include/xen/bootfdt.h b/xen/include/xen/bootfdt.h index 64db48f4fe..ff40f3078e 100644 --- a/xen/include/xen/bootfdt.h +++ b/xen/include/xen/bootfdt.h @@ -21,6 +21,7 @@ typedef enum { BOOTMOD_RAMDISK, BOOTMOD_XSM, BOOTMOD_GUEST_DTB, + BOOTMOD_MICROCODE, BOOTMOD_UNKNOWN } bootmodule_kind; =20 --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749152963; cv=pass; d=zohomail.com; s=zohoarc; b=mAaqNHEjSV0xHZxqrE0n+pt7uX//XhvPfB+8kcOWyXMzTbxZ0+yvWpmSTPv61ebJzfIRiWm0KNDbUQIsq4W2Fbe5mGrfa0eRziQnfjI0r4gFLDgNLJjXJ95e3ecTGvZ57cxrwCcTelq66o2hLbeO/zt7nP5CUX8Dv/FB4w39654= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749152963; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3VkYpXY3zUXAOIvQP6YVzVO5MyvNvAMex59q1ydAmDM=; b=A7dWsitNU/QdApkHoQeVQ9YFBBLBni2qdaBDWUrG95by8W/MYpfe6AY4oEvsUZGnmdf0E9yo15sUlBrvhVf03bL53aOdX9JZuuErxeT2XoqbgwzegAf8pTHlULO+Gfo8xC3vVh5VVeNuRNq6VkV6TpAi5hCC/GqrYFTHNbG4D7g= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749152963749462.54047017866424; Thu, 5 Jun 2025 12:49:23 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007454.1386741 (Exim 4.92) (envelope-from ) id 1uNGaB-0003A1-7J; Thu, 05 Jun 2025 19:48:59 +0000 Received: by outflank-mailman (output) from mailman id 1007454.1386741; Thu, 05 Jun 2025 19:48:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGaB-00039W-1g; Thu, 05 Jun 2025 19:48:59 +0000 Received: by outflank-mailman (input) for mailman id 1007454; Thu, 05 Jun 2025 19:48:57 +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 1uNGa9-0002tD-Kb for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:48:57 +0000 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on20624.outbound.protection.outlook.com [2a01:111:f403:2408::624]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1d8bcc7f-4246-11f0-a300-13f23c93f187; Thu, 05 Jun 2025 21:48:57 +0200 (CEST) Received: from BN9P223CA0028.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::33) by SJ2PR12MB7943.namprd12.prod.outlook.com (2603:10b6:a03:4c8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.32; Thu, 5 Jun 2025 19:48:51 +0000 Received: from BN2PEPF000055DF.namprd21.prod.outlook.com (2603:10b6:408:10b:cafe::94) by BN9P223CA0028.outlook.office365.com (2603:10b6:408:10b::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.19 via Frontend Transport; Thu, 5 Jun 2025 19:48:51 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DF.mail.protection.outlook.com (10.167.245.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:48:51 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:48:47 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1d8bcc7f-4246-11f0-a300-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QqttT4haV1WbWrIVWeaTR5v2WtV6e8UNiX3ZkwWYVWsRqPHk5unITK6hMp8a9D6qIRSliKqPgdPtbOh+lPstRDu+jY4dS5c+LpDyw6On1xHnpsrz2RG7uRN+5NI8ANU1oEiiirf4G5KA2anXqX11PoserTcyA8z4k/T+e+top9qQJ7Gp/xKR0gIkQAdQph6PG/a1wxOBnFVWqIhKwGTYqu7QLmo/PJ9pmqN+qdB2UxOoSBO27IdcY0PUw9FR3fHXMw3hmyyyEtbVai70QBDK/aUNIy/Yjg1WbYDq9qgc2czrbruDtE+LuKOcwiIXWH10pH9D809eRDX1hJDnIe7a3w== 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=3VkYpXY3zUXAOIvQP6YVzVO5MyvNvAMex59q1ydAmDM=; b=hA2UYD3tkKBV+RDbOPt5t0tLn/VRNqMjw1ee2OzljljS+u6eSnYmEYrorkZF2eD9gPvD0F6VB3RUez1iUqbBgxsK5XBDiIN7e0B6ekQGgPVw7JpGMwhoJk+q5JqgfcLA00RsFMVmfWQU9y/3Pwg18UxS8WJkNmKUJsy+R3wuRKKpwYwDITUQf2MSaGt10MaJ+ZQOtLhtbsTNTFxmTKpJ2Do2UX8znOm4sSHThDRJkz/VbFFUg5v/iVP8BzpZKvKfkQ/OYXgdQkHhyR26JKN87nXbzgraNSuKfFXYgOT5ZTjn/G7qhTjO7WY1a+mC1RvMWQZr/tYc+Fzcnr/R8VxF4A== 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 (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=3VkYpXY3zUXAOIvQP6YVzVO5MyvNvAMex59q1ydAmDM=; b=qTa/i+OeKTw+mQZGuKDuTQ7heGlkuLiiVY0AbCD6971giuPeQ11N5Pghwlan7fOE2dv5FSKnfE1fHJQjNYKU6uRQncxPnH61erUh4O5AbqXk+LklXktj7a/OZPFsMS+B1k8vLnl1pVkhYl7ORnDCHPLiFXP+Tn3dQpdcSETq+rc= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Daniel P. Smith" , Stefano Stabellini Subject: [PATCH v2 04/15] x86: Preinitialise all modules to be of kind BOOTMOD_UNKNOWN Date: Thu, 5 Jun 2025 21:47:56 +0200 Message-ID: <20250605194810.2782031-5-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DF:EE_|SJ2PR12MB7943:EE_ X-MS-Office365-Filtering-Correlation-Id: 52aba572-4434-4afe-583a-08dda469fef1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?yp5qpJdcIurZPS6HYNVgpEw2lXTcfp7HauI44JIG/rdSBKBwxRgYBeyHCbXy?= =?us-ascii?Q?C3+FudbaGUw+z23H8iLjWtZKnorLkiHG8Ub0kkyr0acIjtsGZ9fHQn/L565t?= =?us-ascii?Q?jQxt00Xyt+tOlO7QNV0FgRJ036YsM8TdDLygsz4x2vJeabq9B/xN3fdlB6tb?= =?us-ascii?Q?UK7tLXtMH6xPlHE1NqLiKyRRcCGg4JwNyNoQRkmVqji2q3RK9c9e/t+Sxf9W?= =?us-ascii?Q?4QVEqpm6PXGJkgg0FbKy/MozAaRa08ct3kis+X8dlN6GZPLBQQhSEENUlmmz?= =?us-ascii?Q?syWVj5jMQd6wOxEMGebMthOIcubT2QCY1osBStIxBhjatNt/uq4fxydctP9V?= =?us-ascii?Q?hrhwzv0VioyjWGtlW5xy+N1sBHYLYr6lg7JOt7050YEBlXyM+WS7dvz6R525?= =?us-ascii?Q?oBJMwkIaisZMNEtnD/zuF3N3P+Pmsz3dvztv+UA1lPMmNzbIs34uAK1Ekof5?= =?us-ascii?Q?XO0fy1rGudLT8ICSnmHeKwXhIS7fyeUUSa0M0zaRZvZWQvHEzvCrYp3pDikX?= =?us-ascii?Q?LfCcmvPl8yJmTKfMuX59iDar/0pDAaNpJhq64fxMNyrZ4qe8IcRY9+Ul+bZz?= =?us-ascii?Q?oF1YwfTJlevL6SJpUz/+1sB7wqof9/tAxye3JsHCW23KQK3F1oOY6vvMZLPS?= =?us-ascii?Q?umksFa7B2aCHIPlA5i9LfyIQtS8wHsZTZpL5WNULa1BoyrjUfWJ/fyDuoEVM?= =?us-ascii?Q?GmnK4OmUKmR7uiU/S0FSpK5Wd/o+ZPFReBhK6xxAkZxU72DAxnZse0nZgTOD?= =?us-ascii?Q?qciIxEjdUsqj50MPOD3/M8/qLXCg4fOr122Rj+h+k5fKZAPyHGRSm3aB/8gl?= =?us-ascii?Q?ZI31R+X324adH8o4zt7oKCZF53GAQvSXnlyvN3H3iTqF1GVfOliNFLXENRwb?= =?us-ascii?Q?emkrncY8i8d5yCCvT0sGjZb/IdQon5WfpT+2FpNJTQrpbK6TysXzC+6Ec7WH?= =?us-ascii?Q?EvyYFH+9ZrmR58ULDfUw+zXJP68rA+C7DVvxu02i5/XaLUH1RpgcEQDKf5+C?= =?us-ascii?Q?PkPoj+vEbfg2caO0qZxYHiM8LEj9rYDE+9sBVCPibwjpA53BZGHw0LkuDZGH?= =?us-ascii?Q?f8NaBQ0fys/Xiwz0b/ixMQcLI1kKvUUFSS4ne5/TgnrOjrjiZ35KaZjKQryi?= =?us-ascii?Q?pwW27TXm9karSULsHuvHVizzpLT/Og0r6QTEsTwB0P/eRswu1jK89crDkHFd?= =?us-ascii?Q?vGGdPfBuW3nymZN2a3tLNJpxlKs5+S/Ui7SKXuH51D0Yw04HHsSAtrZ8dTRf?= =?us-ascii?Q?En2evMgaiXcNXe3PQY/KSXf+m9Pw/vyZolR7oiNopjfIj/ncqQqiIeloStvS?= =?us-ascii?Q?mTewl72zA2NkpRTemmBDfBYBfe3BauODz1/wINfv/ZEpXBHT2AAf/dWitPQ9?= =?us-ascii?Q?mOKReJhANHlYQqtg4J1ofGu6/Tk+bPC3L6QhRtI/S9zoxYT8ZeV9RB3jDTmA?= =?us-ascii?Q?4gxgAzh3MqujcIjKkOV0DWs/Vl+LW9Hpo6+PTWRLMy6mYrjMBtWBdNkNJDa/?= =?us-ascii?Q?nMiF4R1xyLzTz20ozw6RHE+cGjGd2aJd5UJZ?= 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:(13230040)(376014)(36860700013)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:48:51.1799 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 52aba572-4434-4afe-583a-08dda469fef1 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: BN2PEPF000055DF.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7943 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749152964657116600 Content-Type: text/plain; charset="utf-8" A later patch removes boot_module and replaces its uses with bootmodule. The equivalent field for "type" doesn't have BOOTMOD_UNKNOWN as a zero value, so it must be explicitly set in the static xen_boot_info. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- v2: * Add comment stating why mods initialiser isn't off by one. --- xen/arch/x86/setup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 1f5cb67bd0..7d3b30e1db 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -298,6 +298,12 @@ struct boot_info __initdata xen_boot_info =3D { .loader =3D "unknown", .cmdline =3D "", .domains =3D { [0 ... MAX_NR_BOOTDOMS - 1] =3D { .domid =3D DOMID_INVA= LID } }, + /* + * There's a MAX_NR_BOOTMODS-th entry in the array. It's not off by on= e. + * + * The extra entry exists to be able to add the Xen image as a module. + */ + .mods =3D { [0 ... MAX_NR_BOOTMODS] =3D { .type =3D BOOTMOD_UNKNOWN } = }, }; =20 static struct boot_info *__init multiboot_fill_boot_info( --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749152965; cv=pass; d=zohomail.com; s=zohoarc; b=VNO6cgG/EkBb2q3U50e8S5DjCSzSKKcBQcEDExKYqqWgS+tv4X0nDLTk2A2BkeET4T+v2AkQS3mA3L1slhSUFrnmdOoAZ0KIS4qcg3xbcBfaDrQdut15QaqY/B2NhA2BHCBEwi2+zMlopegqRbMcgW+oGoHM/Hqx53VJ+Urei8U= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749152965; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ArwUcGoNTf1o6R567cJORGEFIrUC5cYy26HnoRll94w=; b=MoJkcR7XYHYQLqWn9qC9ZtlW3ehy++yt3uW/jVAkzd2DgjzFQV27H8A0JQ/HsghJoRBMUs0+LXv6r2+sS9MDITz+hPea/fHU3R8I+Spy99xupsh8fcGNqCkeWm2XnTtG0tj0jseRVQfgELk0/bBzsHY75oB4ja656pGvXuekzsg= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 17491529657462.5852154260767293; Thu, 5 Jun 2025 12:49:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007455.1386748 (Exim 4.92) (envelope-from ) id 1uNGaB-0003HB-NC; Thu, 05 Jun 2025 19:48:59 +0000 Received: by outflank-mailman (output) from mailman id 1007455.1386748; Thu, 05 Jun 2025 19:48:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGaB-0003Fw-HG; Thu, 05 Jun 2025 19:48:59 +0000 Received: by outflank-mailman (input) for mailman id 1007455; Thu, 05 Jun 2025 19:48:58 +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 1uNGaA-0002tD-G1 for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:48:58 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20627.outbound.protection.outlook.com [2a01:111:f403:2418::627]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1d204b87-4246-11f0-a300-13f23c93f187; Thu, 05 Jun 2025 21:48:56 +0200 (CEST) Received: from BN9P223CA0016.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::21) by CYYPR12MB8962.namprd12.prod.outlook.com (2603:10b6:930:c4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Thu, 5 Jun 2025 19:48:52 +0000 Received: from BN2PEPF000055DF.namprd21.prod.outlook.com (2603:10b6:408:10b:cafe::72) by BN9P223CA0016.outlook.office365.com (2603:10b6:408:10b::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.35 via Frontend Transport; Thu, 5 Jun 2025 19:48:52 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DF.mail.protection.outlook.com (10.167.245.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:48:52 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:48:49 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1d204b87-4246-11f0-a300-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CMvqIfYvdfkEPCeyfpGjvm9q6EB+YLZUKiRe5vwswLaX/Jr9rx2pf43APaxJggrQhkJ2JledLgCBKt20EvyqaKt0GQdawabSNCInYfMob13X/dAlvPIImtnpN02inWSuvnKOyrUiFAlqBJXSMAPFx94UrWHGzQcmyv4YQs+TGW/flLlGtu5wDrK1ZS0W3tPJkFyd986dj4eP/sFl1WFQCmpBFu0vScayNa/JBiZpwVRGCxggEuUW9koklO7+p6997s2B1sdzf+jrHUFR+srdqyh0cOJzrtxfUEXw1MXJOk/KtQkPOAzHVWiHs2OmF+1k/fW4yM6rjwH0ZltfnuIGlA== 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=ArwUcGoNTf1o6R567cJORGEFIrUC5cYy26HnoRll94w=; b=B8pTMYbyHNnEBw3Mcpqe8h01ohKKRG5gMhpeciQbVQAlAdpOhmwHwZkTJJ6pbUYStjffdyiDoMpt3XdJy5S765i+n+X8rFWWLFRulQoeM3NNHX3mGxOL2a9MUZHCyZqC7EZt8ApP8+JNgxDIQtXBYT5JRp8ghtyOJzrmGfm1AX5Uf8BxKfUw4B2Ou8GF2o88iqqqVntA6bej2q6Ob6mjR0xGvBaKtMHy8NkMxLcY/mopJRBBC45+Y7Tyb/1bqh6e5CR4n4buxIYvLEuPCT5uS2WpWR/G0bxgF19NnJUmHztWw9U4FaY0Cg3Fm8ESzKKxfgijTol9BZ1qMqhHhXb1jA== 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 (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=ArwUcGoNTf1o6R567cJORGEFIrUC5cYy26HnoRll94w=; b=VEY2A4i20wScLxvAYIQFhShcCW+qoH++w4VSVvkuGWZAMazPhDaSTJnL+Zgi+yxjLZNASm19OoVDsszhDc7ik9/316P+oYiZ9xYfYpuKNublkf1b6nd/+Jvs8TAwQnstMTRTP1Bi6PIpb0Y84DbQrbsQcVxHRx36rWAym9ldxzY= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Stefano Stabellini" , Julien Grall , "Bertrand Marquis" , Michal Orzel , "Daniel P. Smith" Subject: [PATCH v2 05/15] x86: Replace boot_module with bootmodule Date: Thu, 5 Jun 2025 21:47:57 +0200 Message-ID: <20250605194810.2782031-6-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DF:EE_|CYYPR12MB8962:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b018c87-2db1-4b35-f640-08dda469ff8d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?GwS9RDJrmdBBt7WiqqAsZH2RCFpXilLJ5nvJcTxXS4rpUbXp44IMr/mZnZTJ?= =?us-ascii?Q?+dk5+iT0+YHPcDhKOAy6iyLvI6GOJl/wu6OOz91heptl2soDR/Ajo9pjttWD?= =?us-ascii?Q?K4khtSb+o5z7uNN6lQ2EvBYZ2nscLd0C0SRqvN0O60mzPB2giTZo8cB0PBYd?= =?us-ascii?Q?lGfyL+3AeQxodZzaCk2FjGDv4J/dEyW9lAsNXttCQvR78CsloGGpa2EiC4oq?= =?us-ascii?Q?ye1SYn42zzDfy/kaYm829n6DX0X2hppjjJ1PME6J7iPPc1G5PqBKCh4h/105?= =?us-ascii?Q?i6jx67Vx+3mUIoYgcMbIPPhhEDBb8iNjxfdb0jDcjFUjIyr0ZrEP08TGGLIQ?= =?us-ascii?Q?X8ZTmcr+N8lYZ7DqMRbFNrLD6sPb1KRoBbdx+5Qw7865MBP8Qtzih4pcXCgU?= =?us-ascii?Q?6SvVrOAEaeSsAif/2zi22ZXZQ3Xijm+Ipf3dMQEQhxmrwEH4TGs9bZ1YHX9R?= =?us-ascii?Q?EIf4stElQN22+IciP9ZqQ5XlTcRVH3EwU9p7sHu6ITp494awT5SvCw2Z43IE?= =?us-ascii?Q?VpJp9Ce7tPc/bOWEAmfXFzU21mJbyCEMPdHTPjWMPbaDWAba8oLarKFbkKAM?= =?us-ascii?Q?nuTcuroaDGqP7+Dm66f8K3YU3h0SHWg9sdUby08bU+2VC7+47PkD3kKX/u2C?= =?us-ascii?Q?wKRyqfNt8Vkh1dlfljzmV8TcJtbU0jhR2W8vEWFwycm89cC8ixrbD8BraM/m?= =?us-ascii?Q?00W1BDV2e9FVbAyylm7h3FWQouGb5UrX3zUQdS0M+RX0MiJrE1jwsuYIfKaQ?= =?us-ascii?Q?sViOkNWEC7GZSde1pdmpsmRiT0G8VU/z0X8LUhHqRXN/FN5HxUFiwCnE4Bja?= =?us-ascii?Q?15GNdZ9Ab3ZiG4vbbBtKvsDezDQXOqsXQxGESPbPoRl9YyAogzLoNZKQOQ1f?= =?us-ascii?Q?Lat+QhC8H8IFn5HDw7Ata4rrBhZsuyw69h6899/m1i0rjQxrCpF7rmAoXE3S?= =?us-ascii?Q?1YrS9vurauNikeHu/4c1hXYb2wfuVOvxecfxBx+4nhyjDWiqP00N+LpFKJOO?= =?us-ascii?Q?qqpBvsfXk82bQbta3nIdMGO7FPCjdcQZ/znNC87G6vOuBvnvoZx8NyKKyPeA?= =?us-ascii?Q?3uSXLpJOiO/6iCzes/p/B0474TP+42JvTrZbysFadHtgYOrYoRFh09ZM7LH8?= =?us-ascii?Q?03mu0kax9DLut2Lnc+M5LyqWvH43L2YBmMwZQjn8hDmaQpvSUuV5q3VKtM/1?= =?us-ascii?Q?r0nzWB46KJT1Jhyr9Xor+W4Qr4oL78huUD1SGkNlldwC39IpGx8FxV/01BCA?= =?us-ascii?Q?daLHd7BKdNdKBlk/dc+FJlgimIhleZivejcxpMNc/bHFgPyNdFE1mxOvjT7L?= =?us-ascii?Q?CTp2oOslqN3IPKTYit3APOCAoqkNJfL6pRY32mY/yQKRwrXle6ubyXQCO2LA?= =?us-ascii?Q?oL0SHXj+OUvgqM9VEuqu62QcoqYpBiK65KrnrR2GQFGcigtlbjE8QS28a/Ra?= =?us-ascii?Q?6HRmCDBhZ4Z/JuU7HAP7zSEVxZ9cnDWwgtnyntRI1Xx3sGxaBvqjbs3WD7b1?= =?us-ascii?Q?Eic8k+wiHIUhcIQTWvEXjKOUaMDoQHkaDsV3?= 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:(13230040)(82310400026)(36860700013)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:48:52.2074 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b018c87-2db1-4b35-f640-08dda469ff8d 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: BN2PEPF000055DF.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8962 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749152966928116600 Content-Type: text/plain; charset="utf-8" These types resemble each other very closely in layout and intent, and with "struct bootmodule" already in common code it makes perfect sense to merge them. In order to do so, add an arch-specific area for x86-specific tidbits. Signed-off-by: Alejandro Vallejo -- v2: * Remove spurious fdt_cmdline from the new arch_bootmodule --- xen/arch/x86/cpu/microcode/core.c | 9 ++-- xen/arch/x86/hvm/dom0_build.c | 10 ++--- xen/arch/x86/include/asm/boot-domain.h | 4 +- xen/arch/x86/include/asm/bootfdt.h | 50 ++++++++++++++++++++++ xen/arch/x86/include/asm/bootinfo.h | 58 +++----------------------- xen/arch/x86/include/asm/setup.h | 6 +-- xen/arch/x86/pv/dom0_build.c | 8 ++-- xen/arch/x86/setup.c | 52 ++++++++++++----------- xen/include/xen/bootfdt.h | 9 ++++ xen/xsm/xsm_policy.c | 4 +- 10 files changed, 111 insertions(+), 99 deletions(-) create mode 100644 xen/arch/x86/include/asm/bootfdt.h diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode= /core.c index 34a94cd25b..0111ef9156 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -760,12 +760,11 @@ static int __init early_microcode_load(struct boot_in= fo *bi) { for ( idx =3D 0; idx < bi->nr_modules; ++idx ) { - const struct boot_module *bm =3D &bi->mods[idx]; + const struct bootmodule *bm =3D &bi->mods[idx]; struct cpio_data cd; =20 /* Search anything unclaimed or likely to be a CPIO archive. */ - if ( bm->type !=3D BOOTMOD_UNKNOWN && - bm->type !=3D BOOTMOD_RAMDISK ) + if ( bm->kind !=3D BOOTMOD_UNKNOWN && bm->kind !=3D BOOTMOD_RA= MDISK ) continue; =20 size =3D bm->size; @@ -815,12 +814,12 @@ static int __init early_microcode_load(struct boot_in= fo *bi) return -ENODEV; } =20 - if ( bi->mods[idx].type !=3D BOOTMOD_UNKNOWN ) + if ( bi->mods[idx].kind !=3D BOOTMOD_UNKNOWN ) { printk(XENLOG_WARNING "Microcode: Chosen module %d already use= d\n", idx); return -ENODEV; } - bi->mods[idx].type =3D BOOTMOD_MICROCODE; + bi->mods[idx].kind =3D BOOTMOD_MICROCODE; =20 size =3D bi->mods[idx].size; data =3D bootstrap_map_bm(&bi->mods[idx]); diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index a038e58c11..96410344a8 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -647,10 +647,10 @@ static int __init pvh_load_kernel( const struct boot_domain *bd, paddr_t *entry, paddr_t *start_info_addr) { struct domain *d =3D bd->d; - struct boot_module *image =3D bd->kernel; - struct boot_module *initrd =3D bd->module; + struct bootmodule *image =3D bd->kernel; + struct bootmodule *initrd =3D bd->module; void *image_base =3D bootstrap_map_bm(image); - void *image_start =3D image_base + image->headroom; + void *image_start =3D image_base + image->arch.headroom; unsigned long image_len =3D image->size; unsigned long initrd_len =3D initrd ? initrd->size : 0; size_t cmdline_len =3D bd->cmdline ? strlen(bd->cmdline) + 1 : 0; @@ -721,9 +721,9 @@ static int __init pvh_load_kernel( { size_t initrd_space =3D elf_round_up(&elf, initrd_len); =20 - if ( initrd->cmdline_pa ) + if ( initrd->arch.cmdline_pa ) { - initrd_cmdline =3D __va(initrd->cmdline_pa); + initrd_cmdline =3D __va(initrd->arch.cmdline_pa); if ( !*initrd_cmdline ) initrd_cmdline =3D NULL; } diff --git a/xen/arch/x86/include/asm/boot-domain.h b/xen/arch/x86/include/= asm/boot-domain.h index d7c6042e25..242e9c9c2b 100644 --- a/xen/arch/x86/include/asm/boot-domain.h +++ b/xen/arch/x86/include/asm/boot-domain.h @@ -13,8 +13,8 @@ struct boot_domain { domid_t domid; =20 - struct boot_module *kernel; - struct boot_module *module; + struct bootmodule *kernel; + struct bootmodule *module; const char *cmdline; =20 struct domain *d; diff --git a/xen/arch/x86/include/asm/bootfdt.h b/xen/arch/x86/include/asm/= bootfdt.h new file mode 100644 index 0000000000..2fc705a1cd --- /dev/null +++ b/xen/arch/x86/include/asm/bootfdt.h @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef X86_BOOTFDT_H +#define X86_BOOTFDT_H + +#include + +struct arch_bootmodule +{ + /* + * Module State Flags: + * relocated: indicates module has been relocated in memory. + * released: indicates module's pages have been freed. + */ + bool relocated:1; + bool released:1; + + /* + * A boot module may need decompressing by Xen. Headroom is an estima= te of + * the additional space required to decompress the module. + * + * Headroom is accounted for at the start of the module. Decompressin= g is + * done in-place with input=3Dstart, output=3Dstart-headroom, expectin= g the + * pointers to become equal (give or take some rounding) when decompre= ssion + * is complete. + * + * Memory layout at boot: + * + * start ----+ + * v + * |<-----headroom------>|<------size------->| + * +-------------------+ + * | Compressed Module | + * +---------------------+-------------------+ + * | Decompressed Module | + * +-----------------------------------------+ + */ + unsigned long headroom; + paddr_t cmdline_pa; +}; + +#endif /* X86_BOOTFDT_H */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/arch/x86/include/asm/bootinfo.h b/xen/arch/x86/include/asm= /bootinfo.h index 3afc214c17..f3210b7d6a 100644 --- a/xen/arch/x86/include/asm/bootinfo.h +++ b/xen/arch/x86/include/asm/bootinfo.h @@ -8,6 +8,7 @@ #ifndef X86_BOOTINFO_H #define X86_BOOTINFO_H =20 +#include #include #include #include @@ -19,55 +20,6 @@ /* Max number of boot domains that Xen can construct */ #define MAX_NR_BOOTDOMS 1 =20 -/* Boot module binary type / purpose */ -enum bootmod_type { - BOOTMOD_UNKNOWN, - BOOTMOD_XEN, - BOOTMOD_KERNEL, - BOOTMOD_RAMDISK, - BOOTMOD_MICROCODE, - BOOTMOD_XSM_POLICY, -}; - -struct boot_module { - enum bootmod_type type; - - /* - * Module State Flags: - * relocated: indicates module has been relocated in memory. - * released: indicates module's pages have been freed. - */ - bool relocated:1; - bool released:1; - - /* - * A boot module may need decompressing by Xen. Headroom is an estima= te of - * the additional space required to decompress the module. - * - * Headroom is accounted for at the start of the module. Decompressin= g is - * done in-place with input=3Dstart, output=3Dstart-headroom, expectin= g the - * pointers to become equal (give or take some rounding) when decompre= ssion - * is complete. - * - * Memory layout at boot: - * - * start ----+ - * v - * |<-----headroom------>|<------size------->| - * +-------------------+ - * | Compressed Module | - * +---------------------+-------------------+ - * | Decompressed Module | - * +-----------------------------------------+ - */ - unsigned long headroom; - - paddr_t cmdline_pa; - - paddr_t start; - size_t size; -}; - /* * Xen internal representation of information provided by the * bootloader/environment, or derived from the information. @@ -81,7 +33,7 @@ struct boot_info { size_t memmap_length; =20 unsigned int nr_modules; - struct boot_module mods[MAX_NR_BOOTMODS + 1]; + struct bootmodule mods[MAX_NR_BOOTMODS + 1]; struct boot_domain domains[MAX_NR_BOOTDOMS]; }; =20 @@ -94,16 +46,16 @@ struct boot_info { * Failure - a value greater than MAX_NR_BOOTMODS */ static inline unsigned int __init next_boot_module_index( - const struct boot_info *bi, enum bootmod_type t, unsigned int start) + const struct boot_info *bi, bootmodule_kind k, unsigned int start) { unsigned int i; =20 - if ( t =3D=3D BOOTMOD_XEN ) + if ( k =3D=3D BOOTMOD_XEN ) return bi->nr_modules; =20 for ( i =3D start; i < bi->nr_modules; i++ ) { - if ( bi->mods[i].type =3D=3D t ) + if ( bi->mods[i].kind =3D=3D k ) return i; } =20 diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/se= tup.h index ac34c69855..c7deaba109 100644 --- a/xen/arch/x86/include/asm/setup.h +++ b/xen/arch/x86/include/asm/setup.h @@ -36,11 +36,11 @@ extern struct boot_info xen_boot_info; unsigned long initial_images_nrpages(nodeid_t node); void free_boot_modules(void); =20 -struct boot_module; -void *bootstrap_map_bm(const struct boot_module *bm); +struct bootmodule; +void *bootstrap_map_bm(const struct bootmodule *bm); void bootstrap_unmap(void); =20 -void release_boot_module(struct boot_module *bm); +void release_boot_module(struct bootmodule *bm); =20 struct rangeset; int remove_xen_ranges(struct rangeset *r); diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index e1b78d47c2..e6c77413f5 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -374,8 +374,8 @@ static int __init dom0_construct(const struct boot_doma= in *bd) struct domain *d =3D bd->d; struct vcpu *v =3D d->vcpu[0]; =20 - struct boot_module *image =3D bd->kernel; - struct boot_module *initrd =3D bd->module; + struct bootmodule *image =3D bd->kernel; + struct bootmodule *initrd =3D bd->module; void *image_base; unsigned long image_len; void *image_start; @@ -422,7 +422,7 @@ static int __init dom0_construct(const struct boot_doma= in *bd) =20 image_base =3D bootstrap_map_bm(image); image_len =3D image->size; - image_start =3D image_base + image->headroom; + image_start =3D image_base + image->arch.headroom; =20 d->max_pages =3D ~0U; =20 @@ -659,7 +659,7 @@ static int __init dom0_construct(const struct boot_doma= in *bd) * pages. Tell the boot_module handling that we've freed it, s= o the * memory is left alone. */ - initrd->released =3D true; + initrd->arch.released =3D true; } =20 iommu_memory_setup(d, "initrd", mfn_to_page(_mfn(initrd_mfn)), diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 7d3b30e1db..e9a70c2c2b 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -303,7 +303,7 @@ struct boot_info __initdata xen_boot_info =3D { * * The extra entry exists to be able to add the Xen image as a module. */ - .mods =3D { [0 ... MAX_NR_BOOTMODS] =3D { .type =3D BOOTMOD_UNKNOWN } = }, + .mods =3D { [0 ... MAX_NR_BOOTMODS] =3D { .kind =3D BOOTMOD_UNKNOWN } = }, }; =20 static struct boot_info *__init multiboot_fill_boot_info( @@ -338,7 +338,7 @@ static struct boot_info *__init multiboot_fill_boot_inf= o( */ for ( i =3D 0; i < MAX_NR_BOOTMODS && i < bi->nr_modules; i++ ) { - bi->mods[i].cmdline_pa =3D mods[i].string; + bi->mods[i].arch.cmdline_pa =3D mods[i].string; =20 if ( efi_enabled(EFI_LOADER) ) { @@ -361,7 +361,7 @@ static struct boot_info *__init multiboot_fill_boot_inf= o( } =20 /* Variable 'i' should be one entry past the last module. */ - bi->mods[i].type =3D BOOTMOD_XEN; + bi->mods[i].kind =3D BOOTMOD_XEN; =20 return bi; } @@ -386,13 +386,13 @@ unsigned long __init initial_images_nrpages(nodeid_t = node) return nr; } =20 -void __init release_boot_module(struct boot_module *bm) +void __init release_boot_module(struct bootmodule *bm) { - ASSERT(!bm->released); + ASSERT(!bm->arch.released); =20 init_domheap_pages(bm->start, bm->start + PAGE_ALIGN(bm->size)); =20 - bm->released =3D true; + bm->arch.released =3D true; } =20 void __init free_boot_modules(void) @@ -402,7 +402,7 @@ void __init free_boot_modules(void) =20 for ( i =3D 0; i < bi->nr_modules; ++i ) { - if ( bi->mods[i].released ) + if ( bi->mods[i].arch.released ) continue; =20 release_boot_module(&bi->mods[i]); @@ -524,7 +524,7 @@ static void *__init bootstrap_map_addr(paddr_t start, p= addr_t end) return ret; } =20 -void *__init bootstrap_map_bm(const struct boot_module *bm) +void *__init bootstrap_map_bm(const struct bootmodule *bm) { return bootstrap_map_addr(bm->start, bm->start + bm->size); } @@ -694,7 +694,7 @@ static void __init noinline move_xen(void) #undef BOOTSTRAP_MAP_LIMIT =20 static uint64_t __init consider_modules( - uint64_t s, uint64_t e, uint32_t size, const struct boot_module *mods, + uint64_t s, uint64_t e, uint32_t size, const struct bootmodule mods[], unsigned int nr_mods, unsigned int this_mod) { unsigned int i; @@ -990,8 +990,9 @@ static size_t __init domain_cmdline_size(const struct b= oot_info *bi, const struct boot_domain *bd) { size_t s =3D bi->kextra ? strlen(bi->kextra) : 0; + const struct arch_bootmodule *abm =3D &bd->kernel->arch; =20 - s +=3D bd->kernel->cmdline_pa ? strlen(__va(bd->kernel->cmdline_pa)) := 0; + s +=3D abm->cmdline_pa ? strlen(__va(abm->cmdline_pa)) : 0; =20 if ( s =3D=3D 0 ) return s; @@ -1055,9 +1056,10 @@ static struct domain *__init create_dom0(struct boot= _info *bi) if ( !(cmdline =3D xzalloc_array(char, cmdline_size)) ) panic("Error allocating cmdline buffer for %pd\n", d); =20 - if ( bd->kernel->cmdline_pa ) + if ( bd->kernel->arch.cmdline_pa ) strlcpy(cmdline, - cmdline_cook(__va(bd->kernel->cmdline_pa), bi->loader), + cmdline_cook(__va(bd->kernel->arch.cmdline_pa), + bi->loader), cmdline_size); =20 if ( bi->kextra ) @@ -1079,7 +1081,7 @@ static struct domain *__init create_dom0(struct boot_= info *bi) strlcat(cmdline, " acpi=3D", cmdline_size); strlcat(cmdline, acpi_param, cmdline_size); } - bd->kernel->cmdline_pa =3D 0; + bd->kernel->arch.cmdline_pa =3D 0; bd->cmdline =3D cmdline; } =20 @@ -1292,7 +1294,7 @@ void asmlinkage __init noreturn __start_xen(void) } =20 /* Dom0 kernel is always first */ - bi->mods[0].type =3D BOOTMOD_KERNEL; + bi->mods[0].kind =3D BOOTMOD_KERNEL; bi->domains[0].kernel =3D &bi->mods[0]; =20 if ( pvh_boot ) @@ -1463,7 +1465,7 @@ void asmlinkage __init noreturn __start_xen(void) =20 if ( xen_phys_start ) { - struct boot_module *xen =3D &bi->mods[bi->nr_modules]; + struct bootmodule *xen =3D &bi->mods[bi->nr_modules]; =20 relocated =3D true; =20 @@ -1476,7 +1478,7 @@ void asmlinkage __init noreturn __start_xen(void) xen->size =3D __2M_rwdata_end - _stext; } =20 - bi->mods[0].headroom =3D + bi->mods[0].arch.headroom =3D bzimage_headroom(bootstrap_map_bm(&bi->mods[0]), bi->mods[0].size); bootstrap_unmap(); =20 @@ -1557,10 +1559,10 @@ void asmlinkage __init noreturn __start_xen(void) /* Is the region suitable for relocating the multiboot modules? */ for ( j =3D bi->nr_modules - 1; j >=3D 0; j-- ) { - struct boot_module *bm =3D &bi->mods[j]; - unsigned long size =3D PAGE_ALIGN(bm->headroom + bm->size); + struct bootmodule *bm =3D &bi->mods[j]; + unsigned long size =3D PAGE_ALIGN(bm->arch.headroom + bm->size= ); =20 - if ( bm->relocated ) + if ( bm->arch.relocated ) continue; =20 /* Don't overlap with other modules (or Xen itself). */ @@ -1570,12 +1572,12 @@ void asmlinkage __init noreturn __start_xen(void) if ( highmem_start && end > highmem_start ) continue; =20 - if ( s < end && (bm->headroom || (end - size) > bm->start) ) + if ( s < end && (bm->arch.headroom || (end - size) > bm->start= ) ) { - move_memory(end - size + bm->headroom, bm->start, bm->size= ); + move_memory(end - size + bm->arch.headroom, bm->start, bm-= >size); bm->start =3D (end - size); - bm->size +=3D bm->headroom; - bm->relocated =3D true; + bm->size +=3D bm->arch.headroom; + bm->arch.relocated =3D true; } } =20 @@ -1601,7 +1603,7 @@ void asmlinkage __init noreturn __start_xen(void) #endif } =20 - if ( bi->mods[0].headroom && !bi->mods[0].relocated ) + if ( bi->mods[0].arch.headroom && !bi->mods[0].arch.relocated ) panic("Not enough memory to relocate the dom0 kernel image\n"); for ( i =3D 0; i < bi->nr_modules; ++i ) { @@ -2159,7 +2161,7 @@ void asmlinkage __init noreturn __start_xen(void) initrdidx =3D first_boot_module_index(bi, BOOTMOD_UNKNOWN); if ( initrdidx < MAX_NR_BOOTMODS ) { - bi->mods[initrdidx].type =3D BOOTMOD_RAMDISK; + bi->mods[initrdidx].kind =3D BOOTMOD_RAMDISK; bi->domains[0].module =3D &bi->mods[initrdidx]; if ( first_boot_module_index(bi, BOOTMOD_UNKNOWN) < MAX_NR_BOOTMOD= S ) printk(XENLOG_WARNING diff --git a/xen/include/xen/bootfdt.h b/xen/include/xen/bootfdt.h index ff40f3078e..4cab5d5202 100644 --- a/xen/include/xen/bootfdt.h +++ b/xen/include/xen/bootfdt.h @@ -7,6 +7,10 @@ #include #include =20 +#if __has_include() +#include +#endif + #define MIN_FDT_ALIGN 8 =20 #define NR_MEM_BANKS 256 @@ -106,8 +110,13 @@ struct shared_meminfo { struct bootmodule { bootmodule_kind kind; bool domU; + paddr_t start; paddr_t size; + +#if __has_include() + struct arch_bootmodule arch; +#endif }; =20 /* DT_MAX_NAME is the node name max length according the DT spec */ diff --git a/xen/xsm/xsm_policy.c b/xen/xsm/xsm_policy.c index 7f70d860bd..0c2cdea8ed 100644 --- a/xen/xsm/xsm_policy.c +++ b/xen/xsm/xsm_policy.c @@ -40,7 +40,7 @@ int __init xsm_multiboot_policy_init( =20 for_each_boot_module_by_type ( i, bi, BOOTMOD_UNKNOWN ) { - struct boot_module *bm =3D &bi->mods[i]; + struct bootmodule *bm =3D &bi->mods[i]; =20 _policy_start =3D bootstrap_map_bm(bm); _policy_len =3D bm->size; @@ -53,7 +53,7 @@ int __init xsm_multiboot_policy_init( printk("Policy len %#lx, start at %p.\n", _policy_len,_policy_start); =20 - bm->type =3D BOOTMOD_XSM_POLICY; + bm->kind =3D BOOTMOD_XSM; break; =20 } --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749152961; cv=pass; d=zohomail.com; s=zohoarc; b=lupCl9jw7YPS58oKbXjaFKrfanNmSR8Vl38ehvksyMTTSH5yJ9kiuhxJNRqB8cuYEo2Jd/dbgFVaRFBehQWtOnvTMGXgC3I6Jl5+UO60fW1LfcdoyXzYsGgiFT/1QMMajzph4qWTP1h7sOEW/zv5oM8gGtUb9F1F7Qu55NnYW/Q= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749152961; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=23cn4AM6kYMSovW9UaT7nqIuXlTzvgh1AnMLD88KkLo=; b=hdUt79gQn4p3secabvyDP+ABY6MPAotzvvmmA6hkvL5i0pUZPjLrT2GxxS0Gwc8tmS4c+SsIX/Mr1CujmbXUclnfgDCgEWp79HdtdsJTnVxtepuggLWJ7oIwRjsdniELsknfl0LZP8msBLD3d7EZIEQL7OQlBJnGnykMaSGvTII= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749152961548121.02837164460232; Thu, 5 Jun 2025 12:49:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007457.1386777 (Exim 4.92) (envelope-from ) id 1uNGaG-00048F-EA; Thu, 05 Jun 2025 19:49:04 +0000 Received: by outflank-mailman (output) from mailman id 1007457.1386777; Thu, 05 Jun 2025 19:49:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGaG-000485-9Z; Thu, 05 Jun 2025 19:49:04 +0000 Received: by outflank-mailman (input) for mailman id 1007457; Thu, 05 Jun 2025 19:49:02 +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 1uNGaE-0002tD-0w for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:49:02 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2062d.outbound.protection.outlook.com [2a01:111:f403:2417::62d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 206ed3a3-4246-11f0-a300-13f23c93f187; Thu, 05 Jun 2025 21:49:01 +0200 (CEST) Received: from LV3P220CA0004.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:234::16) by MN6PR12MB8489.namprd12.prod.outlook.com (2603:10b6:208:474::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.33; Thu, 5 Jun 2025 19:48:53 +0000 Received: from BN2PEPF000055DE.namprd21.prod.outlook.com (2603:10b6:408:234:cafe::33) by LV3P220CA0004.outlook.office365.com (2603:10b6:408:234::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.31 via Frontend Transport; Thu, 5 Jun 2025 19:48:53 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DE.mail.protection.outlook.com (10.167.245.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:48:53 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:48:51 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 206ed3a3-4246-11f0-a300-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PFk/ADoRt8dP9SFysFwSwM3oEbcD50z13W2eHrQHoSBawxX1W/Wd+CFQ19gyAm/M9/UDZFUWzJLo9NSBa8UHwyHaHcIR4Wjm+Nu1x6/M8h1aCnyB5645faHfz6ucH+iefdIYO3ZzB113x4XZJwzlDiXeU/Xo0t/AVRoW4p9koidYfDQVYcJUoOC2pEBGBs2NpNFerQFqyw9A4NMhvgUfZcw2ZptP82tYOdrgEREzIKqtFhWz8dFqtuicwEpDg+NdIfL8hhd1tutwCG04Gf+fmR33PM+ASQnrICca6Ms7gjqvO6YPNjRk6xlpkMA4P9EXpIIc5d7qG2KvpJ+qsuC0sQ== 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=23cn4AM6kYMSovW9UaT7nqIuXlTzvgh1AnMLD88KkLo=; b=C+skJ8TNtwMirYYF+ypU3ui82he1TFfrn4NtiTKmTLDi4UZpbMvy6lIInSpEW+uafRDuR/k0RqaX35tmze6uET5kvMLx7WklHurh4ZGVI9JuwcP63pm1RwAJ26SGWiLzTsMc47lzaUELx9ZyWehKDiLnUFAzbuCYh93g9o/aKcH11iOOXHmWZL5BPcpi9mIB4/hGfZTMgmLMtbDAiyWHhQdJ9LMvJKRBYQYapYtYjofQF4EpRNw6ft92fDuBLgAdLg2CYdHzUmceNeYJUNyEDzDhIzhhhWMLsQDHPC47NzUXcqOsshEPU4XQPmcPlPJSVsQfRBZ9piqqZ16xa/Ih1Q== 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 (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=23cn4AM6kYMSovW9UaT7nqIuXlTzvgh1AnMLD88KkLo=; b=mgce521k67/YHPIr6X0sOa36YL0R6Mk4Em1PigbeplRXTqHYzkkXocKfCNKEjinfGoGcdPoO3KoZJKgL+aybXV0WmLv98qAJ1DJnuQmqxX7QsjxWiMP9VIka8wQJSeHSpCNaJrQ2E6RSBiv/c3Xnk/o6dv4ezcXW5YIDbimjS6g= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Andrew Cooper , Anthony PERARD , "Jan Beulich" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Daniel P. Smith" Subject: [PATCH v2 06/15] xen: Refactor kernel_info to have a header like boot_domain Date: Thu, 5 Jun 2025 21:47:58 +0200 Message-ID: <20250605194810.2782031-7-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DE:EE_|MN6PR12MB8489:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a54ed97-8e85-4b9e-787e-08dda46a008a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?gW16kUUzrY2ovJQq9PG90457oO9kqszeQ1sohVwQ/ZtkYhkTP3Mkt7nOZUCk?= =?us-ascii?Q?ZBrVikQCHsChOcjxdxaq+KuMJPRX9PxsqWN9hmh3v0xta8Jqb6AQvavO7gu+?= =?us-ascii?Q?oDE/yNir0Le3ttoL55+W/MYqez3rQa+3vBwn55I2Cviuq67kz57YxVP5tE81?= =?us-ascii?Q?TtA04Ce+G5fx5rh69aOaZ50xVwUYtU7gQDMw6rcvTtrEk0kSVIjQKCsFaZBW?= =?us-ascii?Q?KujKkV1Iu1h2eVEryu3dN7eWbqCg+KqcdwiZeBuhX8/JxXdbDe14yy4VIfgp?= =?us-ascii?Q?o5oD76YjZfk4KIBRaUvccIduTo/Bj1aT+05xmd2gZPeGwmEuQqMbSAmzGLLq?= =?us-ascii?Q?vwddWQ0VKV/YRbSXumS964f+TIDL4sUFfaSZJvxYKNtbJVIIUbfKno1dkQqT?= =?us-ascii?Q?arg7r+LKSJmJ6r89yrQZrashVmzMzf1KN53ZWArGaFrraN2XbzfeAin7O2sW?= =?us-ascii?Q?FZfcDLF6vxNLiHLdPYSVeQIseaJH75I3ASsBQ9XlzCn/U5bPs+p8Py16S0XZ?= =?us-ascii?Q?KG+BvL+Zvd0Hntn6QPLgrjDdAs0q4JilGVN3p2WAPnP1hoIPUcOPqsFF2oCc?= =?us-ascii?Q?bnxB0gDvu2g8ZeBk+a5dxna1YK3qjyFBe05DF5qavb6+AUnAtChZEHr2xIks?= =?us-ascii?Q?cfDGVpLSLtxNQ1NyHAZlOt/eZlkxjxsso8nI9fip1xOcWEL5+GbudcPchgEM?= =?us-ascii?Q?eic9UinoCcV4eBoh3t9fPDP3IvEWPAxIywe/9jj5BoNmdqEv6tiM6sa4rNzp?= =?us-ascii?Q?kH/tgdSCw5zcmRIO4YrXbI817+u2NEBr4+ndkf7P+gkTXWctHzWEx6pbWo+S?= =?us-ascii?Q?XzFicHR6osPffs4d8OK6pPUnQkFGtlpfzKXVX9I5ozXgV5SJYLqPYu5TLAVj?= =?us-ascii?Q?DGUMBojrpbfpJPm0K/9Au/85HRZjhMqFEe4MWEbC1L8jSitcfe+FAy5PR3jl?= =?us-ascii?Q?+azigVY0pPOrvgd5OEHxXbkSmkIqlI/pmKU5T/+sshBMAAKiRavnhiD9kvJL?= =?us-ascii?Q?T4ULfBWxMZE84O5zuhhlsyEBck7a9x9qdfb4sHR7aua1UAk+Q4PHX+wHE0Pi?= =?us-ascii?Q?41ju678xgKGMCIew5kI7BtKavCkZgvb9EC9f31Ms1KGfYSkUVU163MNUZcy1?= =?us-ascii?Q?rZFL4RA6OEXWLmuZ/8REzBdsmt4CCOXOJnWZhm/LDNDZOXmLgKgWn3BmdQuV?= =?us-ascii?Q?vYhrbgKKaITlYL3ZDaNzYKWWzKNZ/KRvOkKwsH7RQp5YiCUx8jltetg8Xdhx?= =?us-ascii?Q?BTU3Tdm6B3XKBHirEkJB08f1XgyMzK/aBaPM0I8MteUCWsNMGS208C3Gbd90?= =?us-ascii?Q?tfStptflfc/lq/ShFomuOiyGMMI/gf8GgbfINjgECDC0NOi8lWieQGbJ+VPV?= =?us-ascii?Q?e0DtWEwlEmNJudoB7eEgJV3133JI8i4ZS0snjcgBb9ddLYwIcs9g5M+nnlWJ?= =?us-ascii?Q?3umef+X9j0/owh/Bnn+U0d2Dl6cz4yEJjGwMs2lZPUWElOlGfXN3P7C+o8bR?= =?us-ascii?Q?BQKTTdlGZXtVhrWefBA3KBOBdO1d+h94gD75?= 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:(13230040)(36860700013)(82310400026)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:48:53.8628 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a54ed97-8e85-4b9e-787e-08dda46a008a 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: BN2PEPF000055DE.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8489 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749152963090116600 Content-Type: text/plain; charset="utf-8" Create a struct header with the contents common to kernel_info and boot_domain, and define that header in common code. This enables x86 to use that header as-is. Not a functional change. Signed-off-by: Alejandro Vallejo --- v2: * New patch --- xen/arch/arm/dom0less-build.c | 8 ++++---- xen/arch/arm/domain_build.c | 20 ++++++++++---------- xen/arch/arm/kernel.c | 8 ++++---- xen/common/device-tree/dom0less-build.c | 18 +++++++++--------- xen/common/device-tree/domain-build.c | 20 ++++++++++---------- xen/common/device-tree/kernel.c | 20 ++++++++++---------- xen/include/xen/bootfdt.h | 10 ++++++++++ xen/include/xen/fdt-kernel.h | 5 ++--- 8 files changed, 59 insertions(+), 50 deletions(-) diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c index 20aabf6be5..a335551484 100644 --- a/xen/arch/arm/dom0less-build.c +++ b/xen/arch/arm/dom0less-build.c @@ -32,7 +32,7 @@ static int __init make_gicv2_domU_node(struct kernel_info= *kinfo) int res =3D 0; __be32 reg[(GUEST_ROOT_ADDRESS_CELLS + GUEST_ROOT_SIZE_CELLS) * 2]; __be32 *cells; - const struct domain *d =3D kinfo->d; + const struct domain *d =3D kinfo->hdr.d; =20 res =3D domain_fdt_begin_node(fdt, "interrupt-controller", vgic_dist_base(&d->arch.vgic)); @@ -85,7 +85,7 @@ static int __init make_gicv3_domU_node(struct kernel_info= *kinfo) void *fdt =3D kinfo->fdt; int res =3D 0; __be32 *reg, *cells; - const struct domain *d =3D kinfo->d; + const struct domain *d =3D kinfo->hdr.d; unsigned int i, len =3D 0; =20 res =3D domain_fdt_begin_node(fdt, "interrupt-controller", @@ -152,7 +152,7 @@ static int __init make_gicv3_domU_node(struct kernel_in= fo *kinfo) =20 int __init make_intc_domU_node(struct kernel_info *kinfo) { - switch ( kinfo->d->arch.vgic.version ) + switch ( kinfo->hdr.d->arch.vgic.version ) { #ifdef CONFIG_GICV3 case GIC_V3: @@ -175,7 +175,7 @@ static int __init make_vpl011_uart_node(struct kernel_i= nfo *kinfo) gic_interrupt_t intr; __be32 reg[GUEST_ROOT_ADDRESS_CELLS + GUEST_ROOT_SIZE_CELLS]; __be32 *cells; - struct domain *d =3D kinfo->d; + struct domain *d =3D kinfo->hdr.d; =20 res =3D domain_fdt_begin_node(fdt, "sbsa-uart", d->arch.vpl011.base_ad= dr); if ( res ) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 590f38e520..5317665555 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -464,8 +464,8 @@ static int __init write_properties(struct domain *d, st= ruct kernel_info *kinfo, int had_dom0_bootargs =3D 0; struct dt_device_node *iommu_node; =20 - if ( kinfo->cmdline && kinfo->cmdline[0] ) - bootargs =3D &kinfo->cmdline[0]; + if ( kinfo->hdr.cmdline && kinfo->hdr.cmdline[0] ) + bootargs =3D &kinfo->hdr.cmdline[0]; =20 /* * We always skip the IOMMU device when creating DT for hwdom if there= is @@ -579,7 +579,7 @@ static int __init write_properties(struct domain *d, st= ruct kernel_info *kinfo, =20 if ( dt_node_path_is_equal(node, "/chosen") ) { - const struct bootmodule *initrd =3D kinfo->initrd_bootmodule; + const struct bootmodule *initrd =3D kinfo->hdr.initrd; =20 if ( bootargs ) { @@ -1386,7 +1386,7 @@ int __init make_timer_node(const struct kernel_info *= kinfo) if ( res ) return res; =20 - if ( !is_64bit_domain(kinfo->d) ) + if ( !is_64bit_domain(kinfo->hdr.d) ) res =3D fdt_property_string(fdt, "compatible", "arm,armv7-timer"); else res =3D fdt_property_string(fdt, "compatible", "arm,armv8-timer"); @@ -1398,7 +1398,7 @@ int __init make_timer_node(const struct kernel_info *= kinfo) * It always exposes an active-low level-sensitive interrupt. */ =20 - if ( is_hardware_domain(kinfo->d) ) + if ( is_hardware_domain(kinfo->hdr.d) ) { irq[TIMER_PHYS_SECURE_PPI] =3D timer_get_irq(TIMER_PHYS_SECURE_PPI= ); irq[TIMER_PHYS_NONSECURE_PPI] =3D @@ -1447,7 +1447,7 @@ int __init make_chosen_node(const struct kernel_info = *kinfo) { int res; const char *bootargs =3D NULL; - const struct bootmodule *initrd =3D kinfo->initrd_bootmodule; + const struct bootmodule *initrd =3D kinfo->hdr.initrd; void *fdt =3D kinfo->fdt; =20 dt_dprintk("Create chosen node\n"); @@ -1455,9 +1455,9 @@ int __init make_chosen_node(const struct kernel_info = *kinfo) if ( res ) return res; =20 - if ( kinfo->cmdline && kinfo->cmdline[0] ) + if ( kinfo->hdr.cmdline && kinfo->hdr.cmdline[0] ) { - bootargs =3D &kinfo->cmdline[0]; + bootargs =3D &kinfo->hdr.cmdline[0]; res =3D fdt_property(fdt, "bootargs", bootargs, strlen(bootargs) += 1); if ( res ) return res; @@ -1906,7 +1906,7 @@ static int __init construct_dom0(struct domain *d) d->max_pages =3D dom0_mem >> PAGE_SHIFT; =20 kinfo.unassigned_mem =3D dom0_mem; - kinfo.d =3D d; + kinfo.hdr.d =3D d; =20 rc =3D kernel_probe(&kinfo, NULL); if ( rc < 0 ) @@ -1918,7 +1918,7 @@ static int __init construct_dom0(struct domain *d) int __init construct_hwdom(struct kernel_info *kinfo, const struct dt_device_node *node) { - struct domain *d =3D kinfo->d; + struct domain *d =3D kinfo->hdr.d; int rc; =20 iommu_hwdom_init(d); diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c index cb1efb19e7..0561d60d5a 100644 --- a/xen/arch/arm/kernel.c +++ b/xen/arch/arm/kernel.c @@ -46,7 +46,7 @@ static void __init place_modules(struct kernel_info *info, paddr_t kernbase, paddr_t kernend) { /* Align DTB and initrd size to 2Mb. Linux only requires 4 byte alignm= ent */ - const struct bootmodule *mod =3D info->initrd_bootmodule; + const struct bootmodule *mod =3D info->hdr.initrd; const struct membanks *mem =3D kernel_info_get_mem(info); const paddr_t initrd_len =3D ROUNDUP(mod ? mod->size : 0, MB(2)); const paddr_t dtb_len =3D ROUNDUP(fdt_totalsize(info->fdt), MB(2)); @@ -152,12 +152,12 @@ static void __init kernel_zimage_load(struct kernel_i= nfo *info) =20 kernel =3D ioremap_wc(paddr, len); if ( !kernel ) - panic("Unable to map the %pd kernel\n", info->d); + panic("Unable to map the %pd kernel\n", info->hdr.d); =20 - rc =3D copy_to_guest_phys_flush_dcache(info->d, load_addr, + rc =3D copy_to_guest_phys_flush_dcache(info->hdr.d, load_addr, kernel, len); if ( rc !=3D 0 ) - panic("Unable to copy the kernel in the %pd memory\n", info->d); + panic("Unable to copy the kernel in the %pd memory\n", info->hdr.d= ); =20 iounmap(kernel); } diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tr= ee/dom0less-build.c index d5bb1d5d35..809cb3c232 100644 --- a/xen/common/device-tree/dom0less-build.c +++ b/xen/common/device-tree/dom0less-build.c @@ -168,18 +168,18 @@ static int __init handle_passthrough_prop(struct kern= el_info *kinfo, return -EINVAL; } =20 - res =3D iomem_permit_access(kinfo->d, paddr_to_pfn(mstart), + res =3D iomem_permit_access(kinfo->hdr.d, paddr_to_pfn(mstart), paddr_to_pfn(PAGE_ALIGN(mstart + size - = 1))); if ( res ) { printk(XENLOG_ERR "Unable to permit to dom%d access to" " 0x%"PRIpaddr" - 0x%"PRIpaddr"\n", - kinfo->d->domain_id, + kinfo->hdr.d->domain_id, mstart & PAGE_MASK, PAGE_ALIGN(mstart + size) - 1); return res; } =20 - res =3D map_regions_p2mt(kinfo->d, + res =3D map_regions_p2mt(kinfo->hdr.d, gaddr_to_gfn(gstart), PFN_DOWN(size), maddr_to_mfn(mstart), @@ -218,7 +218,7 @@ static int __init handle_passthrough_prop(struct kernel= _info *kinfo, return -EINVAL; } =20 - res =3D map_device_irqs_to_domain(kinfo->d, node, true, NULL); + res =3D map_device_irqs_to_domain(kinfo->hdr.d, node, true, NULL); if ( res < 0 ) return res; =20 @@ -230,7 +230,7 @@ static int __init handle_passthrough_prop(struct kernel= _info *kinfo, if ( xen_force && !dt_device_is_protected(node) ) return 0; =20 - return iommu_assign_dt_device(kinfo->d, node); + return iommu_assign_dt_device(kinfo->hdr.d, node); } =20 static int __init handle_prop_pfdt(struct kernel_info *kinfo, @@ -297,14 +297,14 @@ static int __init handle_prop_pfdt(struct kernel_info= *kinfo, address_cells, size_cells); if ( res < 0 ) { - printk(XENLOG_ERR "Failed to assign device to %pd\n", kinfo->d= ); + printk(XENLOG_ERR "Failed to assign device to %pd\n", kinfo->h= dr.d); return res; } } else if ( (xen_path && !xen_reg) || (xen_reg && !xen_path && !xen_forc= e) ) { printk(XENLOG_ERR "xen,reg or xen,path missing for %pd\n", - kinfo->d); + kinfo->hdr.d); return -EINVAL; } =20 @@ -607,7 +607,7 @@ static int __init alloc_xenstore_page(struct domain *d) =20 static int __init alloc_xenstore_params(struct kernel_info *kinfo) { - struct domain *d =3D kinfo->d; + struct domain *d =3D kinfo->hdr.d; int rc =3D 0; =20 #ifdef CONFIG_HVM @@ -775,7 +775,7 @@ static int __init construct_domU(struct domain *d, =20 d->max_pages =3D ((paddr_t)mem * SZ_1K) >> PAGE_SHIFT; =20 - kinfo.d =3D d; + kinfo.hdr.d =3D d; =20 rc =3D kernel_probe(&kinfo, node); if ( rc < 0 ) diff --git a/xen/common/device-tree/domain-build.c b/xen/common/device-tree= /domain-build.c index 6b8b8d7cac..e602cb91c9 100644 --- a/xen/common/device-tree/domain-build.c +++ b/xen/common/device-tree/domain-build.c @@ -76,7 +76,7 @@ bool __init allocate_bank_memory(struct kernel_info *kinf= o, gfn_t sgfn, paddr_t tot_size) { struct membanks *mem =3D kernel_info_get_mem(kinfo); - struct domain *d =3D kinfo->d; + struct domain *d =3D kinfo->hdr.d; struct membank *bank; =20 /* @@ -170,7 +170,7 @@ int __init find_unallocated_memory(const struct kernel_= info *kinfo, unsigned int i, j; int res; =20 - ASSERT(domain_use_host_layout(kinfo->d)); + ASSERT(domain_use_host_layout(kinfo->hdr.d)); =20 unalloc_mem =3D rangeset_new(NULL, NULL, 0); if ( !unalloc_mem ) @@ -331,23 +331,23 @@ void __init dtb_load(struct kernel_info *kinfo, unsigned long left; =20 printk("Loading %pd DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n", - kinfo->d, kinfo->dtb_paddr, + kinfo->hdr.d, kinfo->dtb_paddr, kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt)); =20 - left =3D copy_to_guest(kinfo->d, kinfo->dtb_paddr, + left =3D copy_to_guest(kinfo->hdr.d, kinfo->dtb_paddr, kinfo->fdt, fdt_totalsize(kinfo->fdt)); =20 if ( left !=3D 0 ) panic("Unable to copy the DTB to %pd memory (left =3D %lu bytes)\n= ", - kinfo->d, left); + kinfo->hdr.d, left); xfree(kinfo->fdt); } =20 void __init initrd_load(struct kernel_info *kinfo, copy_to_guest_phys_cb copy_to_guest) { - const struct bootmodule *mod =3D kinfo->initrd_bootmodule; + const struct bootmodule *mod =3D kinfo->hdr.initrd; paddr_t load_addr =3D kinfo->initrd_paddr; paddr_t paddr, len; int node; @@ -363,7 +363,7 @@ void __init initrd_load(struct kernel_info *kinfo, len =3D mod->size; =20 printk("Loading %pd initrd from %"PRIpaddr" to 0x%"PRIpaddr"-0x%"PRIpa= ddr"\n", - kinfo->d, paddr, load_addr, load_addr + len); + kinfo->hdr.d, paddr, load_addr, load_addr + len); =20 /* Fix up linux,initrd-start and linux,initrd-end in /chosen */ node =3D fdt_path_offset(kinfo->fdt, "/chosen"); @@ -386,12 +386,12 @@ void __init initrd_load(struct kernel_info *kinfo, =20 initrd =3D ioremap_wc(paddr, len); if ( !initrd ) - panic("Unable to map the %pd initrd\n", kinfo->d); + panic("Unable to map the %pd initrd\n", kinfo->hdr.d); =20 - res =3D copy_to_guest(kinfo->d, load_addr, + res =3D copy_to_guest(kinfo->hdr.d, load_addr, initrd, len); if ( res !=3D 0 ) - panic("Unable to copy the initrd in the %pd memory\n", kinfo->d); + panic("Unable to copy the initrd in the %pd memory\n", kinfo->hdr.= d); =20 iounmap(initrd); } diff --git a/xen/common/device-tree/kernel.c b/xen/common/device-tree/kerne= l.c index cb04cd9d50..3960f951f7 100644 --- a/xen/common/device-tree/kernel.c +++ b/xen/common/device-tree/kernel.c @@ -136,16 +136,16 @@ int __init kernel_probe(struct kernel_info *info, /* domain is NULL only for the hardware domain */ if ( domain =3D=3D NULL ) { - ASSERT(is_hardware_domain(info->d)); + ASSERT(is_hardware_domain(info->hdr.d)); =20 mod =3D boot_module_find_by_kind(BOOTMOD_KERNEL); =20 - info->kernel_bootmodule =3D mod; - info->initrd_bootmodule =3D boot_module_find_by_kind(BOOTMOD_RAMDI= SK); + info->hdr.kernel =3D mod; + info->hdr.initrd =3D boot_module_find_by_kind(BOOTMOD_RAMDISK); =20 cmd =3D boot_cmdline_find_by_kind(BOOTMOD_KERNEL); if ( cmd ) - info->cmdline =3D &cmd->cmdline[0]; + info->hdr.cmdline =3D &cmd->cmdline[0]; } else { @@ -162,7 +162,7 @@ int __init kernel_probe(struct kernel_info *info, dt_get_range(&val, node, &kernel_addr, &size); mod =3D boot_module_find_by_addr_and_kind( BOOTMOD_KERNEL, kernel_addr); - info->kernel_bootmodule =3D mod; + info->hdr.kernel =3D mod; } else if ( dt_device_is_compatible(node, "multiboot,ramdisk") ) { @@ -171,7 +171,7 @@ int __init kernel_probe(struct kernel_info *info, =20 val =3D dt_get_property(node, "reg", &len); dt_get_range(&val, node, &initrd_addr, &size); - info->initrd_bootmodule =3D boot_module_find_by_addr_and_k= ind( + info->hdr.initrd =3D boot_module_find_by_addr_and_kind( BOOTMOD_RAMDISK, initrd_addr); } else if ( dt_device_is_compatible(node, "multiboot,device-tree= ") ) @@ -192,7 +192,7 @@ int __init kernel_probe(struct kernel_info *info, name =3D dt_node_name(domain); cmd =3D boot_cmdline_find_by_name(name); if ( cmd ) - info->cmdline =3D &cmd->cmdline[0]; + info->hdr.cmdline =3D &cmd->cmdline[0]; } if ( !mod || !mod->size ) { @@ -201,10 +201,10 @@ int __init kernel_probe(struct kernel_info *info, } =20 printk("Loading %pd kernel from boot module @ %"PRIpaddr"\n", - info->d, info->kernel_bootmodule->start); - if ( info->initrd_bootmodule ) + info->hdr.d, info->hdr.kernel->start); + if ( info->hdr.initrd ) printk("Loading ramdisk from boot module @ %"PRIpaddr"\n", - info->initrd_bootmodule->start); + info->hdr.initrd->start); =20 /* * uImage isn't really used nowadays thereby leave kernel_uimage_probe= () diff --git a/xen/include/xen/bootfdt.h b/xen/include/xen/bootfdt.h index 4cab5d5202..e6d52a599f 100644 --- a/xen/include/xen/bootfdt.h +++ b/xen/include/xen/bootfdt.h @@ -100,6 +100,16 @@ struct shared_meminfo { struct shmem_membank_extra extra[NR_SHMEM_BANKS]; }; =20 + +struct bootdomain { + struct domain *d; + + struct bootmodule *kernel; + struct bootmodule *initrd; + + const char* cmdline; +}; + /* * The domU flag is set for kernels and ramdisks of "xen,domain" nodes. * The purpose of the domU flag is to avoid getting confused in diff --git a/xen/include/xen/fdt-kernel.h b/xen/include/xen/fdt-kernel.h index 1939c3ebf7..dd009f01d0 100644 --- a/xen/include/xen/fdt-kernel.h +++ b/xen/include/xen/fdt-kernel.h @@ -16,7 +16,7 @@ #endif =20 struct kernel_info { - struct domain *d; + struct bootdomain hdr; =20 void *fdt; /* flat device tree */ paddr_t unassigned_mem; /* RAM not (yet) assigned to a bank */ @@ -34,8 +34,7 @@ struct kernel_info { paddr_t gnttab_size; =20 /* boot blob load addresses */ - const struct bootmodule *kernel_bootmodule, *initrd_bootmodule, *dtb_b= ootmodule; - const char* cmdline; + const struct bootmodule *dtb_bootmodule; paddr_t dtb_paddr; paddr_t initrd_paddr; =20 --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749152965; cv=pass; d=zohomail.com; s=zohoarc; b=ZSkWzkDncwty5jjcc8u7pgT9ZixoUfVuq411JeQnJnKtPy4EWUrMYpsbTrHntv8fHClwdKN9mk1a/hxvn+MhvoiEbJKACLvmGQmJsiKJ3d9pZcOcTjf7tzyFvy0jUF71fglokluksExNo+3OphefgMxEy2iVU622vJQcK41IN/E= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749152965; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SrlalRNV1guuVey9xud5aOv5ovVuWNN63mokafP5a1A=; b=Fc6qxnV4LvHylRNkjWeCxRI75ohyvrZ1TVTPncyzJqy25szvgigBmSipPGb94cW2aQHt52Lgaw6EH+67NG990wYHgMYRBxmI2uWlQb02vDCbFQQ59P2aCkCXG+0Y1Y/6I8wYYXByxWN6zsoAe9F1AeuOXmwSjn14eQvKihWDHOE= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749152965753497.53966432371715; Thu, 5 Jun 2025 12:49:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007461.1386795 (Exim 4.92) (envelope-from ) id 1uNGaI-0004Zk-82; Thu, 05 Jun 2025 19:49:06 +0000 Received: by outflank-mailman (output) from mailman id 1007461.1386795; Thu, 05 Jun 2025 19:49:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGaI-0004Yd-2g; Thu, 05 Jun 2025 19:49:06 +0000 Received: by outflank-mailman (input) for mailman id 1007461; Thu, 05 Jun 2025 19:49:04 +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 1uNGaG-0002fZ-F9 for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:49:04 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20608.outbound.protection.outlook.com [2a01:111:f403:2416::608]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2091667a-4246-11f0-b894-0df219b8e170; Thu, 05 Jun 2025 21:49:02 +0200 (CEST) Received: from BN9PR03CA0349.namprd03.prod.outlook.com (2603:10b6:408:f6::24) by SA0PR12MB4384.namprd12.prod.outlook.com (2603:10b6:806:9f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Thu, 5 Jun 2025 19:48:56 +0000 Received: from BN2PEPF000055DA.namprd21.prod.outlook.com (2603:10b6:408:f6:cafe::ce) by BN9PR03CA0349.outlook.office365.com (2603:10b6:408:f6::24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.27 via Frontend Transport; Thu, 5 Jun 2025 19:48:56 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DA.mail.protection.outlook.com (10.167.245.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:48:55 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:48:53 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2091667a-4246-11f0-b894-0df219b8e170 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rm7lLfsnHQ6j4Z8m+IlsPwOkvG6nj+0Ifxg/ZBuDkVpxeflVYHB8YAVGpvGRIGb3WvXWiz4OdrT2js4x+yq0vZeKcqaMRk4C4aJc7dFdMlXdBoN+xlemewpNw5YJS3oGW7p/LwCZEgpLg/FYKhj+etVLH+Puvppgj6lVJGoopUmtNszNvl6dQofqLN/Gjs8R5ChimFl5OfixfdRagqBZvyYOkGsgxBwKXgJkoR9weOKwGnSEM6DDDsR84Vdi9LonvPoqbdMsoa31Ajj+691enTG5FJ7RYcxIDikdcL06YGf55rRVB0KwPeC1IBAj1JiTWMDU0NjJYSOunYcz+WOY7Q== 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=SrlalRNV1guuVey9xud5aOv5ovVuWNN63mokafP5a1A=; b=ANMYrHgq6JtUQmR0CarAC30s1vMmecjogYazCMRRdCw9QpR9joTTUJ/DslgGK/QcWr51qKpenDr8btzVY/fm/ZevoGBPsMbqwIj07gu8fG0oIWmteciS2FV7HNLxSaRWCvJ23ugg+cb8lumoCXvcvachIoCLrOtyxAXi5Hdua4529EBgRDgDY/9ngGWfXWe3umbsBxDLwrtUQANK1evE76t4L7hG2Y8geVzjzhA6VdK7kJD42432Tx9FkslgYPvgbVnh6+EM9uDkr2jv3IFFAroXr/teVZTh0Qf6HWWju+HszZ6ebTxaJnLjJ87VstgORj5aByi9yRWCTVSiohYIHw== 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 (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=SrlalRNV1guuVey9xud5aOv5ovVuWNN63mokafP5a1A=; b=CPMpjI6X7b5EWr68GJHmwAU8fRvu9op7JblkEchuABoqMo9Aao6EAioRh7JbjcJHqMXnBVZ8IWDvOTPmHmnE4rz9Y19+SOC7WQUC3RX7A+Doj0LHXHkB9amB/1te8y1uh+SqpvRoyPFtpF2LjXFo9LgXTrrN8FiryD4UnEPbZGg= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Stefano Stabellini" , Julien Grall , "Bertrand Marquis" , Michal Orzel , "Daniel P. Smith" Subject: [PATCH v2 07/15] x86: Replace boot_domain with bootdomain Date: Thu, 5 Jun 2025 21:47:59 +0200 Message-ID: <20250605194810.2782031-8-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DA:EE_|SA0PR12MB4384:EE_ X-MS-Office365-Filtering-Correlation-Id: 879dcbff-4227-4bff-1600-08dda46a01b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?qOmpaUKcExd5+w6X4HWUp+9wPVPclz6zxy5XYzqkVGgKRZOOJc3gNCr4Xxzq?= =?us-ascii?Q?wdxJYkqGbBBeqqxZlYJsskFzYkaQdJAaJ5OEllyMBGqHLQFEDCvZdZ9iLMek?= =?us-ascii?Q?OLGGKhwCb82mzrK1ekuxDE5gq4LST+lQDGqZG5dhpyoGOwd4Xs8eYK25UZEF?= =?us-ascii?Q?Dy5D7nMIy/b4SPlT3ykphCUdGefu98GQN0f41Ru2jFkitZGz7qjPXZcHXl/o?= =?us-ascii?Q?gqCe5uVZ3uGFFPru03XfhI4IdAbvtrMBZxmk6LO0ufmTF6QdPEfjpl0d4OL8?= =?us-ascii?Q?6d8UUo6UbwSaORnd5Hh/6YFRyg01yCJO1zidbn3AyH98/z9ri4OJkCYig1cu?= =?us-ascii?Q?xTQC209xHUcUh2s7Ud0i9Rf0nPQtTF3EMqQQTp6PZEraKzy84EFRlA3FcVsQ?= =?us-ascii?Q?4PRoHMMo2zbMGEIqr3vLmPp6jNnmpW1N5EAqVIlfxvP0nd1R1OxcDBjCxy0c?= =?us-ascii?Q?j4YpBmDfsFoOoJScxLYgVKaHnJKsUt/lHmhvcZhc+OfBtqPjEUMnWcO0Ltmi?= =?us-ascii?Q?BXnbcvxSSAHMWn5ruGCR3cnVvsXzK9Kim2UlgM1xTYap7M54zh3H7Th9iO2y?= =?us-ascii?Q?aOvlk3t08+HOL6D9zfHVmBP6s8j+sFf5rV2zzjTQIcfJK7vjQ8J2uvZj6jyx?= =?us-ascii?Q?zvAA517EJazA2aU6AsGWDdeLhDpCwF6VjNgogMCvEzA7K36whk6AuR/ujHXJ?= =?us-ascii?Q?AJlRpYe2cesk+b9S+nWGA2/lq846vwxRP2brURtE5bKAOoiDSfnN/gR9G8hq?= =?us-ascii?Q?nEOb4NOc7Vk1QEf8YifFnzFPrEMJ4RUhtCGW3rhC2Uukx1zdWeBITEVLvi8G?= =?us-ascii?Q?HxR1EUhEjCdQXrVGK1AGliJG1Uk9eDIQbrx+Vz6l3vQR9/pzBozTdRt4Fx3U?= =?us-ascii?Q?3NJRJ1BPrAuYqUDA7j+QTraZHXUew6PqsHCQY2Zgi1v8ylcDxi44g6iiHLqw?= =?us-ascii?Q?xwnboUrL0mpRVxTilTQ+T697kJMzLq+r5hmIuMov9XGkilaNwDfNbAdWt8kc?= =?us-ascii?Q?kYp9sOeTe1vPiydGmRJEnLK0A7Qxvv05e+TI7Bak3wnOKS9oR8LAwqKrbGjU?= =?us-ascii?Q?ROyB+nUnNmaRbjwc8MNEZ+OJsQKYijHeIBIQbhwweXu8Y4xe5PUpX0ypXQcM?= =?us-ascii?Q?jiznMtxeCUeSC4myiSZ6z0UfOMcgo3pnsyI14xBFPGDAzK0iaHXGDa6HeTMa?= =?us-ascii?Q?Up0KGK33Ua+cWVNsM/yW5wqlJjCKtuIJuMBoJka3xUsMa6DXzGYlgJERrw57?= =?us-ascii?Q?obMZ3cX7xi0ixKEdlHKrwOk+vHBKpREq8/Mt+TsJaPQhPyn0up4KSySy3I6B?= =?us-ascii?Q?ofTvl/bRdjtMTfBJXmDJcZ1DiXf6G7LgTNKsvd/ZV0UcNK/qnCRFBJdVa/wr?= =?us-ascii?Q?yJ2Zk6wxx3+Gd4pZY/OOrDvBAarlHpg8fcQ13Bnf3llAj67c99nRglAM/unM?= =?us-ascii?Q?udxTeJlgBahc48DQ0OC2pNjcmV5eLcY7bz3NC8cEtpPFbLa8M7fuumbJhqEs?= =?us-ascii?Q?/kyn5jsZFk0qggiQF8Qfo2hTYpmY/ZXp1g2V?= 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:(13230040)(36860700013)(82310400026)(1800799024)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:48:55.8461 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 879dcbff-4227-4bff-1600-08dda46a01b9 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: BN2PEPF000055DA.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4384 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749152966954116600 Content-Type: text/plain; charset="utf-8" No functional change intended. Signed-off-by: Alejandro Vallejo --- v2: * Replaces the previous patch in which kernel_info replaced boot_domain --- xen/arch/x86/dom0_build.c | 2 +- xen/arch/x86/hvm/dom0_build.c | 6 ++--- xen/arch/x86/include/asm/boot-domain.h | 33 -------------------------- xen/arch/x86/include/asm/bootfdt.h | 7 ++++++ xen/arch/x86/include/asm/bootinfo.h | 3 +-- xen/arch/x86/include/asm/dom0_build.h | 6 ++--- xen/arch/x86/include/asm/setup.h | 4 ++-- xen/arch/x86/pv/dom0_build.c | 6 ++--- xen/arch/x86/setup.c | 16 +++++++------ xen/include/xen/bootfdt.h | 4 ++++ 10 files changed, 33 insertions(+), 54 deletions(-) delete mode 100644 xen/arch/x86/include/asm/boot-domain.h diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index 0b467fd4a4..1c8c5140a3 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -615,7 +615,7 @@ int __init dom0_setup_permissions(struct domain *d) return rc; } =20 -int __init construct_dom0(const struct boot_domain *bd) +int __init construct_dom0(const struct bootdomain *bd) { int rc; const struct domain *d =3D bd->d; diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index 96410344a8..85c000b259 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -644,11 +644,11 @@ static bool __init check_and_adjust_load_address( } =20 static int __init pvh_load_kernel( - const struct boot_domain *bd, paddr_t *entry, paddr_t *start_info_addr) + const struct bootdomain *bd, paddr_t *entry, paddr_t *start_info_addr) { struct domain *d =3D bd->d; struct bootmodule *image =3D bd->kernel; - struct bootmodule *initrd =3D bd->module; + struct bootmodule *initrd =3D bd->initrd; void *image_base =3D bootstrap_map_bm(image); void *image_start =3D image_base + image->arch.headroom; unsigned long image_len =3D image->size; @@ -1329,7 +1329,7 @@ static void __hwdom_init pvh_setup_mmcfg(struct domai= n *d) } } =20 -int __init dom0_construct_pvh(const struct boot_domain *bd) +int __init dom0_construct_pvh(const struct bootdomain *bd) { paddr_t entry, start_info; struct domain *d =3D bd->d; diff --git a/xen/arch/x86/include/asm/boot-domain.h b/xen/arch/x86/include/= asm/boot-domain.h deleted file mode 100644 index 242e9c9c2b..0000000000 --- a/xen/arch/x86/include/asm/boot-domain.h +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright (c) 2024 Apertus Solutions, LLC - * Author: Daniel P. Smith - * Copyright (c) 2024 Christopher Clark - */ - -#ifndef __XEN_X86_BOOTDOMAIN_H__ -#define __XEN_X86_BOOTDOMAIN_H__ - -#include - -struct boot_domain { - domid_t domid; - - struct bootmodule *kernel; - struct bootmodule *module; - const char *cmdline; - - struct domain *d; -}; - -#endif - -/* - * Local variables: - * mode: C - * c-file-style: "BSD" - * c-basic-offset: 4 - * tab-width: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/xen/arch/x86/include/asm/bootfdt.h b/xen/arch/x86/include/asm/= bootfdt.h index 2fc705a1cd..b30132381e 100644 --- a/xen/arch/x86/include/asm/bootfdt.h +++ b/xen/arch/x86/include/asm/bootfdt.h @@ -4,6 +4,13 @@ =20 #include =20 +#include + +struct arch_bootdomain +{ + domid_t domid; +}; + struct arch_bootmodule { /* diff --git a/xen/arch/x86/include/asm/bootinfo.h b/xen/arch/x86/include/asm= /bootinfo.h index f3210b7d6a..b8280ba357 100644 --- a/xen/arch/x86/include/asm/bootinfo.h +++ b/xen/arch/x86/include/asm/bootinfo.h @@ -12,7 +12,6 @@ #include #include #include -#include =20 /* Max number of boot modules a bootloader can provide in addition to Xen = */ #define MAX_NR_BOOTMODS 63 @@ -34,7 +33,7 @@ struct boot_info { =20 unsigned int nr_modules; struct bootmodule mods[MAX_NR_BOOTMODS + 1]; - struct boot_domain domains[MAX_NR_BOOTDOMS]; + struct bootdomain domains[MAX_NR_BOOTDOMS]; }; =20 /* diff --git a/xen/arch/x86/include/asm/dom0_build.h b/xen/arch/x86/include/a= sm/dom0_build.h index ff021c24af..df03189870 100644 --- a/xen/arch/x86/include/asm/dom0_build.h +++ b/xen/arch/x86/include/asm/dom0_build.h @@ -13,9 +13,9 @@ unsigned long dom0_compute_nr_pages(struct domain *d, unsigned long initrd_len); int dom0_setup_permissions(struct domain *d); =20 -struct boot_domain; -int dom0_construct_pv(const struct boot_domain *bd); -int dom0_construct_pvh(const struct boot_domain *bd); +struct bootdomain; +int dom0_construct_pv(const struct bootdomain *bd); +int dom0_construct_pvh(const struct bootdomain *bd); =20 unsigned long dom0_paging_pages(const struct domain *d, unsigned long nr_pages); diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/se= tup.h index c7deaba109..a8647f0fdf 100644 --- a/xen/arch/x86/include/asm/setup.h +++ b/xen/arch/x86/include/asm/setup.h @@ -26,8 +26,8 @@ void subarch_init_memory(void); =20 void init_IRQ(void); =20 -struct boot_domain; -int construct_dom0(const struct boot_domain *bd); +struct bootdomain; +int construct_dom0(const struct bootdomain *bd); =20 void setup_io_bitmap(struct domain *d); =20 diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index e6c77413f5..a6f212fe0a 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -355,7 +355,7 @@ static struct page_info * __init alloc_chunk(struct dom= ain *d, return page; } =20 -static int __init dom0_construct(const struct boot_domain *bd) +static int __init dom0_construct(const struct bootdomain *bd) { unsigned int i; int rc, order, machine; @@ -375,7 +375,7 @@ static int __init dom0_construct(const struct boot_doma= in *bd) struct vcpu *v =3D d->vcpu[0]; =20 struct bootmodule *image =3D bd->kernel; - struct bootmodule *initrd =3D bd->module; + struct bootmodule *initrd =3D bd->initrd; void *image_base; unsigned long image_len; void *image_start; @@ -1070,7 +1070,7 @@ out: return rc; } =20 -int __init dom0_construct_pv(const struct boot_domain *bd) +int __init dom0_construct_pv(const struct bootdomain *bd) { unsigned long cr4 =3D read_cr4(); int rc; diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index e9a70c2c2b..726adad0e5 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -297,7 +297,9 @@ static const char *cmdline_cook(const char *p, const ch= ar *loader_name); struct boot_info __initdata xen_boot_info =3D { .loader =3D "unknown", .cmdline =3D "", - .domains =3D { [0 ... MAX_NR_BOOTDOMS - 1] =3D { .domid =3D DOMID_INVA= LID } }, + .domains =3D { [0 ... MAX_NR_BOOTDOMS - 1] =3D { + .arch.domid =3D DOMID_INVALID + }}, /* * There's a MAX_NR_BOOTMODS-th entry in the array. It's not off by on= e. * @@ -987,7 +989,7 @@ static unsigned int __init copy_bios_e820(struct e820en= try *map, unsigned int li } =20 static size_t __init domain_cmdline_size(const struct boot_info *bi, - const struct boot_domain *bd) + const struct bootdomain *bd) { size_t s =3D bi->kextra ? strlen(bi->kextra) : 0; const struct arch_bootmodule *abm =3D &bd->kernel->arch; @@ -1022,7 +1024,7 @@ static struct domain *__init create_dom0(struct boot_= info *bi) .misc_flags =3D opt_dom0_msr_relaxed ? XEN_X86_MSR_RELAXED : 0, }, }; - struct boot_domain *bd =3D &bi->domains[0]; + struct bootdomain *bd =3D &bi->domains[0]; struct domain *d; =20 if ( opt_dom0_pvh ) @@ -1039,11 +1041,11 @@ static struct domain *__init create_dom0(struct boo= t_info *bi) dom0_cfg.flags |=3D XEN_DOMCTL_CDF_iommu; =20 /* Create initial domain. Not d0 for pvshim. */ - bd->domid =3D get_initial_domain_id(); - d =3D domain_create(bd->domid, &dom0_cfg, + bd->arch.domid =3D get_initial_domain_id(); + d =3D domain_create(bd->arch.domid, &dom0_cfg, pv_shim ? 0 : CDF_privileged | CDF_hardware); if ( IS_ERR(d) ) - panic("Error creating d%u: %ld\n", bd->domid, PTR_ERR(d)); + panic("Error creating d%u: %ld\n", bd->arch.domid, PTR_ERR(d)); =20 init_dom0_cpuid_policy(d); =20 @@ -2162,7 +2164,7 @@ void asmlinkage __init noreturn __start_xen(void) if ( initrdidx < MAX_NR_BOOTMODS ) { bi->mods[initrdidx].kind =3D BOOTMOD_RAMDISK; - bi->domains[0].module =3D &bi->mods[initrdidx]; + bi->domains[0].initrd =3D &bi->mods[initrdidx]; if ( first_boot_module_index(bi, BOOTMOD_UNKNOWN) < MAX_NR_BOOTMOD= S ) printk(XENLOG_WARNING "Multiple initrd candidates, picking module #%u\n", diff --git a/xen/include/xen/bootfdt.h b/xen/include/xen/bootfdt.h index e6d52a599f..19d2ff0f0c 100644 --- a/xen/include/xen/bootfdt.h +++ b/xen/include/xen/bootfdt.h @@ -108,6 +108,10 @@ struct bootdomain { struct bootmodule *initrd; =20 const char* cmdline; + +#if __has_include() + struct arch_bootdomain arch; +#endif }; =20 /* --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749152969; cv=pass; d=zohomail.com; s=zohoarc; b=c6Bpsm7lzSuHtIU4OzDGs4XoJRWp6M7UJXS3UWM6fmJZhhHMxja8uQGLffWeAkNtTsHplXJeAPHQM/GhremqYOKsFgGo3cc8msGSrVChve0KsAhy0NSyUZLNtK4ByjpL1qA1xYVTyHQfj5fC66KUnWj9cRF9/Ifehd/cLhPeep4= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749152969; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=T8nPofpxazoCxEYwpzGMgVEbLO3KBjjKiS7lZ9jpSZU=; b=XBkfL9xh+unHW9fxQMkXnvfAI15lZGg9EizZ0I03wN/kWsDPTl3rdEt9YhcuAXYx4HsSjmOnWX96HH2v8hEIZMJpxOYhmIAf961eHm/kteZopVh5bhAQ+1bfv0JNEoRenunxE6LsR9+sXdJoZ6Bkjn41NsC/t5Iar67N+qJg9pw= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749152969392474.08628709701577; Thu, 5 Jun 2025 12:49:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007458.1386781 (Exim 4.92) (envelope-from ) id 1uNGaG-0004Co-SA; Thu, 05 Jun 2025 19:49:04 +0000 Received: by outflank-mailman (output) from mailman id 1007458.1386781; Thu, 05 Jun 2025 19:49:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGaG-0004Bf-O7; Thu, 05 Jun 2025 19:49:04 +0000 Received: by outflank-mailman (input) for mailman id 1007458; Thu, 05 Jun 2025 19:49:03 +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 1uNGaF-0002tD-13 for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:49:03 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20615.outbound.protection.outlook.com [2a01:111:f403:2412::615]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1ff139ef-4246-11f0-a300-13f23c93f187; Thu, 05 Jun 2025 21:49:01 +0200 (CEST) Received: from LV3P220CA0015.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:234::25) by LV3PR12MB9119.namprd12.prod.outlook.com (2603:10b6:408:1a2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.38; Thu, 5 Jun 2025 19:48:57 +0000 Received: from BN2PEPF000055DE.namprd21.prod.outlook.com (2603:10b6:408:234:cafe::3d) by LV3P220CA0015.outlook.office365.com (2603:10b6:408:234::25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.35 via Frontend Transport; Thu, 5 Jun 2025 19:48:57 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DE.mail.protection.outlook.com (10.167.245.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:48:57 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:48:55 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1ff139ef-4246-11f0-a300-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=J675nKOhYsqiQO5Kkemo03/UTOmqxx77LGX3EBEFCLmKnC4ZnPYGEJTBniCRG8FU1hZsZarG0drUiow0W10d72MsNDgDCDmRDlbD/TdLvY9No/NOV95+YZjMYmSWltaK258c+iYtFMZly7Ez73KxXdQ7YkXBGgSWSfOOmcfqZthc7qLSWl36Q+Sub+EzBj9oWng2yEdzqnv+AMCtltcVPF3VjMs09zvWHIr9ufKrJyKgGkWmyOrrWLFu5lJC3aHZxqQbyxAIO4Aq9TPqdI6VwmowjYe6QjDbwpdIviei0R2N5d1wr2CC437Wi67sq48rsTdmal+ka4b34VGdVWl72A== 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=T8nPofpxazoCxEYwpzGMgVEbLO3KBjjKiS7lZ9jpSZU=; b=q70gIi1pYEOWQ6jd1vlwwa6a8ioz73+loBnALocqfIN405/277rEdCRKXEw1zE7+KlwqkKFBNpYIbZbNKysDMfU4URvtXDVJ9eSIs/Jv46d8NgroR7mp+v9oP4VWcr3MZSJE4Rlk/r8y43mkvkWU9Hf7ZlcJz5alO6yH0cP1t0Zbrln/VOcsWhLjlMIWKQ25Puf5arddGovlMrB0ekdxE3Bxzbbm3LayGCa6HoNozbFDNDx3FgIq3TknOXR/8x+vzDABYxdaWU6tTY1Kc/FhMvt961wmvqwdldF+KrfWX2Bz2yj/LWK9m5ZlJgTczr7sbvlAzaN46KnFbN+0cDNONw== 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 (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=T8nPofpxazoCxEYwpzGMgVEbLO3KBjjKiS7lZ9jpSZU=; b=xBjC9FTDT5yyWqiKcx58kQKbU5cVTbzihUsLm5cgJ9d7PMPXaji9J3SbimADBqU1ZRbfS8JD2dE1T+BnMAycnd7hiuIaMtw6AbmvGIi8LVpEwsVKZIrLTvWsJ5B97mIf7cSDo8PLrQ0Chpk/9IMXHulxv6o0T+1Pnc5GPKscG8o= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , "Daniel P. Smith" Subject: [PATCH v2 08/15] xen/dt: Move bootfdt functions to xen/bootfdt.h Date: Thu, 5 Jun 2025 21:48:00 +0200 Message-ID: <20250605194810.2782031-9-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DE:EE_|LV3PR12MB9119:EE_ X-MS-Office365-Filtering-Correlation-Id: 63b0f128-3582-4ff5-ac98-08dda46a02b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?xi+rJG6pTly3bY9yCINgvBFSuDZ7PqTXwyfnuWRLDB15yR1ymUtqnV6k3BCB?= =?us-ascii?Q?OgF2ID6EZuZPWwDiOogy8FOgkoa7naA1uk/Oje3uBYsBET7wvm7ZB3Q0HvsN?= =?us-ascii?Q?Zht/Z6HbCF2lc1wXRKljGNAVj+z+oyRWKeR1q2ZHHoeE6ltKQI7rB5Ug1uFi?= =?us-ascii?Q?hHvZ2g2x0LoPQBesznEy2J/iA5H3qi9/t3Impicg9dNwkVDPVsJwPc4t8Vxr?= =?us-ascii?Q?kKgZftfpGPJTDSXjnf/AHiV/lnqR7NmLBqw/iayYGb+Qv+qcM8cHtqKvE2RQ?= =?us-ascii?Q?0z7eZo8NnDB41CfaLBu1kMHylFTI45gmAIH80Ic5bYLODRtFgmhGbZ76RFv0?= =?us-ascii?Q?YGzMn5QvwiAwleu5Ld9ihSAfRTGcV+QL2/stgkJmUqo2MExOO3LglGuMi+7c?= =?us-ascii?Q?yUSr5897OoJ/ARq8kJt/XrOVjlrm2iV+VT2TZeoJOzFHTnwbqThV3ubBBosc?= =?us-ascii?Q?05DJiyGhltZrFJd507yXJ4w3ZwhCLOBRM9Hk4JNiEMHxED56vgEgkbihuLll?= =?us-ascii?Q?Q4CicGhulV+cqmW2PUWAKlMUMHYfbGxQW38NlmDgQDZusoyEc0tL8BFzBGOk?= =?us-ascii?Q?Fz+eluGFdx32VVHTbXNFrwSsSQCoJRqEvzve8njNKJQA/3Ar3EQSrJQgARKF?= =?us-ascii?Q?JPGupBW63ypLjEiQZ2SvjqjH6NGrQoLREpnMj4GEA7fvbE7vvk0tbFETFbvx?= =?us-ascii?Q?8UnTMvcyHdOiEkT8icMz4LZR3sHUlEthK3d6EC5uzU+LuScI76XxGCTUNzsM?= =?us-ascii?Q?GevsYGzDKtuRiWPlSkEiw+A9J970mhAdKmk6a3xCavMG2wZ5OE/OVq3FVv+7?= =?us-ascii?Q?0xEhlduBgZdgdoiYQmKYgk2gtrmiV5pmcLzR9k7PdwHDgSr5ZYKZIx8MkX2J?= =?us-ascii?Q?nfT6BsYer650b9ywoMKDAJ5kvkwcnMmvunVwDpHDEf9Pn5E7+t5UCrfoX3Bs?= =?us-ascii?Q?ckmNUHTRphOufuuE/Q8Xn7xvMEqs27q5eDNUDTthvHOv3eZ7x/iHTPry549P?= =?us-ascii?Q?8zGUsy4U8w5KnQPTuMRjQ70xXzBECeMrvAFwRepuITTJACF1FTe9TMZcnDz7?= =?us-ascii?Q?at7WJr3p2VC81Aq7+7WhedXXSfTIfeV1F8xlkYJKZPU5Usgz2atz7uG2qVxR?= =?us-ascii?Q?obzgdlEhyCaEqd73eG9IW71c5FtKPOP/qL3x69iOM/k7gtc28EI/+aZyrymS?= =?us-ascii?Q?pbr6F/rVBwKtqvFQlW/XXjxCxDC8jTaXR7OSZYHQZO9H/RGVQvkaqgRZqhCK?= =?us-ascii?Q?zDypRJ1kCo+xvxCgHqPykYHhBSRkwVCKEjtOZz8bNcCmTtLtATWl1nd/YZZ0?= =?us-ascii?Q?nOiuEC76Ouyob8LDDgh7cpN6eG8Z7EMXtVTIKZNBpDIUWcVirbYB63l7VV+3?= =?us-ascii?Q?3/BgzFV9IXSFUacSFvdeXZXBjavqUoAukmHnkm+wbjAH0q1IqJ8XXnUgC5Ux?= =?us-ascii?Q?Fh0FZdVq2BFUT7hleb88I4yBQn/r7s69PBUtdAVD5werqpszZ2r5MLTromV7?= =?us-ascii?Q?+AbdHT0GRCqAoGHTOJxkLB1NXh9P2vQRgSE0?= 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:(13230040)(376014)(1800799024)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:48:57.4665 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63b0f128-3582-4ff5-ac98-08dda46a02b0 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: BN2PEPF000055DE.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9119 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749152970655116600 Content-Type: text/plain; charset="utf-8" Part of an unpicking process to extract bootfdt contents independent of boo= tinfo to a separate file for x86 to take. Move functions required for early FDT parsing from device_tree.h and arm's setup.h onto bootfdt.h Declaration motion only. Not a functional change. Signed-off-by: Alejandro Vallejo --- v2: * Remove the u32 identifiers in the device_tree_get_u32() implementation * Fix an existing const-stripping case. --- xen/arch/arm/include/asm/setup.h | 6 ---- xen/common/device-tree/bootfdt.c | 8 ++--- xen/include/xen/bootfdt.h | 62 ++++++++++++++++++++++++++++++++ xen/include/xen/device_tree.h | 34 +----------------- 4 files changed, 67 insertions(+), 43 deletions(-) diff --git a/xen/arch/arm/include/asm/setup.h b/xen/arch/arm/include/asm/se= tup.h index 6cf272c160..2b58549c1a 100644 --- a/xen/arch/arm/include/asm/setup.h +++ b/xen/arch/arm/include/asm/setup.h @@ -53,12 +53,6 @@ void setup_mm(void); extern uint32_t hyp_traps_vector[]; void init_traps(void); =20 -void device_tree_get_reg(const __be32 **cell, uint32_t address_cells, - uint32_t size_cells, paddr_t *start, paddr_t *siz= e); - -u32 device_tree_get_u32(const void *fdt, int node, - const char *prop_name, u32 dflt); - int handle_device(struct domain *d, struct dt_device_node *dev, p2m_type_t= p2mt, struct rangeset *iomem_ranges, struct rangeset *irq_rang= es); =20 diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/boot= fdt.c index 9daea06e57..ab449db8d6 100644 --- a/xen/common/device-tree/bootfdt.c +++ b/xen/common/device-tree/bootfdt.c @@ -202,16 +202,16 @@ static int __init device_tree_get_meminfo(const void = *fdt, int node, return 0; } =20 -u32 __init device_tree_get_u32(const void *fdt, int node, - const char *prop_name, u32 dflt) +uint32_t __init device_tree_get_u32(const void *fdt, int node, + const char *prop_name, uint32_t dflt) { const struct fdt_property *prop; =20 prop =3D fdt_get_property(fdt, node, prop_name, NULL); - if ( !prop || prop->len < sizeof(u32) ) + if ( !prop || prop->len < sizeof(uint32_t) ) return dflt; =20 - return fdt32_to_cpu(*(uint32_t*)prop->data); + return fdt32_to_cpu(*(const uint32_t*)prop->data); } =20 /** diff --git a/xen/include/xen/bootfdt.h b/xen/include/xen/bootfdt.h index 19d2ff0f0c..1b89986e10 100644 --- a/xen/include/xen/bootfdt.h +++ b/xen/include/xen/bootfdt.h @@ -2,6 +2,7 @@ #ifndef XEN_BOOTFDT_H #define XEN_BOOTFDT_H =20 +#include #include #include #include @@ -16,8 +17,53 @@ #define NR_MEM_BANKS 256 #define NR_SHMEM_BANKS 32 =20 +/* Default #address and #size cells */ +#define DT_ROOT_NODE_ADDR_CELLS_DEFAULT 2 +#define DT_ROOT_NODE_SIZE_CELLS_DEFAULT 1 + #define MAX_MODULES 32 /* Current maximum useful modules */ =20 +#define DEVICE_TREE_MAX_DEPTH 16 + +/* Helper to read a big number; size is in cells (not bytes) */ +static inline u64 dt_read_number(const __be32 *cell, int size) +{ + u64 r =3D 0; + + while ( size-- ) + r =3D (r << 32) | be32_to_cpu(*(cell++)); + return r; +} + +static inline u64 dt_next_cell(int s, const __be32 **cellp) +{ + const __be32 *p =3D *cellp; + + *cellp =3D p + s; + return dt_read_number(p, s); +} + +typedef int (*device_tree_node_func)(const void *fdt, + int node, const char *name, int depth, + u32 address_cells, u32 size_cells, + void *data); + +/** + * device_tree_for_each_node - iterate over all device tree sub-nodes + * @fdt: flat device tree. + * @node: parent node to start the search from + * @func: function to call for each sub-node. + * @data: data to pass to @func. + * + * Any nodes nested at DEVICE_TREE_MAX_DEPTH or deeper are ignored. + * + * Returns 0 if all nodes were iterated over successfully. If @func + * returns a value different from 0, that value is returned immediately. + */ +int device_tree_for_each_node(const void *fdt, int node, + device_tree_node_func func, + void *data); + typedef enum { BOOTMOD_XEN, BOOTMOD_FDT, @@ -261,4 +307,20 @@ static inline struct membanks *membanks_xzalloc(unsign= ed int nr, return banks; } =20 +/* + * Interpret the property `prop_name` of `node` as a u32. + * + * Returns the property value on success; otherwise returns `dflt`. + */ +uint32_t device_tree_get_u32(const void *fdt, int node, + const char *prop_name, uint32_t dflt); + +/* + * Interpret the property `prop_name` of `node` as a "reg". + * + * Returns outputs in `start` and `size`. + */ +void device_tree_get_reg(const __be32 **cell, uint32_t address_cells, + uint32_t size_cells, paddr_t *start, paddr_t *siz= e); + #endif /* XEN_BOOTFDT_H */ diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 6dc1fb5159..0a22b1ba1d 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -10,6 +10,7 @@ #ifndef __XEN_DEVICE_TREE_H__ #define __XEN_DEVICE_TREE_H__ =20 +#include #include =20 #include @@ -22,8 +23,6 @@ #include #include =20 -#define DEVICE_TREE_MAX_DEPTH 16 - /* * Struct used for matching a device */ @@ -164,17 +163,8 @@ struct dt_raw_irq { u32 specifier[DT_MAX_IRQ_SPEC]; }; =20 -typedef int (*device_tree_node_func)(const void *fdt, - int node, const char *name, int depth, - u32 address_cells, u32 size_cells, - void *data); - extern const void *device_tree_flattened; =20 -int device_tree_for_each_node(const void *fdt, int node, - device_tree_node_func func, - void *data); - /** * dt_unflatten_host_device_tree - Unflatten the host device tree * @@ -245,10 +235,6 @@ void intc_dt_preinit(void); #define dt_node_cmp(s1, s2) strcasecmp((s1), (s2)) #define dt_compat_cmp(s1, s2) strcasecmp((s1), (s2)) =20 -/* Default #address and #size cells */ -#define DT_ROOT_NODE_ADDR_CELLS_DEFAULT 2 -#define DT_ROOT_NODE_SIZE_CELLS_DEFAULT 1 - #define dt_for_each_property_node(dn, pp) \ for ( pp =3D (dn)->properties; (pp) !=3D NULL; pp =3D (pp)->next ) =20 @@ -258,16 +244,6 @@ void intc_dt_preinit(void); #define dt_for_each_child_node(dt, dn) \ for ( dn =3D (dt)->child; (dn) !=3D NULL; dn =3D (dn)->sibling ) =20 -/* Helper to read a big number; size is in cells (not bytes) */ -static inline u64 dt_read_number(const __be32 *cell, int size) -{ - u64 r =3D 0; - - while ( size-- ) - r =3D (r << 32) | be32_to_cpu(*(cell++)); - return r; -} - /* Wrapper for dt_read_number() to return paddr_t (instead of uint64_t) */ static inline paddr_t dt_read_paddr(const __be32 *cell, int size) { @@ -307,14 +283,6 @@ static inline int dt_size_to_cells(int bytes) return (bytes / sizeof(u32)); } =20 -static inline u64 dt_next_cell(int s, const __be32 **cellp) -{ - const __be32 *p =3D *cellp; - - *cellp =3D p + s; - return dt_read_number(p, s); -} - static inline const char *dt_node_full_name(const struct dt_device_node *n= p) { return (np && np->full_name) ? np->full_name : ""; --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749153932; cv=pass; d=zohomail.com; s=zohoarc; b=C3mY9gqZR6o2UWpvmRAPbnM2kSuSssxjrQwOUl6KPMqW1oM6UQyyy5nIw/dyJVsppeANxYvDK8ouyTRY9IPvJsdKdRcRhU69YJ0hhrsnG8EBsgIAbGw7kvWZMeXaLJdyVgEYZrw0/6tZ97FJ/ItGFGPNKyDBosWUWru7C/i7+TU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749153932; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hou+jj44bbtPOsTjw0RXt40/BL0AezOYjWqTEtsXsjI=; b=QUaSUJVfSXCUd5o5jZNw3urgd8EbiI3LqrVgt6mc3oPU6KcuWrm2a9fx6/fX2PIWijgyfYjPcr7yhdZ3tZkeWcK2KzfYzd8QCqKp49ZOAnBT2ce2ybr1SfUZ8wFDhhclB60gnA6piqioYNG2gu/08EQpi4M8VRnx0SJUwHhzG/E= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749153932169416.32794781585335; Thu, 5 Jun 2025 13:05:32 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007570.1386867 (Exim 4.92) (envelope-from ) id 1uNGpr-00068R-KN; Thu, 05 Jun 2025 20:05:11 +0000 Received: by outflank-mailman (output) from mailman id 1007570.1386867; Thu, 05 Jun 2025 20:05:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGpr-00068K-HT; Thu, 05 Jun 2025 20:05:11 +0000 Received: by outflank-mailman (input) for mailman id 1007570; Thu, 05 Jun 2025 20:05:10 +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 1uNGpq-00068E-1x for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 20:05:10 +0000 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2061c.outbound.protection.outlook.com [2a01:111:f403:2408::61c]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5fb22deb-4248-11f0-b894-0df219b8e170; Thu, 05 Jun 2025 22:05:07 +0200 (CEST) Received: from MW4PR03CA0348.namprd03.prod.outlook.com (2603:10b6:303:dc::23) by CY8PR12MB7362.namprd12.prod.outlook.com (2603:10b6:930:52::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Thu, 5 Jun 2025 20:05:02 +0000 Received: from CO1PEPF000066E8.namprd05.prod.outlook.com (2603:10b6:303:dc:cafe::5f) by MW4PR03CA0348.outlook.office365.com (2603:10b6:303:dc::23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.29 via Frontend Transport; Thu, 5 Jun 2025 20:05:02 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000066E8.mail.protection.outlook.com (10.167.249.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8792.29 via Frontend Transport; Thu, 5 Jun 2025 20:05:01 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:48:57 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 5fb22deb-4248-11f0-b894-0df219b8e170 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vf5AAkYsdY9rqGuzQviVB4rpgP7ycKTcJ8tkI71TXoVkbM2gLJK1xuwWhICnaaAZ1FgVjB/WHT4WGx55R70ZkpmGGNbpzMNbJ1nh2EJrjklo171qP5gUOGgsLXehDA7hDB9WSpe8N9+iD67sQqb4BLdXCuMap7QLFwgaTUN52AVIp/koSTd3KMUC3nlWUlzOfLw9nbkW9I+Wej715S6h3yizvuSE3EKilIKe8j9mqESuiOxi22deLEGOJCCx1E40Rb9S621Cd3lway56EX0s/rNAQmqFuCH0amZ3GpZ2YobWmKus69h5qjXP3h/feRWdOBb6HphMIADstqdolMX7dQ== 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=hou+jj44bbtPOsTjw0RXt40/BL0AezOYjWqTEtsXsjI=; b=yukSyFN16oOwDmJdRwfMkzed8uWMWkJ4h67rb+hXFKwTh6kFJVUZuKKbeM8Daz6kf08zYgPCiq9nRF1qHYyDtqtsFF0Sdy8D5sv/K0zsE5lNjVBHq0uY1adPhD+UDlcDZwViCb5oWRso5PSZw3fK59GbZdZXuex3OmO1TomRCpQiapUgnGAbfj8ob3fiZ6z/BOTC38iNAufagnZIFKMKRhbgJt5VUcVPg0G1CTRKlKl3lvB+r1WgqEFPRTReJN2YyNVuIQrNSI3arFl08YVQdNzCuHUfmAhN9d3v9hFgqx58yICxlWpoq51U2RUzP+4OLMqTKUQDheK/V/B+eh87og== 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 (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=hou+jj44bbtPOsTjw0RXt40/BL0AezOYjWqTEtsXsjI=; b=Ty1LG2/Y6YFnpgs04YbNd/yswvn9LgmmAseHTcfKhQ9UTq0tJ0zlLUMjt9TUJXTn3dwkY8bi+I6l9yEMI9ns3wML9W5szfwl30zzUWP+iT3z+lh790+PDbDF/pIpRa9436GP5ZEeZgmQhFRSDdYPlsgW24FXge61aPo024hY7Ks= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" , Andrew Cooper , Anthony PERARD , "Jan Beulich" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Alistair Francis , "Bob Eshleman" , Connor Davis , Oleksii Kurochko , "Daniel P. Smith" Subject: [PATCH v2 09/15] xen/dt: Move bootinfo functions to a new bootinfo.h Date: Thu, 5 Jun 2025 21:48:01 +0200 Message-ID: <20250605194810.2782031-10-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000066E8:EE_|CY8PR12MB7362:EE_ X-MS-Office365-Filtering-Correlation-Id: e9937991-f520-49e2-dc97-08dda46c4117 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/PheiT4Ra8FsN4mFx6kKXPjAdh0X2rIRL6pO1xwjpm50KloAe+CeqnUOTLPe?= =?us-ascii?Q?EIBVoWLmcRhBCpEZJp1fn1Wx11S4G+O3s4OtXLUCpZ7HpaFVmLrzWh0kWjdg?= =?us-ascii?Q?omNjHHGi4fEXeurfgNvJNiSc9thlUWcK45lS1aNZAyxl7PIHCqSatU68o+5X?= =?us-ascii?Q?1817Z85fUZGpxjqBYPeo6Ub0OmmgHew+cFS8JyQxaB36169frhjc0OpWoEcN?= =?us-ascii?Q?WlGlsll3AKVLW3sq1S6kB8/bVezJ1zgXd/2nEoeUC/tc2g075j6QaR59sYri?= =?us-ascii?Q?Xu+FaW7kDSjlGQk28Drw8SVXqFNGRXIdOhA4r63mbFTf9wbxCdDeVe+x3CG5?= =?us-ascii?Q?+iCxc4aPCtPV96FxGH3Yy5U5urOUQBE3adRxhLlAE7gokou9t1pVZcBMRraN?= =?us-ascii?Q?8dIhx9FABmWMyCbuRjRclxWRwOrm+FOfLEKL5d7PRtx7bYEm1cvDd68am7SS?= =?us-ascii?Q?xJtoYH/8W/XcDCeRMBPq2iPfuhfFi8O+oWihuajiPfm2mejcO7ZlbXGmA7lO?= =?us-ascii?Q?G4998W035mXH8vnjGRVwUgHH2dnlMG8/Qr3s9yUnq7Bc0e+ibVptmVNnHKDO?= =?us-ascii?Q?O7vr/B2QzZKn+I3ERKGtUtVSJ3Qiy7GuDK5aF01X3fVE2G1wo+CHu9bovpaC?= =?us-ascii?Q?3IENTrgaOohl7Xje4t95nHIbPwvB6zwALE02k7xhtsZdeLZJmelJPafHGNUZ?= =?us-ascii?Q?ASFnp2wBFMBCZeKQozidVzHwePq7M7Jy903WQejKVaAK5s4ky20Hb8xy47Z3?= =?us-ascii?Q?18Yp8UR0quf/Wel6jvcUelBRXXzrb+eOZNKCCDnINFilpUqgi/I++FTCoyt1?= =?us-ascii?Q?P4vu1uY8iw71LvacVXj3XdfyIIwVZqFmAgRh6hMIzv7VV//oab55mk6IUXGR?= =?us-ascii?Q?vgetG7jT3fGoak9ygBBJU1w44ujHP262cKGoQwW2XSgCriXIdyQ7thi6LRpP?= =?us-ascii?Q?cQF+JN+7qg5gooKEO6h4oI7UgF8MOHzcT8j+kVD9Ut2vngdeGhtSKtOoEck6?= =?us-ascii?Q?iUXC8XixWh9t2kVaJO/NPLMOqn2Gm6xzxIRRGvxX2Av05fQpK/0DmqDr4lcD?= =?us-ascii?Q?6xoQCYIzC/tG81ELMCibGSm9FMbABbGZImorK6MJqd432z96H6AcmMZpv/KO?= =?us-ascii?Q?qq2AvGM7NQPfWB59sXoPfodTTKqo/sjbct4QoUHiX2vSGD+xBfrh9f1gv76p?= =?us-ascii?Q?+5IuwmTbO88XvVp2JnGMypuV19cSL7OOaUlxvDKNEcrBXfoMNMYi3QM+p/BL?= =?us-ascii?Q?F0DkCG/zVKjHbYeo6My8EbfUPPXtxvWooN8FMvkxU0YAxlEntahdTG8V2/Hh?= =?us-ascii?Q?e0mEKEo3fA5CYKVoMUKV+MT/3rYSdlClaPuqSN1c7Ypg/BLKOYXlrAXPWQhy?= =?us-ascii?Q?6y/E4L6Y8MXjr2pwbZEQbvhkXs+7PoJ9+AJ236WPNW+mhYqSdDXos3CH7mt+?= =?us-ascii?Q?uI6OX4U+z50gejkNsu2a2T6lZN//6v9lfbaCJtdmiYAQsARtSNRgM/Sc/ffI?= =?us-ascii?Q?SUfWamJyYu6O7qIyjSv1ofs3T38fgLMU2z9j?= 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:(13230040)(36860700013)(82310400026)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 20:05:01.0503 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9937991-f520-49e2-dc97-08dda46c4117 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: CO1PEPF000066E8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7362 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749153933020116600 Content-Type: text/plain; charset="utf-8" Part of an unpicking process to extract bootfdt contents independent of bootinfo to a separate file for x86 to take. With this, bootfdt.h can be cleanly included from x86. A later patch extracts the definitions so the functions may be called too. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- xen/arch/arm/domain_build.c | 1 + xen/arch/arm/mmu/mm.c | 1 + xen/arch/arm/setup.c | 1 + xen/arch/riscv/mm.c | 2 +- xen/arch/riscv/setup.c | 2 +- xen/common/device-tree/bootfdt.c | 2 +- xen/common/device-tree/bootinfo.c | 2 +- xen/common/device-tree/dom0less-build.c | 2 +- xen/common/device-tree/domain-build.c | 2 +- xen/common/device-tree/kernel.c | 2 +- xen/include/xen/bootfdt.h | 208 ----------------------- xen/include/xen/bootinfo.h | 213 ++++++++++++++++++++++++ xen/include/xen/device_tree.h | 2 +- xen/include/xen/fdt-domain-build.h | 2 +- xen/include/xen/fdt-kernel.h | 2 +- 15 files changed, 226 insertions(+), 218 deletions(-) create mode 100644 xen/include/xen/bootinfo.h diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 5317665555..497cfbe860 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include #include #include diff --git a/xen/arch/arm/mmu/mm.c b/xen/arch/arm/mmu/mm.c index 9c50479c63..77f82757bb 100644 --- a/xen/arch/arm/mmu/mm.c +++ b/xen/arch/arm/mmu/mm.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ =20 +#include #include #include #include diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 734e23da44..439b1d9df2 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -8,6 +8,7 @@ * Copyright (c) 2011 Citrix Systems. */ =20 +#include #include #include #include diff --git a/xen/arch/riscv/mm.c b/xen/arch/riscv/mm.c index 4047d67c0e..6ccd38091b 100644 --- a/xen/arch/riscv/mm.c +++ b/xen/arch/riscv/mm.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ =20 -#include +#include #include #include #include diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 8bcd19218d..3e99e2e194 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -2,7 +2,7 @@ =20 #include #include -#include +#include #include #include #include diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/boot= fdt.c index ab449db8d6..7ff62e1e3e 100644 --- a/xen/common/device-tree/bootfdt.c +++ b/xen/common/device-tree/bootfdt.c @@ -5,7 +5,7 @@ * Copyright (C) 2012-2014 Citrix Systems, Inc. */ =20 -#include +#include #include #include #include diff --git a/xen/common/device-tree/bootinfo.c b/xen/common/device-tree/boo= tinfo.c index 717cfa0962..69491bdb0b 100644 --- a/xen/common/device-tree/bootinfo.c +++ b/xen/common/device-tree/bootinfo.c @@ -10,7 +10,7 @@ */ =20 #include -#include +#include #include #include #include diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tr= ee/dom0less-build.c index 809cb3c232..42165e78af 100644 --- a/xen/common/device-tree/dom0less-build.c +++ b/xen/common/device-tree/dom0less-build.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ =20 -#include +#include #include #include #include diff --git a/xen/common/device-tree/domain-build.c b/xen/common/device-tree= /domain-build.c index e602cb91c9..80235aa56a 100644 --- a/xen/common/device-tree/domain-build.c +++ b/xen/common/device-tree/domain-build.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ =20 -#include +#include #include #include #include diff --git a/xen/common/device-tree/kernel.c b/xen/common/device-tree/kerne= l.c index 3960f951f7..0463bfd8df 100644 --- a/xen/common/device-tree/kernel.c +++ b/xen/common/device-tree/kernel.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ =20 -#include +#include #include #include #include diff --git a/xen/include/xen/bootfdt.h b/xen/include/xen/bootfdt.h index 1b89986e10..a87b5212a6 100644 --- a/xen/include/xen/bootfdt.h +++ b/xen/include/xen/bootfdt.h @@ -4,9 +4,6 @@ =20 #include #include -#include -#include -#include =20 #if __has_include() #include @@ -14,15 +11,10 @@ =20 #define MIN_FDT_ALIGN 8 =20 -#define NR_MEM_BANKS 256 -#define NR_SHMEM_BANKS 32 - /* Default #address and #size cells */ #define DT_ROOT_NODE_ADDR_CELLS_DEFAULT 2 #define DT_ROOT_NODE_SIZE_CELLS_DEFAULT 1 =20 -#define MAX_MODULES 32 /* Current maximum useful modules */ - #define DEVICE_TREE_MAX_DEPTH 16 =20 /* Helper to read a big number; size is in cells (not bytes) */ @@ -75,78 +67,6 @@ typedef enum { BOOTMOD_UNKNOWN } bootmodule_kind; =20 -enum membank_type { - /* - * The MEMBANK_DEFAULT type refers to either reserved memory for the - * device/firmware (when the bank is in 'reserved_mem') or any RAM (wh= en - * the bank is in 'mem'). - */ - MEMBANK_DEFAULT, - /* - * The MEMBANK_STATIC_DOMAIN type is used to indicate whether the memo= ry - * bank is bound to a static Xen domain. It is only valid when the bank - * is in reserved_mem. - */ - MEMBANK_STATIC_DOMAIN, - /* - * The MEMBANK_STATIC_HEAP type is used to indicate whether the memory - * bank is reserved as static heap. It is only valid when the bank is - * in reserved_mem. - */ - MEMBANK_STATIC_HEAP, - /* - * The MEMBANK_FDT_RESVMEM type is used to indicate whether the memory - * bank is from the FDT reserve map. - */ - MEMBANK_FDT_RESVMEM, -}; - -enum region_type { - MEMORY, - RESERVED_MEMORY, - STATIC_SHARED_MEMORY -}; - -/* Indicates the maximum number of characters(\0 included) for shm_id */ -#define MAX_SHM_ID_LENGTH 16 - -struct shmem_membank_extra { - char shm_id[MAX_SHM_ID_LENGTH]; - unsigned int nr_shm_borrowers; -}; - -struct membank { - paddr_t start; - paddr_t size; - union { - enum membank_type type; -#ifdef CONFIG_STATIC_SHM - struct shmem_membank_extra *shmem_extra; -#endif - }; -}; - -struct membanks { - __struct_group(membanks_hdr, common, , - unsigned int nr_banks; - unsigned int max_banks; - enum region_type type; - ); - struct membank bank[]; -}; - -struct meminfo { - struct membanks_hdr common; - struct membank bank[NR_MEM_BANKS]; -}; - -struct shared_meminfo { - struct membanks_hdr common; - struct membank bank[NR_SHMEM_BANKS]; - struct shmem_membank_extra extra[NR_SHMEM_BANKS]; -}; - - struct bootdomain { struct domain *d; =20 @@ -179,134 +99,6 @@ struct bootmodule { #endif }; =20 -/* DT_MAX_NAME is the node name max length according the DT spec */ -#define DT_MAX_NAME 41 -struct bootcmdline { - bootmodule_kind kind; - bool domU; - paddr_t start; - char dt_name[DT_MAX_NAME]; - char cmdline[BOOTMOD_MAX_CMDLINE]; -}; - -struct bootmodules { - int nr_mods; - struct bootmodule module[MAX_MODULES]; -}; - -struct bootcmdlines { - unsigned int nr_mods; - struct bootcmdline cmdline[MAX_MODULES]; -}; - -struct bootinfo { - struct meminfo mem; - /* The reserved regions are only used when booting using Device-Tree */ - struct meminfo reserved_mem; - struct bootmodules modules; - struct bootcmdlines cmdlines; -#ifdef CONFIG_ACPI - struct meminfo acpi; -#endif -#ifdef CONFIG_STATIC_SHM - struct shared_meminfo shmem; -#endif -}; - -#ifdef CONFIG_ACPI -#define BOOTINFO_ACPI_INIT \ - .acpi.common.max_banks =3D NR_MEM_BANKS, \ - .acpi.common.type =3D MEMORY, -#else -#define BOOTINFO_ACPI_INIT -#endif - -#ifdef CONFIG_STATIC_SHM -#define BOOTINFO_SHMEM_INIT \ - .shmem.common.max_banks =3D NR_SHMEM_BANKS, \ - .shmem.common.type =3D STATIC_SHARED_MEMORY, -#else -#define BOOTINFO_SHMEM_INIT -#endif - -#define BOOTINFO_INIT \ -{ \ - .mem.common.max_banks =3D NR_MEM_BANKS, \ - .mem.common.type =3D MEMORY, \ - .reserved_mem.common.max_banks =3D NR_MEM_BANKS, \ - .reserved_mem.common.type =3D RESERVED_MEMORY, \ - BOOTINFO_ACPI_INIT \ - BOOTINFO_SHMEM_INIT \ -} - -extern struct bootinfo bootinfo; - -bool check_reserved_regions_overlap(paddr_t region_start, - paddr_t region_size, - bool allow_memreserve_overlap); - -struct bootmodule *add_boot_module(bootmodule_kind kind, - paddr_t start, paddr_t size, bool domU); -struct bootmodule *boot_module_find_by_kind(bootmodule_kind kind); -struct bootmodule * boot_module_find_by_addr_and_kind(bootmodule_kind kind, - paddr_t start= ); -void add_boot_cmdline(const char *name, const char *cmdline, - bootmodule_kind kind, paddr_t start, bool domU); -struct bootcmdline *boot_cmdline_find_by_kind(bootmodule_kind kind); -struct bootcmdline * boot_cmdline_find_by_name(const char *name); -const char *boot_module_kind_as_string(bootmodule_kind kind); - -void populate_boot_allocator(void); - -size_t boot_fdt_info(const void *fdt, paddr_t paddr); - -const char *boot_fdt_cmdline(const void *fdt); -int domain_fdt_begin_node(void *fdt, const char *name, uint64_t unit); - -static inline struct membanks *bootinfo_get_reserved_mem(void) -{ - return container_of(&bootinfo.reserved_mem.common, struct membanks, co= mmon); -} - -static inline struct membanks *bootinfo_get_mem(void) -{ - return container_of(&bootinfo.mem.common, struct membanks, common); -} - -#ifdef CONFIG_ACPI -static inline struct membanks *bootinfo_get_acpi(void) -{ - return container_of(&bootinfo.acpi.common, struct membanks, common); -} -#endif - -#ifdef CONFIG_STATIC_SHM -static inline struct membanks *bootinfo_get_shmem(void) -{ - return container_of(&bootinfo.shmem.common, struct membanks, common); -} - -static inline struct shmem_membank_extra *bootinfo_get_shmem_extra(void) -{ - return bootinfo.shmem.extra; -} -#endif - -static inline struct membanks *membanks_xzalloc(unsigned int nr, - enum region_type type) -{ - struct membanks *banks =3D xzalloc_flex_struct(struct membanks, bank, = nr); - - if ( !banks ) - goto out; - - banks->max_banks =3D nr; - banks->type =3D type; - - out: - return banks; -} - /* * Interpret the property `prop_name` of `node` as a u32. * diff --git a/xen/include/xen/bootinfo.h b/xen/include/xen/bootinfo.h new file mode 100644 index 0000000000..670fe771a4 --- /dev/null +++ b/xen/include/xen/bootinfo.h @@ -0,0 +1,213 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef XEN_BOOTINFO_H +#define XEN_BOOTINFO_H + +#include +#include +#include +#include + +#define NR_MEM_BANKS 256 +#define NR_SHMEM_BANKS 32 + +#define MAX_MODULES 32 /* Current maximum useful modules */ + +enum membank_type { + /* + * The MEMBANK_DEFAULT type refers to either reserved memory for the + * device/firmware (when the bank is in 'reserved_mem') or any RAM (wh= en + * the bank is in 'mem'). + */ + MEMBANK_DEFAULT, + /* + * The MEMBANK_STATIC_DOMAIN type is used to indicate whether the memo= ry + * bank is bound to a static Xen domain. It is only valid when the bank + * is in reserved_mem. + */ + MEMBANK_STATIC_DOMAIN, + /* + * The MEMBANK_STATIC_HEAP type is used to indicate whether the memory + * bank is reserved as static heap. It is only valid when the bank is + * in reserved_mem. + */ + MEMBANK_STATIC_HEAP, + /* + * The MEMBANK_FDT_RESVMEM type is used to indicate whether the memory + * bank is from the FDT reserve map. + */ + MEMBANK_FDT_RESVMEM, +}; + +enum region_type { + MEMORY, + RESERVED_MEMORY, + STATIC_SHARED_MEMORY +}; + +/* Indicates the maximum number of characters(\0 included) for shm_id */ +#define MAX_SHM_ID_LENGTH 16 + +struct shmem_membank_extra { + char shm_id[MAX_SHM_ID_LENGTH]; + unsigned int nr_shm_borrowers; +}; + +struct membank { + paddr_t start; + paddr_t size; + union { + enum membank_type type; +#ifdef CONFIG_STATIC_SHM + struct shmem_membank_extra *shmem_extra; +#endif + }; +}; + +struct membanks { + __struct_group(membanks_hdr, common, , + unsigned int nr_banks; + unsigned int max_banks; + enum region_type type; + ); + struct membank bank[]; +}; + +struct meminfo { + struct membanks_hdr common; + struct membank bank[NR_MEM_BANKS]; +}; + +struct shared_meminfo { + struct membanks_hdr common; + struct membank bank[NR_SHMEM_BANKS]; + struct shmem_membank_extra extra[NR_SHMEM_BANKS]; +}; + +/* DT_MAX_NAME is the node name max length according the DT spec */ +#define DT_MAX_NAME 41 +struct bootcmdline { + bootmodule_kind kind; + bool domU; + paddr_t start; + char dt_name[DT_MAX_NAME]; + char cmdline[BOOTMOD_MAX_CMDLINE]; +}; + +struct bootmodules { + int nr_mods; + struct bootmodule module[MAX_MODULES]; +}; + +struct bootcmdlines { + unsigned int nr_mods; + struct bootcmdline cmdline[MAX_MODULES]; +}; + +struct bootinfo { + struct meminfo mem; + /* The reserved regions are only used when booting using Device-Tree */ + struct meminfo reserved_mem; + struct bootmodules modules; + struct bootcmdlines cmdlines; +#ifdef CONFIG_ACPI + struct meminfo acpi; +#endif +#ifdef CONFIG_STATIC_SHM + struct shared_meminfo shmem; +#endif +}; + +#ifdef CONFIG_ACPI +#define BOOTINFO_ACPI_INIT \ + .acpi.common.max_banks =3D NR_MEM_BANKS, \ + .acpi.common.type =3D MEMORY, +#else +#define BOOTINFO_ACPI_INIT +#endif + +#ifdef CONFIG_STATIC_SHM +#define BOOTINFO_SHMEM_INIT \ + .shmem.common.max_banks =3D NR_SHMEM_BANKS, \ + .shmem.common.type =3D STATIC_SHARED_MEMORY, +#else +#define BOOTINFO_SHMEM_INIT +#endif + +#define BOOTINFO_INIT \ +{ \ + .mem.common.max_banks =3D NR_MEM_BANKS, \ + .mem.common.type =3D MEMORY, \ + .reserved_mem.common.max_banks =3D NR_MEM_BANKS, \ + .reserved_mem.common.type =3D RESERVED_MEMORY, \ + BOOTINFO_ACPI_INIT \ + BOOTINFO_SHMEM_INIT \ +} + +extern struct bootinfo bootinfo; + +bool check_reserved_regions_overlap(paddr_t region_start, + paddr_t region_size, + bool allow_memreserve_overlap); + +struct bootmodule *add_boot_module(bootmodule_kind kind, + paddr_t start, paddr_t size, bool domU); +struct bootmodule *boot_module_find_by_kind(bootmodule_kind kind); +struct bootmodule * boot_module_find_by_addr_and_kind(bootmodule_kind kind, + paddr_t start= ); +void add_boot_cmdline(const char *name, const char *cmdline, + bootmodule_kind kind, paddr_t start, bool domU); +struct bootcmdline *boot_cmdline_find_by_kind(bootmodule_kind kind); +struct bootcmdline * boot_cmdline_find_by_name(const char *name); +const char *boot_module_kind_as_string(bootmodule_kind kind); + +void populate_boot_allocator(void); + +size_t boot_fdt_info(const void *fdt, paddr_t paddr); +const char *boot_fdt_cmdline(const void *fdt); +int domain_fdt_begin_node(void *fdt, const char *name, uint64_t unit); + +static inline struct membanks *bootinfo_get_reserved_mem(void) +{ + return container_of(&bootinfo.reserved_mem.common, struct membanks, co= mmon); +} + +static inline struct membanks *bootinfo_get_mem(void) +{ + return container_of(&bootinfo.mem.common, struct membanks, common); +} + +#ifdef CONFIG_ACPI +static inline struct membanks *bootinfo_get_acpi(void) +{ + return container_of(&bootinfo.acpi.common, struct membanks, common); +} +#endif + +#ifdef CONFIG_STATIC_SHM +static inline struct membanks *bootinfo_get_shmem(void) +{ + return container_of(&bootinfo.shmem.common, struct membanks, common); +} + +static inline struct shmem_membank_extra *bootinfo_get_shmem_extra(void) +{ + return bootinfo.shmem.extra; +} +#endif + +static inline struct membanks *membanks_xzalloc(unsigned int nr, + enum region_type type) +{ + struct membanks *banks =3D xzalloc_flex_struct(struct membanks, bank, = nr); + + if ( !banks ) + goto out; + + banks->max_banks =3D nr; + banks->type =3D type; + + out: + return banks; +} + +#endif /* XEN_BOOTINFO_H */ diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 0a22b1ba1d..7d1c8bc305 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -10,7 +10,7 @@ #ifndef __XEN_DEVICE_TREE_H__ #define __XEN_DEVICE_TREE_H__ =20 -#include +#include #include =20 #include diff --git a/xen/include/xen/fdt-domain-build.h b/xen/include/xen/fdt-domai= n-build.h index 45981dbec0..60565fdbf9 100644 --- a/xen/include/xen/fdt-domain-build.h +++ b/xen/include/xen/fdt-domain-build.h @@ -3,7 +3,7 @@ #ifndef __XEN_FDT_DOMAIN_BUILD_H__ #define __XEN_FDT_DOMAIN_BUILD_H__ =20 -#include +#include #include #include #include diff --git a/xen/include/xen/fdt-kernel.h b/xen/include/xen/fdt-kernel.h index dd009f01d0..cb211d242f 100644 --- a/xen/include/xen/fdt-kernel.h +++ b/xen/include/xen/fdt-kernel.h @@ -7,7 +7,7 @@ #ifndef __XEN_FDT_KERNEL_H__ #define __XEN_FDT_KERNEL_H__ =20 -#include +#include #include #include =20 --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749152971; cv=pass; d=zohomail.com; s=zohoarc; b=WhS86CN/+fy5qh94LiyWDt7W/eHW2F6m2MII/XzAO2yLyeRS2zAJAOExgK5UGgzc/VBdSetxK418j45yrlcuxrGz7ASvZUqpGNx1mrueIcnEr0r6Gx+RxHNTMfFLE3wNXDLtNs6ZFTJB1LNDsnaJ6m4wc2B800OPpMekxUsOW6I= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749152971; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xcW3d8L8LfyXlkpJp/idqPtEvoD18OvPCNwy0JjhwWc=; b=BBClY7vmeF+fZy+xRBTy1Ov8q0jQtRoiiFEGNXZ6HqJnc/uw+mdK61HEGeY0AG6Aqtsp866YOC4iOoFLrBEVD8+QOVVmumqfB+48+tu6IbfBSJW7crXCi+bHuBaFXfowiiMtizK0rNvHh1ue2fnMhIk69GpRMSyJBiNFq4yUlFs= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749152971448294.0708313681156; Thu, 5 Jun 2025 12:49:31 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007468.1386807 (Exim 4.92) (envelope-from ) id 1uNGaP-0005WO-Sr; Thu, 05 Jun 2025 19:49:13 +0000 Received: by outflank-mailman (output) from mailman id 1007468.1386807; Thu, 05 Jun 2025 19:49:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGaP-0005W6-NH; Thu, 05 Jun 2025 19:49:13 +0000 Received: by outflank-mailman (input) for mailman id 1007468; Thu, 05 Jun 2025 19:49:13 +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 1uNGaP-0002tD-2D for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:49:13 +0000 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2061e.outbound.protection.outlook.com [2a01:111:f403:2409::61e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 26b1802c-4246-11f0-a300-13f23c93f187; Thu, 05 Jun 2025 21:49:12 +0200 (CEST) Received: from BL1PR13CA0134.namprd13.prod.outlook.com (2603:10b6:208:2bb::19) by SN7PR12MB6932.namprd12.prod.outlook.com (2603:10b6:806:260::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Thu, 5 Jun 2025 19:49:09 +0000 Received: from BN2PEPF000055DB.namprd21.prod.outlook.com (2603:10b6:208:2bb:cafe::c7) by BL1PR13CA0134.outlook.office365.com (2603:10b6:208:2bb::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8835.10 via Frontend Transport; Thu, 5 Jun 2025 19:49:09 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DB.mail.protection.outlook.com (10.167.245.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:49:08 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:49:00 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 26b1802c-4246-11f0-a300-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JIe7tuAnxcM7EPDHGGEpLsAy4MMIvrNU5390kH1ikzk5J9OOxmgzwq7ooklboA1qluxUKF0SKPRnm+vRNvnKXaaMquECKwFavMKkn5oWTa3cxizE59HDEr1EBbnFKb9lAes/0nJP2B2r9t7oIPY7wcl6NGmKdK/SBr5aLDRA3xZdk9hE5+64S2sz0d7oZGK2uilFXmvjBXYoE1mI5nmXkPq43JadZi2S0VSFPFGiRIon81nNULslDupRe/EVvSd8omJHGYassr6VtFjePkGgi2LJ6/7n6+d1bgfELhxYxRk3CH7yGhAHzxbgBdyANBXr/nZFXntchlSGM5sT22evZQ== 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=xcW3d8L8LfyXlkpJp/idqPtEvoD18OvPCNwy0JjhwWc=; b=dKQz6V5l4WkCnKp5YgEukdy880MzQ1N/TQkD1hwbXcA7/M/pisgsXzZj3niTOIhnyDtDCmAeG7BI4Vkr0kI8206chGr8et2X7ZqrDcJ9Ph5ShPWrpNY0zwUA46eknM0omOSFU+Gjkcq7Ga/Bc6qdYNdDJHtv4ofBSkkayfHguovKbRB12Eppx6O8pzAJPb0DKzY00BtfJx8fAU6oOlFixPNwk+RAt/bvtjFytR7gCW24pDVgv5Q9ap44Us1xOiZ/Q4y5qIe4b94ADBThEw1aLj3DuPOXNjE8KqktWCaFDbCezZKynS2fglIKsuDofmvQ0IKr10d6Dr5zqvbdLUAezg== 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 (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=xcW3d8L8LfyXlkpJp/idqPtEvoD18OvPCNwy0JjhwWc=; b=SdbGoCWIFLJzeY/1nsCPiFYraUSh64mZzkXrZZt2mBciq4UQw1V8ZKa0p6FCvkv8GlWd1OYN289fZ8p/02041Aj/FQDI7FRWjeqZ7TQJX+qk3BEx7xrvY7g04Xkr+j7vE3pACPAkfuArH4+LspmqvC4HK+P0qaQA7IXdkAG8Jro= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Daniel P. Smith" Subject: [PATCH v2 10/15] xen/dt: Rename bootfdt.c -> bootinfo-fdt.c Date: Thu, 5 Jun 2025 21:48:02 +0200 Message-ID: <20250605194810.2782031-11-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DB:EE_|SN7PR12MB6932:EE_ X-MS-Office365-Filtering-Correlation-Id: d496c9a4-f549-4c45-f851-08dda46a0974 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?wHyOmQhsow9yAH807JTGodDYGGG/Ia/fhmpeIHFg66Kdoyfmii8TtpDjAkIr?= =?us-ascii?Q?VXKZ1+4Ug2jw9SpgCKLEkl4MSxqvLGGn63vtqdkYIat3AuQ0FvcUL9to3qmZ?= =?us-ascii?Q?IkDkg2E2GT12cxFeWwDQMDNJkToMeQisG6rVACEeR/s+4jzgB7GDjdkBP+k+?= =?us-ascii?Q?NPGkmQlssIPePZp+sxVvV2/tGnnI9W4ESlHjoUaM1w2gWwmaNqYdf3QakvIy?= =?us-ascii?Q?NFaZuvoJCAxbOKMaegDzOgCtI+OMbf21WkwtdS7l1DFhsf7L+CA+vLXeHt61?= =?us-ascii?Q?TLK0i3D/N9r7QRSBJ6hwIQdgR9mdJ8k3mc80C0L4/fU99cvsG4DRgmbySFIc?= =?us-ascii?Q?pdLYtxchRLjUjO0fdKN8r5rk6QcDV1H9gkva1hA5lfGCQSgQ3EIw90spcY+M?= =?us-ascii?Q?M4zP/cei0xPkfo2s2JiSzfGi89THw5W9aARvyXhv405gGUyPNVo9SKhyU34O?= =?us-ascii?Q?xFo65pyuui2/cdMwyYkpJlURJAdVyye8pdDXtlAob9WrEmKHf/H7L/nHct0Z?= =?us-ascii?Q?ikxLtb2qKBQA8YgsXPdIbhcncpX6MgKdmJcKfCaZa6aYDan5lSY6cB2RefDF?= =?us-ascii?Q?Rux0Gdr/qMDXec3B+StvonklvJTaJsXiwK7Iw0Rjsf2pYQdPmmSkfnJMP/zz?= =?us-ascii?Q?5sTBO4kxaO4HoqYijqHhR3p/qtjo2crenTShvMgSxEckdxESDWjRsdNyrRKZ?= =?us-ascii?Q?3wQNoWICFU++x811LaImoTjWN+/4H5JGwbLwc/YuvBzAU/ERReMIK1+ppiB8?= =?us-ascii?Q?8sxifLL1DMNJMZGRyPpYR7RG429atI+gj2eI7cNkuNDI6yInMgr6qAOrxW3d?= =?us-ascii?Q?qNq2qxilENC9snoxt+RJKIeulFdFH8Lvw2UCB3Gdujb7EJH6QGpRctjlhhkl?= =?us-ascii?Q?UG6c0gAjIvyVdsMD6mjcOdSun/31elorr+QZn+bkb5tihp4hXkYB/1SWKhAQ?= =?us-ascii?Q?anpYTD8iSYPdLzR624bkpDqtWFubikNJS/acJxdhsaJqLjnwsl9DE6U/JFjS?= =?us-ascii?Q?1K+7v8BriZzdzWjJ84jfU0OcH2JFhNWbRT1rnMsL4aGvxztNieT2qYhjwK+y?= =?us-ascii?Q?dseZ+YJSInXKWzC4bNvKYC/kIXrwmpSzBxo6ONaOocJmOObcwt2nV81/rbFq?= =?us-ascii?Q?pBO9YEI1+weGXIcn5hcOCJtd+Cr5NDqOfMR60H10AMaRodgmvJYe1lbht50k?= =?us-ascii?Q?zDW+n9iXjXdT6/SqttboXLXNrm/Hsfcj+55jYSnNpERy9U2bWtOZb3PQamaL?= =?us-ascii?Q?eO9xKFd6JftM27Pv10JbN9T74E5VoB42taDHFJMIrR1OIBK1V3hQM7tkEP7I?= =?us-ascii?Q?Qh/oco4IXLLkY72ElTS1OehFryOMBAzd4RCcGVxaoY7Tnqwm6odjJdO9a2Mq?= =?us-ascii?Q?VomC3GkgGBRS0cUMZld+7fQKrBhgObu3RKNf8qTw7EBdMzQPq9ALGAC+zV7K?= =?us-ascii?Q?bH0qxt/obalyHuNuue8+09oN6rET4pKEEJEvDSLwh9XKuGYC5KwdK8fi6v46?= =?us-ascii?Q?lZb04SLLpQKrZKAmyjcHl0/qc8ijqrxYg8FS?= 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:(13230040)(36860700013)(376014)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:49:08.8171 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d496c9a4-f549-4c45-f851-08dda46a0974 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: BN2PEPF000055DB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6932 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749152972705116600 Content-Type: text/plain; charset="utf-8" This file will eventually contain bootfdt helpers that make heavy use of bootinfo. To simplify git history do the rename here explicitly. A later patch extracts bootinfo-independent helpers into bootfdt.c. Doing so here would needlessly pollute the diffs. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- xen/common/device-tree/Makefile | 2 +- xen/common/device-tree/{bootfdt.c =3D> bootinfo-fdt.c} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename xen/common/device-tree/{bootfdt.c =3D> bootinfo-fdt.c} (99%) diff --git a/xen/common/device-tree/Makefile b/xen/common/device-tree/Makef= ile index 13127296cb..8a3f2be89e 100644 --- a/xen/common/device-tree/Makefile +++ b/xen/common/device-tree/Makefile @@ -1,4 +1,4 @@ -obj-y +=3D bootfdt.init.o +obj-y +=3D bootinfo-fdt.init.o obj-y +=3D bootinfo.init.o obj-y +=3D device-tree.o obj-$(CONFIG_DOMAIN_BUILD_HELPERS) +=3D domain-build.init.o diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/boot= info-fdt.c similarity index 99% rename from xen/common/device-tree/bootfdt.c rename to xen/common/device-tree/bootinfo-fdt.c index 7ff62e1e3e..195249f700 100644 --- a/xen/common/device-tree/bootfdt.c +++ b/xen/common/device-tree/bootinfo-fdt.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Early Device Tree + * Early Device Tree with bootinfo hooks * * Copyright (C) 2012-2014 Citrix Systems, Inc. */ --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749153055; cv=pass; d=zohomail.com; s=zohoarc; b=gGR0n8jIFlgfkXE7m4IG4r8eywtUAEkIZNop4qvfIdEn3HFb/6Y0ngPAqnf4jvEDi73a3HxnzLvDXOKQ2piyPJ9K75qtc+SmcqF2U2XcrFc1mKHH2tv+H1dIVYx5L68RWXge0II18TFbxKr0Rjn7UyDqr3qAMQa04BjrvCKjCbo= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749153055; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Wv0EfzD3T04lsgipc7vZMP9PeSx4rOo21HvvmAlamVQ=; b=kPJB2w/shBDTs3Zc9B1OHF7Zd37WEZa5lEeuhs5h78lTsRBE47yOExQmDaskgelpwzYEjFfjY73YzFtmlr4p+AnFsugU5/gbsWTq9vxWHBK14JtnxjaZluiJw8ZMJaBlA1O/Gg+SxBiMoMZqCIiLAFwyRNfXjb3lCrrJDETk0Qk= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749153055469685.5063702973214; Thu, 5 Jun 2025 12:50:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007491.1386827 (Exim 4.92) (envelope-from ) id 1uNGbr-0000jy-Bj; Thu, 05 Jun 2025 19:50:43 +0000 Received: by outflank-mailman (output) from mailman id 1007491.1386827; Thu, 05 Jun 2025 19:50: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 1uNGbr-0000jr-98; Thu, 05 Jun 2025 19:50:43 +0000 Received: by outflank-mailman (input) for mailman id 1007491; Thu, 05 Jun 2025 19:50:41 +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 1uNGaT-0002fZ-6i for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:49:17 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20624.outbound.protection.outlook.com [2a01:111:f403:2009::624]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 29334f25-4246-11f0-b894-0df219b8e170; Thu, 05 Jun 2025 21:49:15 +0200 (CEST) Received: from BL1PR13CA0137.namprd13.prod.outlook.com (2603:10b6:208:2bb::22) by MN2PR12MB4223.namprd12.prod.outlook.com (2603:10b6:208:1d3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.37; Thu, 5 Jun 2025 19:49:09 +0000 Received: from BN2PEPF000055DB.namprd21.prod.outlook.com (2603:10b6:208:2bb:cafe::18) by BL1PR13CA0137.outlook.office365.com (2603:10b6:208:2bb::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.14 via Frontend Transport; Thu, 5 Jun 2025 19:49:09 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DB.mail.protection.outlook.com (10.167.245.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:49:09 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:49:01 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 29334f25-4246-11f0-b894-0df219b8e170 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZMMU8rbe3/QzAwdQ11F2p682dL93A/MYUBAlykvXLFTpG7E127aUvYwcZjXjsYdI/QXIVp4Pv0IOsWa3r3vMVOIP1ywWajvK3Jlf4cUV20KIxKunZpMccqMhG3M4Qd6dcrmHx0JJVZmI1FA1Du/auYVSOwueLbzvbP7Apx8LHoPWDHbCdDlbQXtGRozbT0KpcRkuTib1thW4y/tGdlwTwguMlqTcB/6RFQLjalqwupvmWqo2ee3LJ47K68s/EcdTKP25k90xsOBJ7IHG+ZpxuVAJVxj6SVlHMthtaSpTt55Xn1o8GW/8TR620yntidCdxwmsHzdxWGouspNPC8eqjQ== 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=Wv0EfzD3T04lsgipc7vZMP9PeSx4rOo21HvvmAlamVQ=; b=PnFOwcZ9EYEFTvshjx9fjIVtqFTSK8L3QcUBnhrk1Qw27mEDHBpvfN+u4wXpc08GZP9gCKk2VpzVsmqUpKYjqJV8Ykl877g9dlhDcgqfYdz39eQMyZmr954qzMjHJysr06BmM6oB4TNo6riFNlHaoHN48ma4WD397ZPcrFGse6NqAPdNICe9WBU/y9Tgh1ma+cX/GofvSfs/g8fwNnjMrTN6dE/m48i9B0/M2+U0uzT6rmRRsrfVkES60lC2AdAegMkgXpKCqMqLw6EAJQz/WtIGmsy+GYQC5G4krhAHW3ucuGjaH1QkOFOc/DNHI5Pcd4O1ZK4cPS0eI8HH1tT5Ng== 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 (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=Wv0EfzD3T04lsgipc7vZMP9PeSx4rOo21HvvmAlamVQ=; b=pKT87fxpLTK7UgkNmqhQZcn1JY6zvbqhLjsVEdCM2P4EYnPkgH9ds94a2kNHhG0cnGqIsxfT1SVwQsqXIRNMe8hQz0Y4/6pQ3jXwAYSVktg4F+rRGXzLrMKQnDRdNLOBFzqnI7t4iBJ2CzaNiyhJbvImuw/M6ZYP5Yd0nk7+i44= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Daniel P. Smith" Subject: [PATCH v2 11/15] xen/dt: Move bootinfo-independent helpers out of bootinfo-fdt.c Date: Thu, 5 Jun 2025 21:48:03 +0200 Message-ID: <20250605194810.2782031-12-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DB:EE_|MN2PR12MB4223:EE_ X-MS-Office365-Filtering-Correlation-Id: 89c9c659-cce0-47a1-fda4-08dda46a09f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?QxIFPJv+YrXur05ETNHacvihuswF+nsPPW9b8IE8rC13PB62PTowruXbJL+J?= =?us-ascii?Q?ZQ5UvUSlu7doukQ1eWxzDF0hSntPMo4+VLbO55c7wNBMj1v+ZDFoB6Itxxy8?= =?us-ascii?Q?0CjevLJiA7ILanjNkBkwcRfnJWwpe3W6Y0/KwPDAyWfTwdp0dqBtT1qLmHDl?= =?us-ascii?Q?mmyUt9y0enp1YwsTLqABdT0Ypkbv1n0EYuF+edL0QlGG7XWQXieDK8IgEtin?= =?us-ascii?Q?2Fug4+uknDembLiSnLw2E2askB3LpaCCYul5VBilJTjd9DM6EV6WI8twKFr3?= =?us-ascii?Q?o2FOnwIKuT2NuL8q6xUd2unY2E9ltuxrJEBfPZZNK+tr65oJNttVXa+xB5YP?= =?us-ascii?Q?Xbn81UobLS+7Ts2qfdVq7OtpoA309CQf4byDrc43PrctVor7crBE1/zNIP6X?= =?us-ascii?Q?MmEWD2U87INGLWU3siTw3M6QRK3rFZVf16/XsmVKFMFkT7GmxfgIwCzSH7/l?= =?us-ascii?Q?9KSZehNmp2G0RMeLiDmG0FDG+W2BXjExYcgA8KIOiET1vJCVj0cwDmw5Elj3?= =?us-ascii?Q?Y0JEZaVnKYWNT1sE8cHz9zGtSco1U5e+ivZoZIBc7gGmmfG2faOEPhqqwCsF?= =?us-ascii?Q?5gHtwYQaWN6TQLjCpxym1CZy32dJSaKz7cviYhLZbJa3ieSYCUBVOf3bf3Ap?= =?us-ascii?Q?0RtpIL2uvPz5IRVC9chwMuJCRbdICItHRCsa5Eat3fOjp6sL2XdXTTQfFUqe?= =?us-ascii?Q?fQbxj3nlsYtvj9Gdri1My1dzoLyEVx8FFP6bKBKHfpuCW6jB9ohGsy+fBCrv?= =?us-ascii?Q?BYnszt3F3urnsBzyI4xywPZ9GB4FN4c7hgCq2OSn57eIcGhOUaybktntPiKd?= =?us-ascii?Q?fbq3veW3zkoL5ZkmWQ5JM0jmYyCrXc1cwk4/3VfcWiVncLZeWuDD1WPFbKug?= =?us-ascii?Q?3McXAZYM6I02zCRiBfSlKdFPhkYQdVRjvKLxDocShXxEJL8Fx3YKmSdqy78m?= =?us-ascii?Q?P/F8PTKrZEaL6LLJEyCerMG0PQkSGcKD0pRU0H0yRL9cJv2ka3NDbEEFnhOe?= =?us-ascii?Q?oHVAj1A3KgV0felTRoU86jHSY6bxxFkUpFbvgZgEpKLgDMjuENZYlnzjI4ou?= =?us-ascii?Q?/oNewcMKEqPecz2E9W5ec9CE1nFPQrEYV4n5+Yw32fboXg58rZgeGWd+rm3m?= =?us-ascii?Q?zoYcoHUNQrC9rInN7tqLQstXaiGZ1Bo3+nbn1UZbvAUEiTswu6Vs3u8dTsK2?= =?us-ascii?Q?iBBgxzea8ZZfBAL3jipSqYK4yd/TN7X0QK+BUYG1LpcbMd3o4Om1csUwrKHP?= =?us-ascii?Q?ZricSHWz0kChPg3qQZFzLHtiv1Izl3DtpWyQjFmKRmMNYUQsTLSyp5sCLmV5?= =?us-ascii?Q?5EiI50ahQThoA2MJ4lznGrweNKB7WbtA2MBf3s04Se2Vbs8jUVzN18U/GBsc?= =?us-ascii?Q?yBeoPZsL+AsGnMuHeD1Ui/GTD+BqfgKM4YD00Czd0xh+6cMaBwvlclU5yxaj?= =?us-ascii?Q?1PZWjVodIPRDOcex1xu/fWbbOvoDet03FTiEyeEycWf3xIrICIKKONk9PcLx?= =?us-ascii?Q?xdxZ8YwGetZfzFChk5c1hzeP9Fko7lFFn5X4?= 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:(13230040)(1800799024)(82310400026)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:49:09.6921 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 89c9c659-cce0-47a1-fda4-08dda46a09f9 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: BN2PEPF000055DB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4223 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749153055818116600 Content-Type: text/plain; charset="utf-8" ... back into bootfdt.c These will be required by x86 later on to detect modules in the early scan = of the FDT. They are independent of bootinfo, so it's cleaner for them to exis= t in a separate file. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- xen/common/device-tree/Makefile | 1 + xen/common/device-tree/bootfdt.c | 97 ++++++++++++++++++++++++ xen/common/device-tree/bootinfo-fdt.c | 104 -------------------------- 3 files changed, 98 insertions(+), 104 deletions(-) create mode 100644 xen/common/device-tree/bootfdt.c diff --git a/xen/common/device-tree/Makefile b/xen/common/device-tree/Makef= ile index 8a3f2be89e..8abc069c4b 100644 --- a/xen/common/device-tree/Makefile +++ b/xen/common/device-tree/Makefile @@ -1,3 +1,4 @@ +obj-y +=3D bootfdt.init.o obj-y +=3D bootinfo-fdt.init.o obj-y +=3D bootinfo.init.o obj-y +=3D device-tree.o diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/boot= fdt.c new file mode 100644 index 0000000000..6acf83d197 --- /dev/null +++ b/xen/common/device-tree/bootfdt.c @@ -0,0 +1,97 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#include +#include +#include +#include + +uint32_t __init device_tree_get_u32(const void *fdt, int node, + const char *prop_name, uint32_t dflt) +{ + const struct fdt_property *prop; + + prop =3D fdt_get_property(fdt, node, prop_name, NULL); + if ( !prop || prop->len < sizeof(uint32_t) ) + return dflt; + + return fdt32_to_cpu(*(const uint32_t*)prop->data); +} + +int __init device_tree_for_each_node(const void *fdt, int node, + device_tree_node_func func, + void *data) +{ + /* + * We only care about relative depth increments, assume depth of + * node is 0 for simplicity. + */ + int depth =3D 0; + const int first_node =3D node; + uint32_t address_cells[DEVICE_TREE_MAX_DEPTH]; + uint32_t size_cells[DEVICE_TREE_MAX_DEPTH]; + int ret; + + do { + const char *name =3D fdt_get_name(fdt, node, NULL); + uint32_t as, ss; + + if ( depth >=3D DEVICE_TREE_MAX_DEPTH ) + { + printk("Warning: device tree node `%s' is nested too deep\n", + name); + continue; + } + + as =3D depth > 0 ? address_cells[depth-1] : DT_ROOT_NODE_ADDR_CELL= S_DEFAULT; + ss =3D depth > 0 ? size_cells[depth-1] : DT_ROOT_NODE_SIZE_CELLS_D= EFAULT; + + address_cells[depth] =3D device_tree_get_u32(fdt, node, + "#address-cells", as); + size_cells[depth] =3D device_tree_get_u32(fdt, node, + "#size-cells", ss); + + /* skip the first node */ + if ( node !=3D first_node ) + { + ret =3D func(fdt, node, name, depth, as, ss, data); + if ( ret !=3D 0 ) + return ret; + } + + node =3D fdt_next_node(fdt, node, &depth); + } while ( node >=3D 0 && depth > 0 ); + + return 0; +} + +void __init device_tree_get_reg(const __be32 **cell, uint32_t address_cell= s, + uint32_t size_cells, paddr_t *start, + paddr_t *size) +{ + uint64_t dt_start, dt_size; + + /* + * dt_next_cell will return uint64_t whereas paddr_t may not be 64-bit. + * Thus, there is an implicit cast from uint64_t to paddr_t. + */ + dt_start =3D dt_next_cell(address_cells, cell); + dt_size =3D dt_next_cell(size_cells, cell); + + if ( dt_start !=3D (paddr_t)dt_start ) + { + printk("Physical address greater than max width supported\n"); + WARN(); + } + + if ( dt_size !=3D (paddr_t)dt_size ) + { + printk("Physical size greater than max width supported\n"); + WARN(); + } + + /* + * Xen will truncate the address/size if it is greater than the maximum + * supported width and it will give an appropriate warning. + */ + *start =3D dt_start; + *size =3D dt_size; +} diff --git a/xen/common/device-tree/bootinfo-fdt.c b/xen/common/device-tree= /bootinfo-fdt.c index 195249f700..695c4bfc49 100644 --- a/xen/common/device-tree/bootinfo-fdt.c +++ b/xen/common/device-tree/bootinfo-fdt.c @@ -109,39 +109,6 @@ static bool __init device_tree_is_memory_node(const vo= id *fdt, int node, return true; } =20 -void __init device_tree_get_reg(const __be32 **cell, uint32_t address_cell= s, - uint32_t size_cells, paddr_t *start, - paddr_t *size) -{ - uint64_t dt_start, dt_size; - - /* - * dt_next_cell will return uint64_t whereas paddr_t may not be 64-bit. - * Thus, there is an implicit cast from uint64_t to paddr_t. - */ - dt_start =3D dt_next_cell(address_cells, cell); - dt_size =3D dt_next_cell(size_cells, cell); - - if ( dt_start !=3D (paddr_t)dt_start ) - { - printk("Physical address greater than max width supported\n"); - WARN(); - } - - if ( dt_size !=3D (paddr_t)dt_size ) - { - printk("Physical size greater than max width supported\n"); - WARN(); - } - - /* - * Xen will truncate the address/size if it is greater than the maximum - * supported width and it will give an appropriate warning. - */ - *start =3D dt_start; - *size =3D dt_size; -} - static int __init device_tree_get_meminfo(const void *fdt, int node, const char *prop_name, u32 address_cells, u32 size_cell= s, @@ -202,77 +169,6 @@ static int __init device_tree_get_meminfo(const void *= fdt, int node, return 0; } =20 -uint32_t __init device_tree_get_u32(const void *fdt, int node, - const char *prop_name, uint32_t dflt) -{ - const struct fdt_property *prop; - - prop =3D fdt_get_property(fdt, node, prop_name, NULL); - if ( !prop || prop->len < sizeof(uint32_t) ) - return dflt; - - return fdt32_to_cpu(*(const uint32_t*)prop->data); -} - -/** - * device_tree_for_each_node - iterate over all device tree sub-nodes - * @fdt: flat device tree. - * @node: parent node to start the search from - * @func: function to call for each sub-node. - * @data: data to pass to @func. - * - * Any nodes nested at DEVICE_TREE_MAX_DEPTH or deeper are ignored. - * - * Returns 0 if all nodes were iterated over successfully. If @func - * returns a value different from 0, that value is returned immediately. - */ -int __init device_tree_for_each_node(const void *fdt, int node, - device_tree_node_func func, - void *data) -{ - /* - * We only care about relative depth increments, assume depth of - * node is 0 for simplicity. - */ - int depth =3D 0; - const int first_node =3D node; - u32 address_cells[DEVICE_TREE_MAX_DEPTH]; - u32 size_cells[DEVICE_TREE_MAX_DEPTH]; - int ret; - - do { - const char *name =3D fdt_get_name(fdt, node, NULL); - u32 as, ss; - - if ( depth >=3D DEVICE_TREE_MAX_DEPTH ) - { - printk("Warning: device tree node `%s' is nested too deep\n", - name); - continue; - } - - as =3D depth > 0 ? address_cells[depth-1] : DT_ROOT_NODE_ADDR_CELL= S_DEFAULT; - ss =3D depth > 0 ? size_cells[depth-1] : DT_ROOT_NODE_SIZE_CELLS_D= EFAULT; - - address_cells[depth] =3D device_tree_get_u32(fdt, node, - "#address-cells", as); - size_cells[depth] =3D device_tree_get_u32(fdt, node, - "#size-cells", ss); - - /* skip the first node */ - if ( node !=3D first_node ) - { - ret =3D func(fdt, node, name, depth, as, ss, data); - if ( ret !=3D 0 ) - return ret; - } - - node =3D fdt_next_node(fdt, node, &depth); - } while ( node >=3D 0 && depth > 0 ); - - return 0; -} - static int __init process_memory_node(const void *fdt, int node, const char *name, int depth, u32 address_cells, u32 size_cells, --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749153093; cv=pass; d=zohomail.com; s=zohoarc; b=fcmaoWMeb9mIMQN3HaEpGIUXp/D/cKDMJqxJKDA+2sG2conxOJSL7b5OXe/8TEgJbKnQkhLQ8HhojSpuWooBj2ASpJRky0W5TdumRiRm3JyTXRAUarxSCM7hcpKBteqGYqQ6xMs51uDNIJhHfp7pgSStANoeCRrBVRu/liJx8pg= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749153093; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=i8prgYMg1Iae8KvOYuV1o/xOVsXEhepIuqEAO+9pqk0=; b=W04126SfoM6hfVjOkD66zKuQfD+iFxMIXPpiD/k26jd3F7OxEaL1OILMvcRKBtxTXRjqzNK6CZBFRNpVrwCOV9HqrqdlqLHlIr5j5VSo6urGNiOOJWH9Iqn6aM7m7sV0S1oq4aY3FSpC4pcIvtKyH448/kWjPdtEqPJKaVrtOqQ= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 174915309326234.530013236574746; Thu, 5 Jun 2025 12:51:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007530.1386847 (Exim 4.92) (envelope-from ) id 1uNGcR-0002FL-Uo; Thu, 05 Jun 2025 19:51:19 +0000 Received: by outflank-mailman (output) from mailman id 1007530.1386847; Thu, 05 Jun 2025 19:51:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGcR-0002FB-RP; Thu, 05 Jun 2025 19:51:19 +0000 Received: by outflank-mailman (input) for mailman id 1007530; Thu, 05 Jun 2025 19:51:18 +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 1uNGaR-0002tD-St for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:49:15 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061b.outbound.protection.outlook.com [2a01:111:f403:2415::61b]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 285d73b9-4246-11f0-a300-13f23c93f187; Thu, 05 Jun 2025 21:49:15 +0200 (CEST) Received: from BL1PR13CA0130.namprd13.prod.outlook.com (2603:10b6:208:2bb::15) by CH3PR12MB9080.namprd12.prod.outlook.com (2603:10b6:610:1a7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Thu, 5 Jun 2025 19:49:10 +0000 Received: from BN2PEPF000055DB.namprd21.prod.outlook.com (2603:10b6:208:2bb:cafe::1c) by BL1PR13CA0130.outlook.office365.com (2603:10b6:208:2bb::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.17 via Frontend Transport; Thu, 5 Jun 2025 19:49:10 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DB.mail.protection.outlook.com (10.167.245.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:49:09 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:49:03 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 285d73b9-4246-11f0-a300-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xormJYxutVFXv21/aq/SfW1E4oU0hX6Nvvf1gRdaBgwixDt5a8Bnhn2gOqFYAQKQjAkszqondgmfQGrmBdnmIaUAAkzCV+G+yUS3SkqvqY/qRXIKQ2I3VpfbbTuyJ0uZ1NJkP7n7dwRE4w97V3HNxcSNa/xnunnq4Puvzp8Vy02Ptzm2C7UhTlVHZdFrSaRxiqL3Y/wjsknnpMgoarbmt5xiPIx4DF+egvcBxk3PAGf5KtFEOLDTKocg3A6pRNKS4j6k2SxGCSAWftWPn7vJPDPlo4qzxccYiLT6/B0N77twyu9QPu0tKcJzkfayUJqFp+g+aLEQRlxrhtu6lxBqkQ== 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=i8prgYMg1Iae8KvOYuV1o/xOVsXEhepIuqEAO+9pqk0=; b=OfXAtYuskj1trl3R1JoXrG/2hCvkueDAnLSB/tuYP+t5eqFUkOzzZYZtD4F67nq3MkoIlH0/rFnwMHW6cEUIQwEoz2jyi1wFAlHz3RqzcJV0mqKWVggdHg1V6Adqsau5DkQfAh6+/MpiSxZdR3Y9/4BHfQhNr9S5kfq7EsXUyuJ9TFBBsA2/olf2zBZr0rI8+XV+QSccHabtP6MVKqbwIOIUlQoUQ/drN64c5k0uPy72ATl/OOVulORHnQhNKIJu7jYG+qw+Mw5vdJlIzdFsIVJoOXtxNwGweawLHyhjkuRWxocP/Y6TZX7zfsJ1e4JvlMM+CeopVvqHBOXSXDIwqw== 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 (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=i8prgYMg1Iae8KvOYuV1o/xOVsXEhepIuqEAO+9pqk0=; b=yk+vgjtYsTZ7s41tgdKBEMD84kBNDc6fVM0HEaidLADsC6Wy2dTCJy1NCY4FmqVznccsUSFuJ1zfCW2HVEwO446JCUHwKjFR7ncCr94N/niaGy2Oj2AuVjJ/MKl/1fkXnuHm6r8FALnQII2HJ68meYFjQJOahkQfWNeJZj3dwFs= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Daniel P. Smith" Subject: [PATCH v2 12/15] xen/dt: Extract helper to map nodes to module kinds Date: Thu, 5 Jun 2025 21:48:04 +0200 Message-ID: <20250605194810.2782031-13-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DB:EE_|CH3PR12MB9080:EE_ X-MS-Office365-Filtering-Correlation-Id: 096e87a5-0baf-44b1-469e-08dda46a0a27 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Fpi1ABCaJD/TpIuI/nmDMDQAEIkF2wehtiXNEKwx6HTv0LvXWQPLu7Zrd+Jn?= =?us-ascii?Q?Y2bzzA7V4iYwicj7EjCrP6p0psV9mjcVJuHKTpY/MwcGKstNSHmi3R8/TLde?= =?us-ascii?Q?CyCW5mkVTPoI3Dh8346wyJU/wS3VJDR9GfBfm9JXMfpIX3EhYByJR3sug5Kz?= =?us-ascii?Q?vLESLoig+m314MXIflhTBeMe+7GP/cXqFbMmr6KeC24CRNYZeroLr6P8oTYZ?= =?us-ascii?Q?13Lcw801qcUkEaNai93aNhQOkRZ9R/uYrZ2OnvWvR5JBtDadX0ovVbO1Gjm3?= =?us-ascii?Q?F/ly7xkyHmGYeq0hJjYc34gyeiTHy7mK6esr9GYDjlA2iJu1eFJIhAUwUpFA?= =?us-ascii?Q?j4tbvl73RYX605TindMonIKXxYBx2c6ebhpoRTxaYozZJstYKxvwxxDzIZBp?= =?us-ascii?Q?Oq1l8plYSjVLajfW05stCvxZHm/Ipm/4Ahnn53alg5v2Ubxlz+Xi0xtweCGk?= =?us-ascii?Q?qPqiWQawWV2c0o9JlCbX+A2OOvmBQNso6VDWr0jNjnyYNKqf0bfBhOenop1W?= =?us-ascii?Q?hWa8UJHx6jVuDCuhOfrD8plA4xYokXKqjZAfwQOgJCmrfO2+IxRIKbXS27m3?= =?us-ascii?Q?lWywvWOGb85LnRpLWBPdJ1G13FbqI46dOE9cnqGlMFxBmR54Gu4vqgRjrTEG?= =?us-ascii?Q?w1wNjJTktF+kUaFlLh8iS7mAUlV7B4bbZ/8Smjx4seRcOi7foClfmVVoX2te?= =?us-ascii?Q?7X6qFFaWqnpdaa/34SwlC9tVQetYmApCEH8goAhk37xRogU6HzAskaYK5+3d?= =?us-ascii?Q?eYx8M6oW3gmPUjdI7Xo6RP69BZHXm9gLOizNUWDBPSdamSzjyPJoYfK0UlkH?= =?us-ascii?Q?DrVUtN8jqGQiIDQJdF7f0W+z5rIzgzA9KNbV+J3/z8Dk2BtrO4lAN29bGPHX?= =?us-ascii?Q?+sQjjBXdEf9iNZJQ6ck3knxo9ykVtwTeejUQLo9WQswi7eGxrLBrNP/xEjCw?= =?us-ascii?Q?/P+Xr5EeVGKRZXdCkRuDv2/FiZihkvqk62sAyzQyW74WCSkGWbaV0Zllr9TH?= =?us-ascii?Q?YbDw+mgS1NwAObHhc4Wlwxa/VPMIaInTUoqkrn7qjTLD51+QbtLZ/ATk5Tyk?= =?us-ascii?Q?0XHKSxw7F4Zc/poN2bvKFSReb730I7k8zbeBmG4D3GlhhBeRAZ//HLuZlXdj?= =?us-ascii?Q?V7NmbmvM/0Gp+MXERWJYZVIjgcPimF1o3C1+hWRZi5D8ggceH5yqIM8HHP2p?= =?us-ascii?Q?BCXqj3DQjZHhCc9sc5Q6W0j1YcIjHHRUyX29oBEWJ7vgVqGy7O/S5npHJXij?= =?us-ascii?Q?y/SeImO8p7t+Yd4AehgoatZgFwCwn4nEPvh7C1hasL1yolSziZh1eFR1I/KX?= =?us-ascii?Q?VDzUG5c1w3h/o3GZu+/f+OpJM1Y35lMbqyzIbF5XZcgPq0fAXCFjA0ZrUCCi?= =?us-ascii?Q?ny5IjW+djRJmAc4rATzTsJ4P3diI4j9X1CrFWX2tzciIIeop3g2vOp25OBS6?= =?us-ascii?Q?Cbsf1IRk74pqvNd61k59V/4Prm+XKwJvr764rP75r2NkrcSXQyWDjUBo227l?= =?us-ascii?Q?p6WYPS1FFLPsm6HtCEPj5JljE/TUkQEQFAwJ?= 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:(13230040)(1800799024)(36860700013)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:49:09.9891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 096e87a5-0baf-44b1-469e-08dda46a0a27 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: BN2PEPF000055DB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9080 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749153094509116600 Content-Type: text/plain; charset="utf-8" This will be required later by x86 code in order to do early identification of boot modules when booting off a DTB. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- xen/common/device-tree/bootfdt.c | 18 ++++++++++++++++++ xen/common/device-tree/bootinfo-fdt.c | 16 +--------------- xen/include/xen/bootfdt.h | 7 +++++++ 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/boot= fdt.c index 6acf83d197..474d719d2f 100644 --- a/xen/common/device-tree/bootfdt.c +++ b/xen/common/device-tree/bootfdt.c @@ -4,6 +4,24 @@ #include #include =20 +bootmodule_kind __init fdt_node_to_kind(const void *fdt, int node) +{ + if ( fdt_node_check_compatible(fdt, node, "xen,linux-zimage") =3D=3D 0= || + fdt_node_check_compatible(fdt, node, "multiboot,kernel") =3D=3D 0= ) + return BOOTMOD_KERNEL; + if ( fdt_node_check_compatible(fdt, node, "xen,linux-initrd") =3D=3D 0= || + fdt_node_check_compatible(fdt, node, "multiboot,ramdisk") =3D=3D = 0 ) + return BOOTMOD_RAMDISK; + if ( fdt_node_check_compatible(fdt, node, "xen,xsm-policy") =3D=3D 0 ) + return BOOTMOD_XSM; + if ( fdt_node_check_compatible(fdt, node, "multiboot,device-tree") =3D= =3D 0 ) + return BOOTMOD_GUEST_DTB; + if ( fdt_node_check_compatible(fdt, node, "multiboot,microcode") =3D= =3D 0 ) + return BOOTMOD_MICROCODE; + + return BOOTMOD_UNKNOWN; +} + uint32_t __init device_tree_get_u32(const void *fdt, int node, const char *prop_name, uint32_t dflt) { diff --git a/xen/common/device-tree/bootinfo-fdt.c b/xen/common/device-tree= /bootinfo-fdt.c index 695c4bfc49..20821e9ee8 100644 --- a/xen/common/device-tree/bootinfo-fdt.c +++ b/xen/common/device-tree/bootinfo-fdt.c @@ -236,21 +236,7 @@ static void __init process_multiboot_node(const void *= fdt, int node, =20 cell =3D (const __be32 *)prop->data; device_tree_get_reg(&cell, address_cells, size_cells, &start, &size); - - if ( fdt_node_check_compatible(fdt, node, "xen,linux-zimage") =3D=3D 0= || - fdt_node_check_compatible(fdt, node, "multiboot,kernel") =3D=3D 0= ) - kind =3D BOOTMOD_KERNEL; - else if ( fdt_node_check_compatible(fdt, node, "xen,linux-initrd") =3D= =3D 0 || - fdt_node_check_compatible(fdt, node, "multiboot,ramdisk") = =3D=3D 0 ) - kind =3D BOOTMOD_RAMDISK; - else if ( fdt_node_check_compatible(fdt, node, "xen,xsm-policy") =3D= =3D 0 ) - kind =3D BOOTMOD_XSM; - else if ( fdt_node_check_compatible(fdt, node, "multiboot,device-tree"= ) =3D=3D 0 ) - kind =3D BOOTMOD_GUEST_DTB; - else if ( fdt_node_check_compatible(fdt, node, "multiboot,microcode") = =3D=3D 0 ) - kind =3D BOOTMOD_MICROCODE; - else - kind =3D BOOTMOD_UNKNOWN; + kind =3D fdt_node_to_kind(fdt, node); =20 /** * Guess the kind of these first two unknowns respectively: diff --git a/xen/include/xen/bootfdt.h b/xen/include/xen/bootfdt.h index a87b5212a6..13d19562c7 100644 --- a/xen/include/xen/bootfdt.h +++ b/xen/include/xen/bootfdt.h @@ -115,4 +115,11 @@ uint32_t device_tree_get_u32(const void *fdt, int node, void device_tree_get_reg(const __be32 **cell, uint32_t address_cells, uint32_t size_cells, paddr_t *start, paddr_t *siz= e); =20 +/* + * Probe an FDT node thought to be a boot module to identify its kind. + * + * If correctly identified, returns the detected kind, otherwise BOOTMOD_U= NKNOWN + */ +bootmodule_kind fdt_node_to_kind(const void *fdt, int node); + #endif /* XEN_BOOTFDT_H */ --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749153033; cv=pass; d=zohomail.com; s=zohoarc; b=auG5b9jsHrfuWaD7XPHwKh1wuSM5FPcJdqK3rb8U3k19d/xXaWovtIigdt2hOQGWNNSzKuxazm/a3tdsmSUStpm46TtXjLKyUcRwd92UAaRUACQ4BhoBtqoizpjg1oUQzvaCsJq7Yh5lo6k1q2fXwIiBbqiyEZfTCvlRD42auSg= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749153033; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=brxUSyWoWAWqxgYUG8qaIMM7Yyx7/AEhfufohTwOIXw=; b=XrRbVTgGMNuSBQ2UtSwQKVE06tAVOCOQ7woBksf1YdJi76Dg+uZANAqodVkRx2LtkzFe+ADjSB9R6u+tlst3A/E5BHVOfkdw3ALvyayPFtme2MgUnRlpyyvXvsU8ysyEQC8KhVIViVhX4hIJWLaxAeYAPF8zi2GoC/WLRhwgW7M= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749153033815901.0616875463671; Thu, 5 Jun 2025 12:50:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007485.1386817 (Exim 4.92) (envelope-from ) id 1uNGbW-0000CF-58; Thu, 05 Jun 2025 19:50:22 +0000 Received: by outflank-mailman (output) from mailman id 1007485.1386817; Thu, 05 Jun 2025 19:50:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGbW-0000C8-1a; Thu, 05 Jun 2025 19:50:22 +0000 Received: by outflank-mailman (input) for mailman id 1007485; Thu, 05 Jun 2025 19:50:20 +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 1uNGbU-00009i-N4 for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:50:20 +0000 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2060d.outbound.protection.outlook.com [2a01:111:f403:2406::60d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4e66e888-4246-11f0-b894-0df219b8e170; Thu, 05 Jun 2025 21:50:19 +0200 (CEST) Received: from BL1PR13CA0125.namprd13.prod.outlook.com (2603:10b6:208:2bb::10) by BL1PR12MB5947.namprd12.prod.outlook.com (2603:10b6:208:39a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.33; Thu, 5 Jun 2025 19:50:10 +0000 Received: from BN2PEPF000055DB.namprd21.prod.outlook.com (2603:10b6:208:2bb:cafe::3e) by BL1PR13CA0125.outlook.office365.com (2603:10b6:208:2bb::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.34 via Frontend Transport; Thu, 5 Jun 2025 19:49:10 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DB.mail.protection.outlook.com (10.167.245.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:49:10 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:49:04 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 4e66e888-4246-11f0-b894-0df219b8e170 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IZK944V3yBHApVJdZkCyK9nw9HInaDPiZKilwlKaw7UGEKFC+dEMLvS/SN3C8X6WYAjRaXy2cmFuKsuMdFticp4nBdk4t3hT7PR5n6eJG9hHMJthJTQxWwjMlCeUKBJ6ph5gTIg3eVV5Bo8RmyaYeVTMmNaGaypcVzphL2sG65gD4e2ZXQzj3OeOVjdlSp4MJXTQ4LREpXn7uPWJD130uAG0HpYSLC77xsyzTZQFkB78Dj10lfZTycBv9EhpAdT0oc9pE73iUVYK4GsOahomOdH1OlWMHUbff43RL9UH3ROm7Itso/IIu2R38dA/FmgkZNHMJyCLUmeOcJgdRbl69w== 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=brxUSyWoWAWqxgYUG8qaIMM7Yyx7/AEhfufohTwOIXw=; b=jL1ZPRRUjcDMvNYoil/hZsQ14reRfD3OWuYNUxM9dK5puA7A34IsP2HniQiVyAHEPAvMQo23rDMndAFqPYdl1CDYVksZzCJZk0q8m5iDFTZJXfCJLN3BJa4UfCWEpG5oEvzlJj9zcC84YiK9QVz3w6/K3nn1n6GZA2D+5RnZWlGewyH1D18fxU8KeiofvIeCT7Z4k3SWDWwDnybgYuWlmLl9qVW/HmBScj+MdUEeb8RoJk7z95yYTvGnNxKCz/Z75ejNsh20pKyGBFa4RiEKHRrf5vJwieVJ3iRiVf0ODsWtYMYelq76+GecBthDHHW2VmXZVrPnHz4IAF2h5iNKvg== 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 (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=brxUSyWoWAWqxgYUG8qaIMM7Yyx7/AEhfufohTwOIXw=; b=Epz/+jZNSAX+VWNpa3IRKEBg81zXpzk06tE7BnZXxKXvv1XtPYeJBWnSC0saLm9Aorrka1NX6WaUE3LCgsTxjUs78HT7jkqY+0jTVpLqw1J+9t+rLn3mdrzp+PS7WUiIWb7TMjQNW4+EFDqsh+aJPSCo2mt1M5uStdMZPEfhLII= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Daniel P. Smith" Subject: [PATCH v2 13/15] xen/dt: ifdef out DEV_DT-related bits from device_tree.{c,h} Date: Thu, 5 Jun 2025 21:48:05 +0200 Message-ID: <20250605194810.2782031-14-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DB:EE_|BL1PR12MB5947:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e4c0063-8ef4-4ba8-5d10-08dda46a0a8b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?CcT0X+hGUGdt3k9SU8KUcL6xYFyNMFGzLj0B4lUNmtkGCPsjZqgcs4col1Gk?= =?us-ascii?Q?nfbQ3O/ZcX30a9EY1WNmUauvOk6UWHZD3mlztmobHrePSE55R8J3hHnBf7Rh?= =?us-ascii?Q?bQ6L4X1DbVod7F9yBR2Ko7w+oymZzSCvKEf75HltYxsyOwqc/kv67CJGxvs7?= =?us-ascii?Q?ZJX0bIZWdJhQHGQAGakx7/fScfwZz6nhJd1D8YH2h37yFnZV0iMJun9jE7YX?= =?us-ascii?Q?FLuBvy2U9finDwQ4ZCUxOprt8Pwe1Jr92hc71+f7fvDFS1/WGFtRNuoxI+8a?= =?us-ascii?Q?BtMVmZTR3RAGYqwMIarsSg+tbob3jV+eKK/rEJqfD3yH5GGrXGScaWsLC8M/?= =?us-ascii?Q?SzcEQ5XSrzjIFtaNOb0x9zu8Ron+QkqGADSUFsZPQ5rT30yyOKqTx82fK+eP?= =?us-ascii?Q?lvopN38HFrHDrnWxpxzoj0dQRS1HyRRe2vuD3vhpdeUOlpF5O6pywQyvRIUu?= =?us-ascii?Q?7I/B5SplFcUwaYIg0ja7zvzfynrXZCp6Y6MO0xIo+OV1SXMREBwdFqBXB2zQ?= =?us-ascii?Q?2MGzHzf0tQ0GFfLBaCdT5DsEAiVWm6ypTgY8pwqgWTDc5JcCRJduXgIxN2jU?= =?us-ascii?Q?qx8lHf8dLHXZPM/PCHg9kwTf+6KAEQAigquAZb6sg3xVutJyp72EGnimbSYB?= =?us-ascii?Q?qF2ZJ4Dd+BbqtTR+sFMcbuNzsQtVJKp1hrFemukL3yKo6fIVZgN/16XvL3Oy?= =?us-ascii?Q?ChNFZ7KkC/HPrGGO3mOJauzAVPTjv+jA57b0xfwGZg2medZadul0pdTZyqZD?= =?us-ascii?Q?1l238RQ8OKmRPIRqyML8bLf1tds1wZFDvgxuKi86H6iAtEPUfP3UkLWORB/2?= =?us-ascii?Q?ENf5jWGCoUq24sKLQLiFiVdOnpb6+AVvmGMRepoM6LBLYRlzqnj5aCfEoS/N?= =?us-ascii?Q?RroGgGh0HJzPIThtTUbWO3Q5zqtqREWZWfckEmy6Qe1oXDj3Bn9dbRWKAxKI?= =?us-ascii?Q?e4Fm+9jxpVco+G0vXI+kQXvRs+Wy5BPHiHXQ/BmQcZJJ2T/oYAosbtV1KjMv?= =?us-ascii?Q?OkoMQK6vwg0WU8QQa3wUvZzfUjZlm/F2FZSDdUPVBIsiuOEI0KA3ayju75RR?= =?us-ascii?Q?6TgEAgVUpg96wrOeGiJMlG0Ml0xKumF7PnQsk/5MsnXz8zUaiA5Cu+7Au18U?= =?us-ascii?Q?ejO2bFP3Jcw0cSwqZ2Hhu5Z9o/fwjxZcJEaqU5+CdZBxUajRMaETdRN4RRou?= =?us-ascii?Q?vYSJxDI6Vr7OphqtsP6qElBNwQKVyY0tF49jixdfDwNlFqQrZclhLhVN3wnQ?= =?us-ascii?Q?chCT4PJlx50S89AE2jSeLgky/L+jrvEZ8dqNKaje4O0BO6X66NBIiWbmwU2h?= =?us-ascii?Q?g87tvtdvjpGSwyoQq80HYvYxMhSLUTwJuFN0Qo343KTx5441rAd1QSYIWdIZ?= =?us-ascii?Q?rUimROQBXdPGqKoJ6Zn2BlqFJzekKbD59f8Dfy9oNEWstUp6UYb91Fm5JgYm?= =?us-ascii?Q?2wgrfRivGQSx5eT/A4uiOSI0mcFkELDsgAEWbCv7so3UTU8fY+VJmSFFLZzJ?= =?us-ascii?Q?i8lVzPmCuMCbWwQFPITmOgY2lqmqRxUkdGhe?= 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:(13230040)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:49:10.6453 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e4c0063-8ef4-4ba8-5d10-08dda46a0a8b 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: BN2PEPF000055DB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5947 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749153035690116600 Content-Type: text/plain; charset="utf-8" ... which means, device-tree.c stops requiring strictly CONFIG_HAS_DEVICE_T= REE and may function without it. Not a functional change on architectures that currently use these files, as they already select CONFIG_HAS_DEVICE_TREE. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- xen/common/device-tree/device-tree.c | 2 ++ xen/include/xen/device_tree.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/xen/common/device-tree/device-tree.c b/xen/common/device-tree/= device-tree.c index 886e6c7712..c8a9c0e46a 100644 --- a/xen/common/device-tree/device-tree.c +++ b/xen/common/device-tree/device-tree.c @@ -2028,9 +2028,11 @@ static unsigned long unflatten_dt_node(const void *f= dt, ((char *)pp->value)[sz - 1] =3D 0; dt_dprintk("fixed up name for %s -> %s\n", pathp, (char *)pp->value); +#ifdef CONFIG_HAS_DEVICE_TREE /* Generic device initialization */ np->dev.type =3D DEV_DT; np->dev.of_node =3D np; +#endif /* CONFIG_HAS_DEVICE_TREE */ } } if ( allnextpp ) diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 7d1c8bc305..641f24518d 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -109,9 +109,12 @@ struct dt_device_node { */ struct list_head domain_list; =20 +#ifdef CONFIG_HAS_DEVICE_TREE struct device dev; +#endif /* CONFIG_HAS_DEVICE_TREE */ }; =20 +#ifdef CONFIG_HAS_DEVICE_TREE #define dt_to_dev(dt_node) (&(dt_node)->dev) =20 static inline struct dt_device_node *dev_to_dt(struct device *dev) @@ -120,6 +123,7 @@ static inline struct dt_device_node *dev_to_dt(struct d= evice *dev) =20 return container_of(dev, struct dt_device_node, dev); } +#endif /* CONFIG_HAS_DEVICE_TREE */ =20 #define MAX_PHANDLE_ARGS 16 struct dt_phandle_args { --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749153088; cv=pass; d=zohomail.com; s=zohoarc; b=FBUVsrjqdO+xktdVmBiARffW4vtfCOAZ0sbA1hfRxuLNv+ND0iJdPn3tf/i1fMalQoN92trGWTJkEYZ2i7nvdspmghd2NK6hIDx+7xKzjqVKo6H9r9lcaI34iOP5q393FDl6QHDokXCaIu4QH85wgvtyKcfidSOeo76RkjOvcF8= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749153088; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gdndZEIM1HxoHu9OMJDmh4wFBWnq69aZLgl89O7wXQ8=; b=DJ6GpGHlk5tP/dIKSlfmJ3hTC1vYTpK+O1LjbLp+wNSCPGydbn1f9QHPtdqOkELadwqKgJC8z0juMbrM2zZKWGfOGISaQRQtUlqigVUxPdwlE1aKkdrBge3a+UfOf5qMgvkl56f1ETlTjwXqSZ7SiCj78qEmdb43qP8t62iy0fo= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749153088756323.39537518368195; Thu, 5 Jun 2025 12:51:28 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007531.1386852 (Exim 4.92) (envelope-from ) id 1uNGcS-0002If-CH; Thu, 05 Jun 2025 19:51:20 +0000 Received: by outflank-mailman (output) from mailman id 1007531.1386852; Thu, 05 Jun 2025 19:51:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGcS-0002HU-3O; Thu, 05 Jun 2025 19:51:20 +0000 Received: by outflank-mailman (input) for mailman id 1007531; Thu, 05 Jun 2025 19:51:19 +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 1uNGat-0002tD-TO for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:49:43 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20625.outbound.protection.outlook.com [2a01:111:f403:2414::625]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 39378f82-4246-11f0-a300-13f23c93f187; Thu, 05 Jun 2025 21:49:43 +0200 (CEST) Received: from BN9PR03CA0349.namprd03.prod.outlook.com (2603:10b6:408:f6::24) by IA1PR12MB6650.namprd12.prod.outlook.com (2603:10b6:208:3a1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.33; Thu, 5 Jun 2025 19:49:38 +0000 Received: from BN2PEPF000055DA.namprd21.prod.outlook.com (2603:10b6:408:f6:cafe::2b) by BN9PR03CA0349.outlook.office365.com (2603:10b6:408:f6::24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.27 via Frontend Transport; Thu, 5 Jun 2025 19:49:38 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DA.mail.protection.outlook.com (10.167.245.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:49:38 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:49:06 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 39378f82-4246-11f0-a300-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N8938yO0mVKFuKWFi7rxf9enYJSyo2gaPVFbb63KOvXODb5GiFQDyUvP6kx6afgJoP+REP6BpR71ros2PPqiSHO0hVpsF7B4fvngyA3eBojqxtXiKYaN6xOo3rve8HGTCO9LJ08uJ3UzhEt8O6VvFo9jm1AxqgvvtQSOezLcY9hgwCdz6RBMlRxOkwh8pl4U5hvgAeuHdnB8j/tH5kFx8FYkCexkHidt9bzmWCbxolMo0fuf+mt1zj6/Nvie8ZXzdzpgeCPYBkR076CXCJAQBl3Uo7WKfluzRWWXF5LlbUYvkLm3HmSTZVNEKawTpHcvPcV9diKGQxn6xhsk0QCsGA== 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=gdndZEIM1HxoHu9OMJDmh4wFBWnq69aZLgl89O7wXQ8=; b=gpbOMfTauuQiv6AUE7+ljh1bmECDN8eQqgqv1qRaSX+SSujkXAqtvWsFYoQqRTy/coO908dGZV7ytOQdckLjfe1a/2jsT2+A4wjV0aOIWa354NC59YD+CoIakRgMzCzW1T8Ro3lmYJcqKd75Sj4WkRb4Ttg47QIHi0LR0HWLrg+A6PpU+Soe/TyP3LN+jGAJSC3ufu0SFSl8mfh/LX5t1dn2cssm0dNpj4DFs1elvawIU3aIJRLgNwMbyxrVPxcdt2+2P+oJbVXzPQPCENI9uaOWOKV+b3NSYrOkcrGUADrbEWjcWDyiCsn39Ygoy+oyKng6fqLb5CvfNhLrmX3hpQ== 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 (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=gdndZEIM1HxoHu9OMJDmh4wFBWnq69aZLgl89O7wXQ8=; b=ZJ4jUrHeHkz2O3HBl0xvbdZf/ChwqPas1rOjb0SU11xVTf63cSOndKs40VIXK+3Xbi1/AdbYyUPsgyrD9Lm1C9P2YlON/9c7eo3xphMJ8Dbkxois5oMwrIpokjnf8NPGeM7p9oLfGEOMdhrjl35oO2IiHkFmajYpB1mbM7AIp+k= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , "Bertrand Marquis" , "Daniel P. Smith" Subject: [PATCH v2 14/15] xen/dt: Allow CONFIG_DOM0LESS_BOOT to include device-tree/ Date: Thu, 5 Jun 2025 21:48:06 +0200 Message-ID: <20250605194810.2782031-15-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DA:EE_|IA1PR12MB6650:EE_ X-MS-Office365-Filtering-Correlation-Id: b99fce7d-d344-409b-2887-08dda46a1b5d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?T/loZNKjtCnzwQmmvvxW34ZQfZoIIfAM711B7nVMHRAWVzcyNzyApAvX39aw?= =?us-ascii?Q?nGSPJ0OZR044qBhJCIFoGUKI7nen+dHGfe8VCsuiZ39EqvBHEU5jWZC3bQ9h?= =?us-ascii?Q?CFPJUc8FBBiVc7krjYbxo2egPAwZqaikQc8V6OAHqWs5qBwiEA2cdHtktmpg?= =?us-ascii?Q?f0asplYIraHhME8ZhwYiqQjHAQ2RoZDqaVs/pI7Ia7LOVfJrlHkNDXmFr+3N?= =?us-ascii?Q?/wy2UO9uinJKpVniEOlZ8AsBz7YEaePCPwuVWFyA8HzU8VmZIXmZjTb1FqFv?= =?us-ascii?Q?cdmKMvMdvSrbm9KHd8Ck1D1oIhD6KjefMcTts7NYmICQpt+d9uFtlQd4Fv16?= =?us-ascii?Q?RjXVtdWsa6J3oxkW43K+WsBSlVjLOF8kq8uk0EdTfoqN/BjcUWt4U9yb3n48?= =?us-ascii?Q?3wzepptsnsxcINoEoZ3eVr+YXj1X9fRHIIMCXSlLQnJkhflerW3HwGPyS96E?= =?us-ascii?Q?00iMBcO7lYvWCsaChXUdCa0WI36bghIdUlXqLC+KipbdAg5hVo+eyIWKHCdx?= =?us-ascii?Q?idIJnoQUV764jic/FLZcskUg3cdIBvJ6Yyfhd3nvKLDBPnfs7KpcRE2qDL5A?= =?us-ascii?Q?mnzGPcYlItCrZ5RtxX2zwhgL11jcP6y1eOQldQ81liyQXDpGqNc2N+42zRtc?= =?us-ascii?Q?MFoMh6xUV7hupYvsEYOe/EzQLwkFCNGrSihhImwtRE1RzZIMqS+vEqqLquu5?= =?us-ascii?Q?D3w2CHDdUwkm6zsG3aQtoGmK3Zs6HqCV4dFmT033KvhlXn5fbv0eCHAxumxO?= =?us-ascii?Q?V50TEjpiOsFf/rubkL3RPGJTWzCJCslsm617AAo48SsLuyVmf8YKSaOpTPaH?= =?us-ascii?Q?lFYC48k6e1rxtn1bWU8IajKDA+Dn1ywWN4Ve/pmdcFof/+XBTkEQO6aFzI2Q?= =?us-ascii?Q?8sC2P91M2l5PUBuXKGSS7Cz6Jjl625dWtapGtLdEmw2VCUQtuP12M7FufSSH?= =?us-ascii?Q?NjpvXdMetStevct7CIkl4dH6PhBgr6sK5AMDWud+jpqo4ze5XIyFRFU5QzKM?= =?us-ascii?Q?GsJC/raDFFjm13QY75K68lwcvBnu+vNOc1sr6+I7zbtXmYLSjYsqGnMDiHKj?= =?us-ascii?Q?/xfG4zlny1ePo0Mt/fqsnzuxANLEWyidxo1VZ7weWV6kaZbGmvYAwT1vryU/?= =?us-ascii?Q?xQZLSKMtNwCT4C4GzDyy94tKMItDQ3pxyk6KdIchuIWyi09pR9uRR/h/zE/4?= =?us-ascii?Q?Al708fxuN9t7Jm9VBYcdNv9mETY5dhqmiO5jEn5r9S32aoOy+l8kuNFG2U1z?= =?us-ascii?Q?RArnJxCcDYX6Czi0m77fjTO430ZtC+0JltsE6+iMsQiM5E2MjFXyxIneR4PL?= =?us-ascii?Q?RSgh5tqs1sejxNfAIl1B8KjeVFzLmPZ92viNC5eo9/CkgRZtWlRA2zRqAZ9v?= =?us-ascii?Q?IdVQuMbER4Vz34/FPUm/BPPHALQnC+EG2qNYl0FBe0yJiRiyW47l6Ydrtpl9?= =?us-ascii?Q?uE6kKZG9XqkikGCQMgg8aydBlnvDH3VewOQIPOFxY6Mw5sQNTb15smzmQt3b?= =?us-ascii?Q?tHKHk7P1cdfVgTnVsGk2N8JrDH3kCEbdOK0/?= 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:(13230040)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:49:38.8622 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b99fce7d-d344-409b-2887-08dda46a1b5d 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: BN2PEPF000055DA.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6650 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749153091203116600 Content-Type: text/plain; charset="utf-8" ... without CONFIG_HAS_DEVICE_TREE Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- xen/common/Kconfig | 1 + xen/common/Makefile | 2 +- xen/common/device-tree/Makefile | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/common/Kconfig b/xen/common/Kconfig index eece1370a3..5353874e87 100644 --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -14,6 +14,7 @@ config CORE_PARKING =20 config DOM0LESS_BOOT bool "Dom0less boot support" if EXPERT + select LIBFDT depends on HAS_DOM0LESS && HAS_DEVICE_TREE && DOMAIN_BUILD_HELPERS default y help diff --git a/xen/common/Makefile b/xen/common/Makefile index 98f0873056..2717c81f9c 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -8,7 +8,7 @@ obj-y +=3D cpu.o obj-$(CONFIG_DEBUG_TRACE) +=3D debugtrace.o obj-$(CONFIG_HAS_DEVICE_TREE) +=3D device.o obj-$(filter-out $(CONFIG_X86),$(CONFIG_ACPI)) +=3D device.o -obj-$(CONFIG_HAS_DEVICE_TREE) +=3D device-tree/ +obj-$(firstword $(CONFIG_HAS_DEVICE_TREE) $(CONFIG_DOM0LESS_BOOT)) +=3D de= vice-tree/ obj-$(CONFIG_IOREQ_SERVER) +=3D dm.o obj-y +=3D domain.o obj-y +=3D event_2l.o diff --git a/xen/common/device-tree/Makefile b/xen/common/device-tree/Makef= ile index 8abc069c4b..cc56f42df9 100644 --- a/xen/common/device-tree/Makefile +++ b/xen/common/device-tree/Makefile @@ -1,11 +1,11 @@ obj-y +=3D bootfdt.init.o -obj-y +=3D bootinfo-fdt.init.o -obj-y +=3D bootinfo.init.o -obj-y +=3D device-tree.o +obj-$(CONFIG_HAS_DEVICE_TREE) +=3D bootinfo-fdt.init.o +obj-$(CONFIG_HAS_DEVICE_TREE) +=3D bootinfo.init.o +obj-$(CONFIG_HAS_DEVICE_TREE) +=3D device-tree.o obj-$(CONFIG_DOMAIN_BUILD_HELPERS) +=3D domain-build.init.o obj-$(CONFIG_DOM0LESS_BOOT) +=3D dom0less-build.init.o obj-$(CONFIG_OVERLAY_DTB) +=3D dt-overlay.o -obj-y +=3D intc.o +obj-$(CONFIG_HAS_DEVICE_TREE) +=3D intc.o obj-$(CONFIG_DOMAIN_BUILD_HELPERS) +=3D kernel.o obj-$(CONFIG_STATIC_EVTCHN) +=3D static-evtchn.init.o obj-$(CONFIG_STATIC_MEMORY) +=3D static-memory.init.o --=20 2.43.0 From nobody Fri Oct 31 04:22:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1749153082; cv=pass; d=zohomail.com; s=zohoarc; b=J5T2OhJYhHYgmYpgZBVL2HI/rDdEWHtL+rRXlH8Ml9V/JeMDfHjhYXjkXVRUZeJz+nKXE9DXVTWkG046YcGg+1/7Mti63LLbPhhFBHQTeGYpfPq3Gne+jaFGXs3J5nKesxazExrl2qXvlsgi8oqcqw4tAlwUGbaKyqT1NZsNwgo= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749153082; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qBMHO1HIupXAcwfOdVU4/7q8edByJCbA+TOtQ6T2SUo=; b=IR0unN/33TyuEeb+96EGAtJ3dEKU33WwLmW4XqR2PiQai5a0p+SNBrQ7JbrQod18SHcnzNDbxlHr27uLtbGZ/sONDcsdbl5JVcRqW9gjlZASOUUZFW991wfJYpR7uPkpX4MuER4nX76p+tIG1//7DWhPFo+Pz1B7tuMZv5UGHus= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749153082771717.7978955389427; Thu, 5 Jun 2025 12:51:22 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1007518.1386836 (Exim 4.92) (envelope-from ) id 1uNGcL-0001mI-NP; Thu, 05 Jun 2025 19:51:13 +0000 Received: by outflank-mailman (output) from mailman id 1007518.1386836; Thu, 05 Jun 2025 19:51:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uNGcL-0001m9-Kl; Thu, 05 Jun 2025 19:51:13 +0000 Received: by outflank-mailman (input) for mailman id 1007518; Thu, 05 Jun 2025 19:51:12 +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 1uNGau-0002fZ-VD for xen-devel@lists.xenproject.org; Thu, 05 Jun 2025 19:49:44 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2061d.outbound.protection.outlook.com [2a01:111:f403:2414::61d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 39b5f8fa-4246-11f0-b894-0df219b8e170; Thu, 05 Jun 2025 21:49:43 +0200 (CEST) Received: from BN9PR03CA0353.namprd03.prod.outlook.com (2603:10b6:408:f6::28) by IA1PR12MB7615.namprd12.prod.outlook.com (2603:10b6:208:428::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Thu, 5 Jun 2025 19:49:39 +0000 Received: from BN2PEPF000055DA.namprd21.prod.outlook.com (2603:10b6:408:f6:cafe::5a) by BN9PR03CA0353.outlook.office365.com (2603:10b6:408:f6::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8722.31 via Frontend Transport; Thu, 5 Jun 2025 19:49:39 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF000055DA.mail.protection.outlook.com (10.167.245.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8835.2 via Frontend Transport; Thu, 5 Jun 2025 19:49:39 +0000 Received: from xcbagarciav01.xilinx.com (10.180.168.240) 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.2507.39; Thu, 5 Jun 2025 14:49:08 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 39b5f8fa-4246-11f0-b894-0df219b8e170 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dqrn+eRwFYb8IeyOs+q7asxyq4jvhOPsbC+AtByC6rA87zw7Vka68XAD09HuruPhVMK4xJ2+8PMHGgV6lagNVEdKYtVX03INFZWYsOpxe5GrVW1g5Hz9hxRW65Rfq2i79Fe+O0i16YsCTuaQfnHpfpCYqp8TsR6SgPQWE/YSggttQzL9Xw9c5tErDmRG9q4lIhdMRggTCrBeZ2+8NcnU/zof2kRiJ8LkK9KX+QOnfRiId8kLjF/kSTu4yahLzY9GqDSyEj+o0ojQxwxEFULx+MJHQ1YQXNWSBr4Y6DZYzJpX/RhyP468l8xnY7U39oIUeQqPv0gOsk/MsGH9BcQHiQ== 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=qBMHO1HIupXAcwfOdVU4/7q8edByJCbA+TOtQ6T2SUo=; b=TBUjHDIEzn2eHHxTNTmaEfOf8nvrbxqCkuuqpHk0vi6hRM2exHDL5aGDRqryg3oyZ7zBLMB/cOaTfKD1sEmoqIkCurMXAJQEOwhoTbGQ3BZePdmyE50rxNiH/f4j35BTSmn+u1TapGdJ4JoEtnxa3ACTgLTycpGmF2FVYxP71BrgZ9vA3YkMJmnP3LJqzQCQeXwl6dV8MKpFb8IwUZaggwvX0VN2AUsXLJexAsk7n79EuTTtdQnwmhpzPnA8joqVYVLvRV/9dPYDEhgo9KNOkseJN9NZiXO6yjuJywaaSEtbeuhE2+s4BpZKQNVcqZJZryB7VIr7Hdccp7QuJ2bv1A== 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 (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=qBMHO1HIupXAcwfOdVU4/7q8edByJCbA+TOtQ6T2SUo=; b=rdbGbY6FkvOOlr0ymnp3nYs3plHUd09dmFhPf1S5oYMEp/m0mE0Cb+iGigrb3pYlvc5QgA0SiYmhZaw44JP60iO5VunDWHOgAUgyfqPrHA5Eu+LBd49JcRKobhfFhrYVtwWKhn9C9f9ZQvDLh3N8ENFtB7HLcFJi66U7Xaxk+2Q= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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: Alejandro Vallejo To: CC: Alejandro Vallejo , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Anthony PERARD , Michal Orzel , "Julien Grall" , Stefano Stabellini , "Bertrand Marquis" , "Daniel P. Smith" Subject: [PATCH v2 15/15] kconfig: Allow x86 to pick CONFIG_DOM0LESS_BOOT Date: Thu, 5 Jun 2025 21:48:07 +0200 Message-ID: <20250605194810.2782031-16-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250605194810.2782031-1-agarciav@amd.com> References: <20250605194810.2782031-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DA:EE_|IA1PR12MB7615:EE_ X-MS-Office365-Filtering-Correlation-Id: e9760123-a68b-4eea-5822-08dda46a1b96 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?e1QfQJBTKobVhuf7KNjYIs6V/h4wodUoT4EfCGxWqV8k4/CKmVjKYHrn3rI2?= =?us-ascii?Q?H2PSLNUP15CySrvDWM3ANwUfozyCrjvZJAvumwkwBJmD3FogAiqrtctLSA7P?= =?us-ascii?Q?d4p+xSLUa0DeY/F/J8ARKW5X6JGaqg3GOy7TdPHorSxr/svPLGYtkUMaghEx?= =?us-ascii?Q?gnt/Fpi9Ku3Phe5CyWCX/WQlqrc9pvZbrIa26DNzJU5buIFjZ7eA1eI+hhKS?= =?us-ascii?Q?0K03Vvet2QteQu4lMXNYhmsDCn1cTARGkvD+HHKEYl5S4F+YrT4We6QpmKYf?= =?us-ascii?Q?Hi7Nhd9ih/gTA/MoqhldvYvbKe8xGdUnYRHC9PO4Z6YI0OTiASZdCCIM7TPX?= =?us-ascii?Q?stEvktKpb4mwolPUEGfYfX9n0QqPA/XTc30Yrb6jpFcOH5u1xIUwE51hsw/9?= =?us-ascii?Q?0o3L8tdEx6pUipzbnfRq0aal8Qlin9YX+O6dPWCorzaJnOCMvDjQ907nyKjI?= =?us-ascii?Q?/XHWlvhxan0LAvnGyIksA/BXNGaxSB2uBAXxi+UiRknuyuEdr9utonKuYzpX?= =?us-ascii?Q?Q25k52Kq1MMEuvakeVJNab96+EwXJCvgv79QZhVDIjdrVIUe3ts4wQWts6Fs?= =?us-ascii?Q?YyjbB42CkIye7UPlyqDPu/Zh9aV9kjluVxgZsX8NvLcWurF3yCMO+EcrcqsA?= =?us-ascii?Q?voMnkbXIWWkOLUBqwkb10U9QzwMZZrIXH6tAO1jVEd0+hXXWs4M9QICZHkO4?= =?us-ascii?Q?95dssUSrsfSvJZ7CRfyaH7zNGQ2qPg8z05Q/5u/KbDMlAerLXttEnzTZ8fWE?= =?us-ascii?Q?Alu9ZgG24xUMCvLzihBY0yHQjVJH8U2ZxZiENU7yqIqFrpx12TcnHwaZRzOs?= =?us-ascii?Q?oV/HaIg8JuFqSp6L1NcOFNVJVRklJROXI1paHICxV6KO52qA4dPUGmsGjF9Q?= =?us-ascii?Q?DSBMGX9cGlI/1vaDrI/bicCtjvZgTeIakDZSiep6sJb/4W2k5h5GypeipwnA?= =?us-ascii?Q?xBXN5Y40n0TIOlW8xWvWLHfHS6yBTrOu7fO8xpcTxml/YO3rba0QsJMSNVAK?= =?us-ascii?Q?B2aqioAsY/vWPgUp68uDqoPHo8j5UTUsrtg77Bv7i8dh90yKi09SCJRnXV8U?= =?us-ascii?Q?ZmlQaxhimCxuvpF+72YNUSU6RTA7/IkoSqDC2fJzl/fuyTASM5APNuM581fO?= =?us-ascii?Q?3605QWcvlaEGt6EKQpipCfthFqjtbc3qpqfDzFWXgjzYpEMT3Vxx1I/LPVE+?= =?us-ascii?Q?ZkcXXXn/TA0xmbSP1DxA9ugeVx5xlQqhqjtHgWNVJ3voNv4biAKW0KchLBrl?= =?us-ascii?Q?FkZ2qDxkuvVUjhaAkowt1DSNgaCS0nOKrogIIpbQBqEA19s23DFQ7Ez1i2xe?= =?us-ascii?Q?+Gr8XLkt9UOpObR6b1l8/VvRWZNfIhBh8QEL3BMps8rVrWVlzEo0nrgYVlEA?= =?us-ascii?Q?8ztF4Mpxkylfx+dH/KHCXF65cgqWQAU9cFJIIERE8w/ogT4yt1fEGxtxn+yN?= =?us-ascii?Q?6KLanifox63fIqQy91kK8gwm44fJzR5i1I3fAdgeKmdkY05lh8H1MPN4um6j?= =?us-ascii?Q?n4259CcMewz3QLSuStdFqqVSYoggpeRVS702?= 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:(13230040)(376014)(82310400026)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2025 19:49:39.2372 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9760123-a68b-4eea-5822-08dda46a1b96 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: BN2PEPF000055DA.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7615 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1749153084217116600 Content-Type: text/plain; charset="utf-8" Without picking CONFIG_HAS_DEVICE_TREE. In order to do that. Allow CONFIG_DOM0LESS_BOOT to enable a subset of the common/device-tree/ directory. x86 doesn't want dom0less-build.c, as that's tightly integrated still to the ARM way of building domains. Requires "unsupported" for the time being until all required patches make it through. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- v2: * (required on rebase) Add an explicit dependency on HAS_DEVICE_TREE for STATIC_MEMORY and STATIC_EVTCHN so they're not pulled-in. Could use !X86 as well. --- xen/arch/x86/Kconfig | 1 + xen/common/Kconfig | 12 +++++++----- xen/common/device-tree/Makefile | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 7afe879710..4344b4289c 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -18,6 +18,7 @@ config X86 select HAS_COMPAT select HAS_CPUFREQ select HAS_DIT + select HAS_DOM0LESS select HAS_EHCI select HAS_EX_TABLE select HAS_FAST_MULTIPLY diff --git a/xen/common/Kconfig b/xen/common/Kconfig index 5353874e87..bcf87b4d9d 100644 --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -13,15 +13,17 @@ config CORE_PARKING depends on NR_CPUS > 1 =20 config DOM0LESS_BOOT - bool "Dom0less boot support" if EXPERT + bool "Dom0less boot support" if EXPERT && (!X86 || UNSUPPORTED) select LIBFDT - depends on HAS_DOM0LESS && HAS_DEVICE_TREE && DOMAIN_BUILD_HELPERS - default y + depends on HAS_DOM0LESS && (X86 || (HAS_DEVICE_TREE && DOMAIN_BUILD_HELPE= RS)) + default y if !X86 help Dom0less boot support enables Xen to create and start domU guests during Xen boot without the need of a control domain (Dom0), which could be present anyway. =20 + If unsure on x86, say N. + config DOMAIN_BUILD_HELPERS bool =20 @@ -152,7 +154,7 @@ config NUMA =20 config STATIC_MEMORY bool "Static Allocation Support (UNSUPPORTED)" if UNSUPPORTED - depends on DOM0LESS_BOOT + depends on HAS_DEVICE_TREE && DOM0LESS_BOOT help Static Allocation refers to system or sub-system(domains) for which memory areas are pre-defined by configuration using physical @@ -171,7 +173,7 @@ config STATIC_SHM =20 config STATIC_EVTCHN bool "Static event channel support on a dom0less system" - depends on DOM0LESS_BOOT + depends on HAS_DEVICE_TREE && DOM0LESS_BOOT default y help This option enables establishing static event channel communication diff --git a/xen/common/device-tree/Makefile b/xen/common/device-tree/Makef= ile index cc56f42df9..f5410e685b 100644 --- a/xen/common/device-tree/Makefile +++ b/xen/common/device-tree/Makefile @@ -3,7 +3,7 @@ obj-$(CONFIG_HAS_DEVICE_TREE) +=3D bootinfo-fdt.init.o obj-$(CONFIG_HAS_DEVICE_TREE) +=3D bootinfo.init.o obj-$(CONFIG_HAS_DEVICE_TREE) +=3D device-tree.o obj-$(CONFIG_DOMAIN_BUILD_HELPERS) +=3D domain-build.init.o -obj-$(CONFIG_DOM0LESS_BOOT) +=3D dom0less-build.init.o +obj-$(filter-out $(CONFIG_X86),$(CONFIG_DOM0LESS_BOOT)) +=3D dom0less-buil= d.init.o obj-$(CONFIG_OVERLAY_DTB) +=3D dt-overlay.o obj-$(CONFIG_HAS_DEVICE_TREE) +=3D intc.o obj-$(CONFIG_DOMAIN_BUILD_HELPERS) +=3D kernel.o --=20 2.43.0