From nobody Thu Oct 30 23:09:16 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=1752774760; cv=pass; d=zohomail.com; s=zohoarc; b=jCCTqbR563+PXW+wAIaHR9gY1gIVlKYILyrnbN8c0fR5hVnwCk1nlxO0S1Zfb5cIoFA8fZKIprXPl20uFEQxAhszYUNjoGLpG66rOM6pg4iYAyNm3U+0tjaZ1HEpChyBbCr9njjvbT8856YFx9VpeuvrNKW0nZqfh1UbMs+KTPg= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752774760; 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=k8/OPIrX+UdkTPqOqin1smrgo2nLg/GpIf1RWRU+BkY=; b=j45shB2a+kXf/u7T7VFBVJ32AN07i/mmUbjRH/HQo3686Wxo1o8Q4NCvbaCoSkZaWBvmb2otkGwmGjZxr6DWFM9BVBkfgRxIx0NXFjB9Ji+zNX94gNoGs7a6/wXlNu9HSE+S4Xyks+Ed11iVxNiU1QlFPWASYkTlQ7L/jSq3llY= 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 1752774760636304.1986305303441; Thu, 17 Jul 2025 10:52:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1047197.1417644 (Exim 4.92) (envelope-from ) id 1ucSmL-0002gA-8R; Thu, 17 Jul 2025 17:52:21 +0000 Received: by outflank-mailman (output) from mailman id 1047197.1417644; Thu, 17 Jul 2025 17:52:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ucSmL-0002g3-56; Thu, 17 Jul 2025 17:52:21 +0000 Received: by outflank-mailman (input) for mailman id 1047197; Thu, 17 Jul 2025 17:52: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 1ucSmJ-0002fm-HG for xen-devel@lists.xenproject.org; Thu, 17 Jul 2025 17:52:19 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20611.outbound.protection.outlook.com [2a01:111:f403:2418::611]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c7e5e6cd-6336-11f0-a319-13f23c93f187; Thu, 17 Jul 2025 19:52:18 +0200 (CEST) Received: from BY5PR13CA0032.namprd13.prod.outlook.com (2603:10b6:a03:180::45) by SN7PR12MB6789.namprd12.prod.outlook.com (2603:10b6:806:26b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8880.21; Thu, 17 Jul 2025 17:52:14 +0000 Received: from SJ5PEPF000001E9.namprd05.prod.outlook.com (2603:10b6:a03:180:cafe::97) by BY5PR13CA0032.outlook.office365.com (2603:10b6:a03:180::45) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8964.15 via Frontend Transport; Thu, 17 Jul 2025 17:52:14 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ5PEPF000001E9.mail.protection.outlook.com (10.167.242.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8943.21 via Frontend Transport; Thu, 17 Jul 2025 17:52:13 +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, 17 Jul 2025 12:52: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: c7e5e6cd-6336-11f0-a319-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UMBxHLpqTIPnE55alqD/nbBxrwLpZfScqruP2MusqKrTyujUjm/3E0qG2M02zwebFIsP4iDsY1tb+1vOR1Tu2oSNX4MU2TOt/zVmupOFdmqTUk10qj7Vgfyy6oXFVK7GfaxfM2wYCb5PhGtTB/mArLUghmID2WTcBJjZzledUKZ4YQePKsm2MbgxrmlNqjuEVf29dPzUeuYL6TEqN8NJeskHwZvnTs4k3IE6wZaAr727W2LNQKD51eE+aTC1aPSq6cIZTHI7kIUb+Dokm3X+c8rIkdrsP1ivDmIAUybVT95ryAs3OwYLsoQYczk0Ts+00LtriMq0RvKxpb5TBhXcRQ== 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=k8/OPIrX+UdkTPqOqin1smrgo2nLg/GpIf1RWRU+BkY=; b=DfYM61ZcuD3E2mp41LS1GGaJvHT/xqRp/J2DvHZvrGJRS9I/9GZyexgmbajT+fXCT/XDBUXJUHVBomWxCrTuG8wyRB0E9r6rZ2gBjzl4WuXTtXQ8gQkjiaYrTUJoJnEZ3JnMsJ+D1pMpvg7h5bc8HP4dZAZf2myP0BDOuLExFBbPGa7YGLbe4zcHrHRD8pevdLhlRcmbEpWE+zZBohD4hZOCia1OYe0rEUydAX2+PznyU0OilPCmyuLtxRx6jqA7NpPsYpE+R6NwEIb2+ah+Aef2soJyI4hbI/nY+uazfI2XN54yKk9SIVFRczTDdIc4+bGM9WklyUyp6KgLAuF9Zw== 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=k8/OPIrX+UdkTPqOqin1smrgo2nLg/GpIf1RWRU+BkY=; b=UKrqCDo3/LyHxK3ZCUkwaQ1Kbh9ALjwFiUWayslSnEzAQcalZZ7xl/HHZU3A8pXgTWipzeDVdEQ5XLAxORZCjuoP9KM5zOneZBaTI2jmLUOIj3GBxi7gdriyf9rThZQd2ZYgiumO8NyGP929fBSe+fWNBZ7r5ENIUZfOHJ9wl5s= 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 1/2] arm: Remove alloc_dom0_vcpu0() Date: Thu, 17 Jul 2025 19:51:26 +0200 Message-ID: <20250717175128.462996-2-alejandro.garciavallejo@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250717175128.462996-1-alejandro.garciavallejo@amd.com> References: <20250717175128.462996-1-alejandro.garciavallejo@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: SJ5PEPF000001E9:EE_|SN7PR12MB6789:EE_ X-MS-Office365-Filtering-Correlation-Id: 34220603-278b-4cb8-8802-08ddc55aa96a 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?lbBqYPMOg9PZ83VLWkg4fZ+iD3LcQkHwba1CHGBwMWkbjNs8ksjPeSkyY6yc?= =?us-ascii?Q?Zy38P+Si4S7qb4NiEayt9rWobogPhp3IC4TLrrEJMhdDEWN5ojJYvuBnbMRC?= =?us-ascii?Q?bgffM3tOl9b//t0zT2nRUKSUUJAI1dChcAx/nIN54H92mr4irW/QvbrLlX/E?= =?us-ascii?Q?qOfTHmo3zyCcPlxyt9lXv02S74E0UelVk/PefWB7CzWwZd29krBnc7pBPoHG?= =?us-ascii?Q?y74zQ7qhd1ioQcpsrqLmxK0S8D7qLVU6OR+79h6Tcx5sk5ZcwzkUuEo4DorD?= =?us-ascii?Q?DbhH+ktllTCz5RXcexBbRd2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q?ZHK4Vyn3JRd7RY2fiYigIM/3s5eBl1C1yaUXd34WAVhufAUowhktYzp5c6Pc?= =?us-ascii?Q?flt22nnpfAl1Ch6yEWgSuDA8ow+SyixoUixrkmcTGiF3+vZvNAICtTgpWoVc?= =?us-ascii?Q?Rck+8DPjsDHPdPdN6/Fe8iryvf6bim3vbeKrKyJCA67CdMK1sFpUfea85dap?= =?us-ascii?Q?Zr8LWffUziyB0bDA6HVtkT8NsNY71cs63r4sogFd4TprypOld0DhrrOKK44x?= =?us-ascii?Q?6mS2AZOOYB9mj54csqR/impqqVhKQyrsZxlzy3AO8osGG+tehl83RT7Ra6Zu?= =?us-ascii?Q?qrI3K3b0RiZgSq704U8fr5ME7iQNiCX6BLXI?= 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: 17 Jul 2025 17:52:13.5188 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34220603-278b-4cb8-8802-08ddc55aa96a 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: SJ5PEPF000001E9.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6789 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1752774761769116600 Content-Type: text/plain; charset="utf-8" It's a straight vcpu_create(), so the alloc_dom0_vcpu0() call is irrelevant. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Jason Andryuk Reviewed-by: Stefano Stabellini --- xen/arch/arm/domain_build.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 04d3dca38a..ed668bd61c 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -115,11 +115,6 @@ unsigned int __init dom0_max_vcpus(void) return opt_dom0_max_vcpus; } =20 -struct vcpu *__init alloc_dom0_vcpu0(struct domain *dom0) -{ - return vcpu_create(dom0, 0); -} - /* * Insert the given pages into a memory bank, banks are ordered by address. * @@ -2085,7 +2080,7 @@ void __init create_dom0(void) if ( llc_coloring_enabled && (rc =3D dom0_set_llc_colors(dom0)) ) panic("Error initializing LLC coloring for domain 0 (rc =3D %d)\n"= , rc); =20 - if ( alloc_dom0_vcpu0(dom0) =3D=3D NULL ) + if ( vcpu_create(dom0, 0) =3D=3D NULL ) panic("Error creating domain 0 vcpu0\n"); =20 rc =3D construct_dom0(dom0); --=20 2.43.0 From nobody Thu Oct 30 23:09:16 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=1752774763; cv=pass; d=zohomail.com; s=zohoarc; b=gv7ds1bZkTkFqxElvdnCsyGkttf2YIUrjzcUmuNnxXKEkHR97c44jf4tnjL+x2kfpWi5ddqRU85gmy8BbZWCDieoCXRpA4IE4ojhkgYNNIbfIokrRcnqMyzC6SKeQaF/c8NQP0dmE9yJk2C+3oCzcyZ5dDJ8FUGpwJR4rqan5qE= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752774763; 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=K39k6RuvWWJkMEIkdG6HzIGtOxXf/lCeRD5qU5gOaxk=; b=VdKjbqEBW8N6LjL8oPTO9BxCaN5iRgxLbqnsvDcYzy/AMb+gc8psoLJg1KbUFrBW2XdCNJwi7IBvpZvmVa9fbxuMFUZfhU2DqqI5aCVjSpOt7gHeOKfHvXfLuyYlb5uE5JR58rUKb05CfJf52hrpUWu6MbVlQHl1FAl+sU52SVk= 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 1752774763201794.8337818236981; Thu, 17 Jul 2025 10:52:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1047198.1417654 (Exim 4.92) (envelope-from ) id 1ucSmS-0002vR-EU; Thu, 17 Jul 2025 17:52:28 +0000 Received: by outflank-mailman (output) from mailman id 1047198.1417654; Thu, 17 Jul 2025 17:52:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ucSmS-0002vK-Bi; Thu, 17 Jul 2025 17:52:28 +0000 Received: by outflank-mailman (input) for mailman id 1047198; Thu, 17 Jul 2025 17:52:27 +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 1ucSmR-0002fm-KS for xen-devel@lists.xenproject.org; Thu, 17 Jul 2025 17:52:27 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2062e.outbound.protection.outlook.com [2a01:111:f403:2416::62e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c76fd1a1-6336-11f0-a319-13f23c93f187; Thu, 17 Jul 2025 19:52:18 +0200 (CEST) Received: from BY5PR13CA0014.namprd13.prod.outlook.com (2603:10b6:a03:180::27) by DS0PR12MB8442.namprd12.prod.outlook.com (2603:10b6:8:125::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8943.25; Thu, 17 Jul 2025 17:52:14 +0000 Received: from SJ5PEPF000001E9.namprd05.prod.outlook.com (2603:10b6:a03:180:cafe::26) by BY5PR13CA0014.outlook.office365.com (2603:10b6:a03:180::27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8964.12 via Frontend Transport; Thu, 17 Jul 2025 17:52:14 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ5PEPF000001E9.mail.protection.outlook.com (10.167.242.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8943.21 via Frontend Transport; Thu, 17 Jul 2025 17:52:13 +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, 17 Jul 2025 12:52:10 -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: c76fd1a1-6336-11f0-a319-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KNmUGjYNmsGqNjA9pSbzQPRpBywEQBjr0ZbGy0fftkuJ6c3T5Eg/1TQyK+dhO1L/MAbAoOHKi9W80/gjHBxQzcHD31P8lSVC9Da9LqmpDHyeSyLRBwKvfAXZzTl7xHL6KPs6HYJ4y9SuYockhmBEfy6nFyhnGLdu1oCZgDkU58uM7f2QgokYaivPVQfKqVkrLJNtEY2c+dnr0/LNBhiD8DV+obzijNoNVsaCKq/h6g1bTQFC+Fq252sIod8HCuxaj3k6DcgTExDGLjGZkBxDDOwPNZX6Axx3xwIxfsBNKRaB4f+gqFZTS84fOYuiUuL+zgQnpk4yQTDdPgjCW5CETg== 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=K39k6RuvWWJkMEIkdG6HzIGtOxXf/lCeRD5qU5gOaxk=; b=R+B2DnLNxtsgu5iBrssf178neKdcRmKyHixpARkA07UvAcRkQA4ftMk5ljvWBRdgDQk2HvVze02BNeu416zs8jr2E5O5QzuFwyfV41uWXjxEbZiB0Yh6saX5KC2PMnHWJ4I4A5SU8DY8hej05hGrwLUlmjH4K92hmtxnszrwMbrK98mYVpaagA6Xyw0Dylc3VvQpDegHJDBAH51Rvsa02RpYVfMouYLbu+x2/HIFk3EpVGisFaJKGV6m8JuZ61ocnTmxLVOyLnxr4gEM+swkvODSg4jnra5HZXZ79romGeW4S1I3D1YRBl78YkZcF9SvB4LXUtRDbafcYlMzWzjj7Q== 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=K39k6RuvWWJkMEIkdG6HzIGtOxXf/lCeRD5qU5gOaxk=; b=bIOP+RMOnok083hE/+BRWpsLN6P4HCNzLBvG7+eYj5O2rVltn/Bn4Aw6crIv4LN+jgvLCo4NyIeI2fXyiyYGWLlEyBsqKACvUIq0wHW3Zv8fODH64RsUSpWw5zcBZUaPHyM+HA1foD6Sh9LsRvIp4YAMEN9WCIkaZPhC72gnXjA= 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 , "Daniel P . Smith" Subject: [PATCH 2/2] x86: generalise vcpu0 creation for a domain Date: Thu, 17 Jul 2025 19:51:27 +0200 Message-ID: <20250717175128.462996-3-alejandro.garciavallejo@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250717175128.462996-1-alejandro.garciavallejo@amd.com> References: <20250717175128.462996-1-alejandro.garciavallejo@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: SJ5PEPF000001E9:EE_|DS0PR12MB8442:EE_ X-MS-Office365-Filtering-Correlation-Id: e9ce3fdc-bd98-494e-a782-08ddc55aa978 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?iMhYWA1Dt+J7FzMt8R7RjFgSQG+sca6jR+aGAQswKc7u25gf1IdxuUs564j2?= =?us-ascii?Q?NnDnvu0AdaWP1lHZGwM7Y4vOsWM4U9msZt1rgbWTmdFGLB3vSaQ1oudfAgbN?= =?us-ascii?Q?323B3yv94zty04mDGK3X1nutIWrtVWrjmB+M3Vpv6aHx1mKwzblW/NdeE6wE?= =?us-ascii?Q?zreG6MRJwWTzHH792YiU4Z0e60P7sv6yIjL6iiMOuWKtxo0vStQ8+qBrFdnu?= =?us-ascii?Q?aE4TL+B614K6K9G5JYV0WGsMqfEieUXlTfOeZFC4iHkuez6fmy3pTqzgTdcg?= =?us-ascii?Q?0Q2pgfv+ou1OVlcFk19FPwOTU5maJ617qDARqw6gKSTZ9FPTLFCRF4QtjrCr?= =?us-ascii?Q?l9IftCSxt1Sfjrxe1n+0nlczhhiq/STYtvvQmgCfp5bsVtxmZ3ijRq+WZCDt?= =?us-ascii?Q?eYHXwWA1DRCvOf9vrij0J6lDK6fhWJMqY8ekJ/xAUvo4oqte8wTOij9olNu0?= =?us-ascii?Q?YSynD/R+YLiNsMzVp2iGcrjNT12ACBxPdaIMuIrmU3Axw3Vfe3Z1vVGBXqXp?= =?us-ascii?Q?NDv4OIUysDhHkCFSHbosX2GShvScdq+eQ6gJ7+yDlmPjOlJt5JjwxqEeOGpP?= =?us-ascii?Q?SsF+xNcBpd4RhqEXXIuAraU8FsYccAms3+3gdvpfZXbN8oQHYVVmlVjTu7gU?= =?us-ascii?Q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ispam-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)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2025 17:52:13.6124 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9ce3fdc-bd98-494e-a782-08ddc55aa978 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: SJ5PEPF000001E9.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8442 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1752774763878116600 Content-Type: text/plain; charset="utf-8" Make alloc_dom0_vcpu0() viable as a general vcpu0 allocator. Keep behaviour on any hwdom/ctldom identical to that dom0 used to have, and make non-dom0 have auto node affinity. Rename the function to alloc_dom_vcpu0() to reflect this change in scope, and move the prototype to asm/domain.h from xen/domain.h as it's only used in x86. Signed-off-by: Daniel P. Smith Signed-off-by: Alejandro Vallejo --- xen/arch/x86/dom0_build.c | 12 ++++++++---- xen/arch/x86/include/asm/dom0_build.h | 5 +++++ xen/arch/x86/setup.c | 6 ++++-- xen/include/xen/domain.h | 1 - 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index 0b467fd4a4..dfae7f888f 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -254,12 +254,16 @@ unsigned int __init dom0_max_vcpus(void) return max_vcpus; } =20 -struct vcpu *__init alloc_dom0_vcpu0(struct domain *dom0) +struct vcpu *__init alloc_dom_vcpu0(struct domain *d) { - dom0->node_affinity =3D dom0_nodes; - dom0->auto_node_affinity =3D !dom0_nr_pxms; + d->auto_node_affinity =3D true; + if ( is_hardware_domain(d) || is_control_domain(d) ) + { + d->node_affinity =3D dom0_nodes; + d->auto_node_affinity =3D !dom0_nr_pxms; + } =20 - return vcpu_create(dom0, 0); + return vcpu_create(d, 0); } =20 #ifdef CONFIG_SHADOW_PAGING diff --git a/xen/arch/x86/include/asm/dom0_build.h b/xen/arch/x86/include/a= sm/dom0_build.h index ff021c24af..46bfd111f2 100644 --- a/xen/arch/x86/include/asm/dom0_build.h +++ b/xen/arch/x86/include/asm/dom0_build.h @@ -23,6 +23,11 @@ unsigned long dom0_paging_pages(const struct domain *d, void dom0_update_physmap(bool compat, unsigned long pfn, unsigned long mfn, unsigned long vphysmap_s); =20 +/* general domain construction */ + +/* Create the first vCPU of a domain. Sets up node affinity as a side effe= ct */ +struct vcpu *alloc_dom_vcpu0(struct domain *d); + #endif /* _DOM0_BUILD_H_ */ =20 /* diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index c6890669b9..77a8ca60c3 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1054,9 +1055,11 @@ static struct domain *__init create_dom0(struct boot= _info *bi) if ( IS_ERR(d) ) panic("Error creating d%u: %ld\n", bd->domid, PTR_ERR(d)); =20 + bd->d =3D d; + init_dom0_cpuid_policy(d); =20 - if ( alloc_dom0_vcpu0(d) =3D=3D NULL ) + if ( alloc_dom_vcpu0(d) =3D=3D NULL ) panic("Error creating %pdv0\n", d); =20 cmdline_size =3D domain_cmdline_size(bi, bd); @@ -1093,7 +1096,6 @@ static struct domain *__init create_dom0(struct boot_= info *bi) bd->cmdline =3D cmdline; } =20 - bd->d =3D d; if ( construct_dom0(bd) !=3D 0 ) panic("Could not construct domain 0\n"); =20 diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h index e10baf2615..bf1fc6227f 100644 --- a/xen/include/xen/domain.h +++ b/xen/include/xen/domain.h @@ -24,7 +24,6 @@ struct vcpu *vcpu_create(struct domain *d, unsigned int v= cpu_id); =20 unsigned int dom0_max_vcpus(void); int parse_arch_dom0_param(const char *s, const char *e); -struct vcpu *alloc_dom0_vcpu0(struct domain *dom0); =20 int vcpu_reset(struct vcpu *v); int vcpu_up(struct vcpu *v); --=20 2.43.0