Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5AC48C3601E for ; Thu, 10 Apr 2025 13:02:27 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.945679.1343830 (Exim 4.92) (envelope-from ) id 1u2rXm-0001Pc-Ug; Thu, 10 Apr 2025 13:02:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 945679.1343830; Thu, 10 Apr 2025 13:02:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u2rXm-0001PV-Qj; Thu, 10 Apr 2025 13:02:10 +0000 Received: by outflank-mailman (input) for mailman id 945679; Thu, 10 Apr 2025 13:02:09 +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 1u2rXl-00016o-Rj for xen-devel@lists.xenproject.org; Thu, 10 Apr 2025 13:02:09 +0000 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on20614.outbound.protection.outlook.com [2a01:111:f403:2406::614]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 00ea8bc6-160c-11f0-9ffb-bf95429c2676; Thu, 10 Apr 2025 15:02:08 +0200 (CEST) Received: from MN2PR15CA0047.namprd15.prod.outlook.com (2603:10b6:208:237::16) by CY5PR12MB6108.namprd12.prod.outlook.com (2603:10b6:930:27::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8632.23; Thu, 10 Apr 2025 13:02:01 +0000 Received: from BL02EPF0002992C.namprd02.prod.outlook.com (2603:10b6:208:237:cafe::f9) by MN2PR15CA0047.outlook.office365.com (2603:10b6:208:237::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8632.24 via Frontend Transport; Thu, 10 Apr 2025 13:02:01 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BL02EPF0002992C.mail.protection.outlook.com (10.167.249.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8632.13 via Frontend Transport; Thu, 10 Apr 2025 13:02:01 +0000 Received: from localhost (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, 10 Apr 2025 08:01:57 -0500 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 00ea8bc6-160c-11f0-9ffb-bf95429c2676 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ttb1e2N6CtlB9XawppFJqpqUe+BUjXYUCapB6c0bEmDZ4WTdg5lLQgEXMOJLBJkzVz8dQOiz4kbG0lKPin0r/6mSdnlCQeoOdoQNlVvfJqOOtHWsImGG2I2yONAFzkQ3iCZgi1LRzlUnygRdbXhSAPdjq3vLcerF9ZgBitCJa1ELnXLEeLMtagJpg4tbP/rxTkB/dcUYB0GV/CnXuNPidnlBWyo1w5QpdeUgRzbxMA+qQxSoTeyjYCPKB4KkWMGHdAjkB4QsK/PDwq6ogH6UoLY2ZSK7jHiJfEH+RjGHOZeVDp0dHoDf8Ssiylnk7p1v5Gybds+95PfBAyYlkMuZ/A== 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=qkL8bTZqRSzEGJBealhttelx2wo1+uKrhCu0Gd44Rz8=; b=rbDkce9a6PYLqtQKIUgazBm6bIYbQu+vavb2FoCE7TU5b4fRaHOC5jD4Bkux65K1FIbvCkrLkKHd1Cl6ZauNMqE2wnl7suy8p5tPHrr/TaJc5ASYBKveFeCGZN3Yu2mvwwW0IAk8XLCzVj+t1dxtX420L8rofAOrjfmkuA078EemR0+pwHAPT4B7J8zzfWi+1txwFR9iVdV1ChHGiSvUfd4A57tVpFJclcbJVmQzm2bKBJx3LwHgB5wEsVhv/GVBXz0Ij31Fd3L/bJh1BPXbknYlEPJKLOOsIkb1jXQ3MiCoyVHa2woGNQ6BZW2Srfh49+BJLP5tfgU0xPvL18nbvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=proton.me 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=qkL8bTZqRSzEGJBealhttelx2wo1+uKrhCu0Gd44Rz8=; b=QyMwTWC+GHWKwx7pycfLthKCWyi3/kb3l5zrZ2Z11f091fG7+50DmdWZZjcDAsl0ARb0BFgIerbfqWhDM2p5+5BvL4XejeN8sKR9iuoujRcbumQ6eTnKhvqOv32QPEnQyQxgY6ZYoTG3ik3FmLGRbETbub4iLvlJ9KlMyF9AuSA= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Date: Thu, 10 Apr 2025 14:01:51 +0100 Message-ID: CC: , "Daniel P. Smith" , Jason Andryuk , "Xenia Ragiadakou" , Stefano Stabellini , Michal Orzel , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: Re: [PATCH v3 06/16] x86/hyperlaunch: introduce the domain builder From: Alejandro Vallejo To: Denis Mukhin X-Mailer: aerc 0.20.1 References: <20250408160802.49870-1-agarciav@amd.com> <20250408160802.49870-7-agarciav@amd.com> In-Reply-To: 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: BL02EPF0002992C:EE_|CY5PR12MB6108:EE_ X-MS-Office365-Filtering-Correlation-Id: f9ae784e-1f9d-4b59-8ceb-08dd782fe271 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|376014|36860700013|13003099007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ZlBNZjlGdG0wK1F2UmlzaVFZUldRb0U0NzA3UUpIZzV1Rk1pN2ZWNFVxOVNI?= =?utf-8?B?cGlCd0JpUDFyM2t0Q25sR1BSYXhuRHJ1VTlxZnI5V0daT0Z3NmpRU0YvUTFo?= =?utf-8?B?dUp1NVJCOWsvN1A5MUJwU3hmeUdFOS9IOFB6c2Z3ZnZER0xqQy9tTEFxOXNB?= =?utf-8?B?N1ZjeGdXOW9Pd3J2RXpoYnVmUjk4QWJYeXRLZnlBRHNWV1dGQTZwQVp3ODh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Onik=3D?= 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)(13003099007);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2025 13:02:01.3741 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9ae784e-1f9d-4b59-8ceb-08dd782fe271 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: BL02EPF0002992C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6108 On Wed Apr 9, 2025 at 7:53 PM BST, Denis Mukhin wrote: > On Tuesday, April 8th, 2025 at 9:07 AM, Alejandro Vallejo wrote: > >>=20 >>=20 >> From: "Daniel P. Smith" dpsmith@apertussolutions.com >>=20 >>=20 >> Introduce the domain builder which is capable of consuming a device tree= as the >> first boot module. If it finds a device tree as the first boot module, i= t will >> set its type to BOOTMOD_FDT. This change only detects the boot module an= d >> continues to boot with slight change to the boot convention that the dom= 0 >> kernel is no longer first boot module but is the second. >>=20 >> No functional change intended. >>=20 >> Signed-off-by: Daniel P. Smith dpsmith@apertussolutions.com >>=20 >> Signed-off-by: Jason Andryuk jason.andryuk@amd.com >>=20 >> --- >> v3: >> * Move obj-y +=3D domain-builder/ >> * Remove blank line in Makefile >> * const in has_hyperlaunch_fdt() >> * CONFIG_LIBFDT rename >> * Use boot_info forward declaration >> * Rename domainbuilder.h to domain-builder.h >> * Add fdt NULL check >> --- >> xen/arch/x86/Makefile | 1 + >> xen/arch/x86/domain-builder/Kconfig | 2 +- >> xen/arch/x86/domain-builder/Makefile | 2 + >> xen/arch/x86/domain-builder/core.c | 57 +++++++++++++++++++++++ >> xen/arch/x86/domain-builder/fdt.c | 37 +++++++++++++++ >> xen/arch/x86/domain-builder/fdt.h | 21 +++++++++ > > I have a general question. > > Wouldn't that make sense to use arch-independent placeholder for domain b= uilder > code right from the starting point? > > For example something like xen/common/domain-builder ? > > My understanding is that there's a lot of code in the domain builder whic= h > can be potentially shared/re-used with non-x86 architectures. > > Also, that seems to align with the intention to have common arch-independ= ent > subsystems in the code base: > > https://docs.google.com/presentation/d/1q9cjJZLUxUo1YzMpCxVHuL-ZOGoFaO= 9haHfRBK4i4Uc/edit?slide=3Did.g32afc87aef4_0_18#slide=3Did.g32afc87aef4_0_1= 8 https://lore.kernel.org/xen-devel/D92Z1LECR2VA.3FW5H7ZIRVXU7@amd.com/ In principle, yes. I'll try to move it, but I suspect making it coexist with dom0less will prove tricky. >> diff --git a/xen/arch/x86/domain-builder/core.c b/xen/arch/x86/domain-bu= ilder/core.c >> new file mode 100644 >> index 0000000000..d6ae94f45c >> --- /dev/null >> +++ b/xen/arch/x86/domain-builder/core.c >> @@ -0,0 +1,57 @@ >> +/* SPDX-License-Identifier: GPL-2.0-only / >> +/ >> + * Copyright (C) 2024, Apertus Solutions, LLC >> + */ >> +#include >>=20 >> +#include >>=20 >> +#include >>=20 >> +#include >>=20 >> + >> +#include >>=20 >> + >> +#include "fdt.h" >> + >> +void __init builder_init(struct boot_info *bi) >> +{ >> + if ( IS_ENABLED(CONFIG_DOMAIN_BUILDER) ) >> + { >> + int ret; >> + >> + switch ( ret =3D has_hyperlaunch_fdt(bi) ) >> + { >> + case 0: >> + printk("Hyperlaunch device tree detected\n"); >> + bi->hyperlaunch_enabled =3D true; FYI, your email client seems to be collapsing the indentation of the quoted patches. Is that intentional? Cheers, Alejandro