From nobody Fri Oct 31 23:10:56 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=1744894187; cv=pass; d=zohomail.com; s=zohoarc; b=LY57XSoebkoBCRwfJq5RBq8NMiJG5ScFNEy1gh8u627MssbFu3EIlFPjvQBCrw1IqFKo6TX5lzIkDOAyTjApei45O/T641woc3a+m9+1lHLvpcNy9mQurl/ljSEzHkFJw5IlnJe4HUy63gzMDQpHP5FP7H/435Pxzi7hxKm7scE= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744894187; 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=tmoofm42WlgUtLxeqf60xNluT8/fPAszyhmDXROd35k=; b=CIrkgKHzyDAjKhr401wrr7Z6dc5eIhBr9TLY//x/590+vOkn3eyVwcUdn4jLotha9C3Y3Q1jmiFfml7s2okC5irHhtWh2gRtDrD/JtzXbZEhi2uMZbbAiv555b7PTE137L5YRIom2G+SwgLapIkhs6gRT32calBvq7I9cDGMGP0= 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 1744894187610773.2338213430206; Thu, 17 Apr 2025 05:49:47 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.957520.1350681 (Exim 4.92) (envelope-from ) id 1u5OgL-0006nM-He; Thu, 17 Apr 2025 12:49:29 +0000 Received: by outflank-mailman (output) from mailman id 957520.1350681; Thu, 17 Apr 2025 12:49:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u5OgL-0006n6-Dc; Thu, 17 Apr 2025 12:49:29 +0000 Received: by outflank-mailman (input) for mailman id 957520; Thu, 17 Apr 2025 12:49:28 +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 1u5OgK-0004z9-8L for xen-devel@lists.xenproject.org; Thu, 17 Apr 2025 12:49:28 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2061e.outbound.protection.outlook.com [2a01:111:f403:2414::61e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 653f2bf1-1b8a-11f0-9eb0-5ba50f476ded; Thu, 17 Apr 2025 14:49:27 +0200 (CEST) Received: from CH2PR16CA0019.namprd16.prod.outlook.com (2603:10b6:610:50::29) by BN5PR12MB9511.namprd12.prod.outlook.com (2603:10b6:408:2a9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8632.35; Thu, 17 Apr 2025 12:49:22 +0000 Received: from CH2PEPF0000013F.namprd02.prod.outlook.com (2603:10b6:610:50:cafe::67) by CH2PR16CA0019.outlook.office365.com (2603:10b6:610:50::29) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8655.15 via Frontend Transport; Thu, 17 Apr 2025 12:49:22 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by CH2PEPF0000013F.mail.protection.outlook.com (10.167.244.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8655.12 via Frontend Transport; Thu, 17 Apr 2025 12:49:22 +0000 Received: from xcbagarciav01.amd.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, 17 Apr 2025 07:49:20 -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: 653f2bf1-1b8a-11f0-9eb0-5ba50f476ded ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=O7xLHoSs02xsyswghDSj7LTogm46+xq8gGxWIe+kXmhpJ/1l2SvrQ43RJEDpxF37e/tfvPY1RyHjCCGrGYLKQ4ZJmXN4rCvKUFwot/f2o+5beVpd67ENfeG5NptX6PaB3zbUcnm45I/yoNp9TUS0IOLbkadc9/5mgFUKGfAcKQenF3lIHJkDDUAAY+xuKsaqG90OATbBAc2Ye4M4MonL59/QaDdgjGtsv1oy15iXTRvqdsAsb4E5MC8+q74bT1f8yqOjEc9m1d99n9lYupVn0FUr5y4fee5gSB+sFlM9auofUPUUe4qtJN4SHHmtUMmPHyd/Brf0fHlVG5EqDoo8Mg== 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=tmoofm42WlgUtLxeqf60xNluT8/fPAszyhmDXROd35k=; b=h56v0n1PjLjBi6+5BGJYT9K0YvjuLVbUG9qfv/1Z+zxBVVP9wcI1fjpM3KWsGyeuNRdkBesDsonnEvK1BGygriyZOicvPb/D1Yvw4T/yyvnvAXWKRrS4Oqi4GzCVawG8oLmQ16yMlYx0drvSGfGW8iFf4M4s+qnI0k2NMCPOVRWoLkau0HcW+XgWH7ouxhQ1Zxsm9uRpelnTY6WZvxbKdS5g+FZLA07bIDMt6JfabHWSvlARjYp/jU8VlF5zqHy70sxItZZ+E7MzHiLGIHTDYTmNODP88CdmW7fsFeqVHBhmc0URnjNU2fm8tA9REH7PGHLxaW/Khfgrhp3PtjG0Tg== 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=tmoofm42WlgUtLxeqf60xNluT8/fPAszyhmDXROd35k=; b=3Ulx6tArJylhpkC6Yof6QkAa3YpZ9wNfAcYcDaqngjm5gLDraO66geQtQM+y8N66LarQcRfDEpI+esm2mC5COu9Y3sYnPzComoMOoQ51xTXTdj3XUCgm865JJDDI0RacPDlOrp4f8NznURqkDbRFrjTsFxAickWA5l/9CMXBl+I= 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: "Daniel P. Smith" , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Anthony PERARD , Michal Orzel , "Julien Grall" , Stefano Stabellini , "Jason Andryuk" , Alejandro Vallejo Subject: [PATCH v4 08/13] x86/hyperlaunch: locate dom0 initrd with hyperlaunch Date: Thu, 17 Apr 2025 13:48:30 +0100 Message-ID: <20250417124844.11143-9-agarciav@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250417124844.11143-1-agarciav@amd.com> References: <20250417124844.11143-1-agarciav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000013F:EE_|BN5PR12MB9511:EE_ X-MS-Office365-Filtering-Correlation-Id: ac4a6117-d7d8-49dc-101e-08dd7dae46c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3i/A/CdCnR7vthPolO6R6ICa/6U7g0U1T46bZNrYosRO4yEoXMSpJdN36zUv?= =?us-ascii?Q?Ee7k5VkYqA4+mJh/GvJheWEW1tqojeOevoqR4EOhlarviXd8AJV7hLnAiT0v?= =?us-ascii?Q?rd9lAYIzDTSY1a3+VxjC5gLDrIOLmqqF0eYhkReTqlg6f2w8PB3y3gzEnEZS?= =?us-ascii?Q?CF8dtkBgZqPLTMY0ELLEPynuWhBWub71Pt3QlywWcxp+ZCtDPgo0DRkjRG/O?= =?us-ascii?Q?mf4lANdx1GpXVAQkOMaqAgeAdZvZZh+dlOX2EnxfYyD3b+V0gqdACiBGnxdI?= =?us-ascii?Q?Bw9iHmYrgpJhys7P99Re0GLolkn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ascii?Q?A0S00lw/RNEa5QaV60uKUfWdeW4UnrAnfKCoSUHSm1VI4zpSCVmljA42w2qf?= =?us-ascii?Q?he+Ohu9H2+WsmvyNtIA6tTmXjKlU+oxLL+Grg2bdcE6/OmvvvaJFO75pbV2P?= =?us-ascii?Q?FvQkYQ+YIPz9j53z2qC3B+VBQ7GkPL9GDloUMaGVhJ4+25OqgKsvBtYFUxw+?= =?us-ascii?Q?ukzQ9vA+Ji1dfJ7+vNNMEGbe1plTya1WgzvDTRH1PdehRAmzzOZTo/c+nX4u?= =?us-ascii?Q?EGbwE8T9UYaMuLqAFZUSs4MOmkxds7QjdQz75/FmZdim2wnJJO+uAjqaZeL9?= =?us-ascii?Q?9z8dXpACJ4ALYS0y/llSTnJ2bQ5KAwjl6dFD?= 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)(1800799024)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2025 12:49:22.0985 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac4a6117-d7d8-49dc-101e-08dd7dae46c6 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: CH2PEPF0000013F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN5PR12MB9511 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1744894188261019100 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Smith" Look for a subnode of type `multiboot,ramdisk` within a domain node and parse via the fdt_read_multiboot_module() helper. After a successful helper call, the module index is returned and the module is guaranteed to be in the module list. Fix unused typo in adjacent comment. Signed-off-by: Daniel P. Smith Signed-off-by: Jason Andryuk Signed-off-by: Alejandro Vallejo --- v4: * s/XENLOG_ERR/XENLOG_WARNING/ on duplicate ramdisk. * Removed stray ")" in printk * s/else if/if/ (because of continue) * Removed trailing continue --- xen/arch/x86/setup.c | 4 ++-- xen/common/domain-builder/fdt.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 4cae13163b..76ceb5221f 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -2150,11 +2150,11 @@ void asmlinkage __init noreturn __start_xen(void) * At this point all capabilities that consume boot modules should have * claimed their boot modules. Find the first unclaimed boot module and * claim it as the initrd ramdisk. Do a second search to see if there = are - * any remaining unclaimed boot modules, and report them as unusued in= itrd + * any remaining unclaimed boot modules, and report them as unused ini= trd * candidates. */ initrdidx =3D first_boot_module_index(bi, BOOTMOD_UNKNOWN); - if ( initrdidx < MAX_NR_BOOTMODS ) + if ( !bi->hyperlaunch_enabled && initrdidx < MAX_NR_BOOTMODS ) { bi->mods[initrdidx].type =3D BOOTMOD_RAMDISK; bi->domains[0].module =3D &bi->mods[initrdidx]; diff --git a/xen/common/domain-builder/fdt.c b/xen/common/domain-builder/fd= t.c index 50fde2d007..c0f526a4ce 100644 --- a/xen/common/domain-builder/fdt.c +++ b/xen/common/domain-builder/fdt.c @@ -216,6 +216,31 @@ static int __init process_domain_node( bd->kernel->fdt_cmdline =3D fdt_get_prop_offset( fdt, node, "bootargs", &bd->kernel->cmdline_pa); } + else if ( !fdt_node_check_compatible(fdt, node, "multiboot,ramdisk= ") ) + { + int idx; + + if ( bd->module ) + { + printk(XENLOG_WARNING + "Duplicate module for domain %s\n", name); + continue; + } + + idx =3D fdt_read_multiboot_module(fdt, node, address_cells, + size_cells, bi); + if ( idx < 0 ) + { + printk(XENLOG_ERR + " failed processing module for domain %s\n", + name); + return -EINVAL; + } + + printk(XENLOG_INFO " module: multiboot-index=3D%d\n", idx); + bi->mods[idx].type =3D BOOTMOD_RAMDISK; + bd->module =3D &bi->mods[idx]; + } } =20 if ( !bd->kernel ) --=20 2.43.0