From nobody Thu Sep 3 07:03:35 2026 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=1788334606; cv=pass; d=zohomail.com; s=zohoarc; b=AmAWEtFEIEtt4YVk2JK4kyCP+cSFDWIJZtu6L8OrQ3vqRy/0/QydDI+EVytO/QTV67jW6BKXFAVTCzvDQHVH9KSodtm/RJ6PisxP2pzeSOVJQ2vTfJa6ljbTbwXRvsOyojpmX2IuQJ7hOmKa97pCKk2057w5f35bYNm2U80GaFo= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788334606; 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=oHPYvwj3xZPuM6fAr56NZQu/gReDAWZUwAt7EEUP2/Y=; b=OpCWQmo0a3DhHqTqHHUYjyPf1orLd5+zOPVvXL2jHZMc4Zn8gtqgUT72YyBosW5zseZklDnu62X5TdNDOCJqcG6fq46hP/bkBWUFbDWQIsjxgO8JSA+bt2ayZvhM69RNUA9CEm7IcGBUuIa1nSsvDMWq4CyB6A3eELVoT+EgjYo= 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 1788334606255992.4700814696664; Wed, 2 Sep 2026 00:36:46 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1405209.1638744 (Exim 4.92) (envelope-from ) id 1x1fW9-0004xi-Ry; Wed, 02 Sep 2026 07:36:21 +0000 Received: by outflank-mailman (output) from mailman id 1405209.1638744; Wed, 02 Sep 2026 07:36: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 1x1fW9-0004xU-Ou; Wed, 02 Sep 2026 07:36:21 +0000 Received: by outflank-mailman (input) for mailman id 1405209; Wed, 02 Sep 2026 07:36:20 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1fW8-0004us-MJ for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 07:36:20 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1x1fW8-006Bv5-2z for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 09:36:20 +0200 Received: from [10.42.69.5] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a97d1ea-8faa-0a2a0a5109dd-0a2a4505bca0-36 for ; Wed, 02 Sep 2026 09:36:19 +0200 Received: from [40.107.201.54] (helo=CH4PR04CU002.outbound.protection.outlook.com) by tlsNG-c201ff.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a97d1f2-4cb1-0a2a45050019-286bc9360c1b-3 for ; Wed, 02 Sep 2026 09:36:19 +0200 Received: from BY1P220CA0044.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::10) by PH9PR12MB995114.namprd12.prod.outlook.com (2603:10b6:510:426::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.360.13; Wed, 2 Sep 2026 07:36:14 +0000 Received: from SJ1PEPF00002322.namprd03.prod.outlook.com (2603:10b6:a03:59e:cafe::a1) by BY1P220CA0044.outlook.office365.com (2603:10b6:a03:59e::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.382.11 via Frontend Transport; Wed, 2 Sep 2026 07:36:14 +0000 Received: from satlexmb07.amd.com (165.204.84.17) by SJ1PEPF00002322.mail.protection.outlook.com (10.167.242.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.382.8 via Frontend Transport; Wed, 2 Sep 2026 07:36:14 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.46; Wed, 2 Sep 2026 02:36:14 -0500 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.46; Wed, 2 Sep 2026 02:36:13 -0500 Received: from APPOL-18KY0J4.xilinx.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.46 via Frontend Transport; Wed, 2 Sep 2026 02:36:12 -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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ffia8CDU6d0Vbp2q3VpONepV6pXgvCBR+kHtlKQUAXqgD9XgkkfzdIKoO0BKVmpjghuA80B77ZPB3Cp1cuF0XtavZOmxJv4go2Ikpy2QzPalEw7d2DPgSTXhrZjHapcz2VqLiVvKhkQw172FPq6ZdL13Nf7ydrEqA1V5ymLEmOEG6k52beoVclUqwNoU0M2pb+wfd3coiHDvFhfGMrwy0QOi31toV09GD8LdgAd8WpE+aRhX+3dms7J8H7zqtY6CNkKi6UygltAtEHtEHt24KyJZ/GXX2qiDUTQy11a0+RZf/+EXmiDV2crOZ6Dyng3BffHlhm7G6IeoeQP+Q6FoJg== 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=oHPYvwj3xZPuM6fAr56NZQu/gReDAWZUwAt7EEUP2/Y=; b=UoZG0bW0NIgJq1t4fCSFP0qgxEPhTwb345tAHLJo2Ghq3O1YK3d/4DyvpZlZhNV7eReZO/qWswCIM7HDRLP0/aIBZ9/17NS6gTcjDchEmY1u4/f/f5Fs+BH5p+3SyjmkBGtpT9VIF7AeLM908bSUEwSnudmej2d9XZJ7frp4CW74CLbVdP8419oDqaWcXQE37SSZNd8n7fWBRrEStsOC5HUenrgGZkrjVjAY/+H/ZLhvTGV98PrFQmcce7KFyTXZc9cYbvfH0Mwgr7x89z0vwVkvOdTUHLb9YAfTuKZs2RMD7Qx3uXzoPVekZrctBNbtidubVTWutkBhq5TiHejnLQ== 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=oHPYvwj3xZPuM6fAr56NZQu/gReDAWZUwAt7EEUP2/Y=; b=h/FaoH9rAG4//TJWOb98rqw0bURm1CP+UPd6fwb9hHA+DgPPW381HiU2Q4BF5JrVjp7xqmc1XJzYadkFXEhqnmdezS5sGo7ywOZ9iZhZRptdIOCbC37uWyPXUMdbadMMjR1fb9njmDUKjAgjXSsxKY6qGEbefyh2HkIA9hr6KcA= 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=satlexmb07.amd.com; pr=C From: Michal Orzel To: CC: Michal Orzel , Andrew Cooper , Anthony PERARD , "Jan Beulich" , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Stefano Stabellini" Subject: [PATCH 1/3] cmdline: Document console=dtuart option Date: Wed, 2 Sep 2026 09:36:04 +0200 Message-ID: <20260902073606.61062-2-michal.orzel@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902073606.61062-1-michal.orzel@amd.com> References: <20260902073606.61062-1-michal.orzel@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002322:EE_|PH9PR12MB995114:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b67b044-ee8f-4be9-31d7-08df08c4de45 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|82310400026|1800799024|376014|23010399003|10067099003|11063799006|56012099006|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: ggNiMFDikYcJUCWNuA87/1e1LSPNa4WJdb/ZaRkA0CLWCk04BfbRFP87bj6DVlPURGVspdHMBwk0ncN8YKNTq1Wny24FOWn4lD6NxsrTF6sqOFbN4howbjbmHA3ErzCeyjnWKnADL4b0EiayX0x5PwfaX/WBXFZ28zbhkdBY77VSe1DU3SwfwmpNHJ+vyUenmX4Ct8K86IDCBN63cKzN+hG+SSWnjpJAE90z0aObzBsCeo0c0BHMrvhgJpFSfnTiCa5ZvQi6uR0bFXeZJpRwprVaKYR9oW/zLNC4N64Y+QXualnN5DL3V6DiiLSX3XyfpBy4GAZruTwTh40x8+nRobkmBrDiF/8PrNaIF8aTOUkprk98oW3wfsOCz9qxjhUh8jtbAq9OdBSWbb0ny650A0VzLtye05ToPFqbuVxiGajRu4/ULu+PuD6UaKnPT/+bRwsUB0g34odl4NYAsGR3jHkLC+x+BK2cgrcYbyNImoDoloorYD2++PQt6tHmsR9Zhj5CR9KAiP4cTwFI37nxNCA36T7PaPIs2liEYitjDXjHh9Hzdqojy2xfBE9ky61BdlRM/Nw+I0RVNqs8KVucal3Sjk9s/j+uxN02XjlO0itar5H+Xui2RF/ga3YlfEsh9sAHEZtrD99098eydd8DDfUvfM8pdTBn1f5rrovAYXyJhMbcc2Ln8f6+8XG1+/wuOQXjt/+Vwa6PnahDew6a8w== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(82310400026)(1800799024)(376014)(23010399003)(10067099003)(11063799006)(56012099006)(18002099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JCT2R0RDJWSfLSKMm2og5i6hbSYE/spt0vyAUDXnzOS+gskgAG7E7KxAk8flBg3xk50UD7sWPw6qJlTm1UJt9Giq+9ooWYS8v30YlxssgHzkk70BX77rf0aNp2/LUS8ZEOO1AuM6lowDYs7fNGy7iv2x+Uhj6gE9utzEl8R6TGyixJs/OXRGME8C+rwimXhoGhscs+TnE5VvxURXAjjWYIwzwbRx9E601lauMipDl9jcopZYbf0Uiv/DkTXSTRyRObMiDXGt12s2vzSZaGwMxet1KfpUv6wZUMG7kZaARI4uMak80OMDQowBYHORiGLeV42Z7vCZQCxquDb1q7zDJ9Lb18A8PAcFy2cxLyVkm8qN59kb5sRVPY/vUwlhfT3KAFRD3vd91ItTgfeSD9hqWMsm7dKc2gYW43fgw67rrja+1CJ3bzIm4vYf1/vcsvJH X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2026 07:36:14.4863 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b67b044-ee8f-4be9-31d7-08df08c4de45 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=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00002322.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH9PR12MB995114 X-purgate-ID: tlsNG-c201ff/1788334579-73ABF2A1-4C74B2B8/0/0 X-purgate-type: clean X-purgate-size: 2214 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1788334609149158500 Content-Type: text/plain; charset="utf-8" Document the default console=3D option on Arm and RISC-V that is "dtuart" indicating a generic UART parsed from a device tree or ACPI SPCR table. This serial utilizes SERHND_DTUART handle. Take the opportunity to: - fix documented x86 default to vga to match OPT_CONSOLE_STR, - mark dtuart option as available on RISC-V, - document fall back to /chosen/stdout-path. Signed-off-by: Michal Orzel Acked-by: Jan Beulich --- docs/misc/xen-command-line.pandoc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line= .pandoc index 1c711fa98086..3a416a38b74c 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -430,9 +430,10 @@ The following are examples of correct specifications: Specify the size of the console ring buffer. =20 ### console -> `=3D List of [ vga | com1[H,L] | com2[H,L] | pv | dbgp | ehci | xhci | n= one ]` +> `=3D List of [ vga | com1[H,L] | com2[H,L] | pv | dbgp | ehci | xhci | d= tuart | none ]` =20 -> Default: `console=3Dcom1,vga` +> Default (x86): `console=3Dvga` +> Default (Arm, RISC-V): `console=3Ddtuart` =20 Specify which console(s) Xen should use. =20 @@ -454,6 +455,10 @@ compiled with `CONFIG_XEN_GUEST` enabled. =20 `xhci` indicates that Xen should use a USB3 debug port. =20 +`dtuart` indicates that Xen should use a generic UART (parsed from a device +tree or ACPI SPCR table). Only available if Xen was compiled with +`CONFIG_GENERIC_UART_INIT` enabled. + `none` indicates that Xen should not use a console. This option only makes sense on its own. =20 @@ -1069,13 +1074,15 @@ affinities to prefer but be not limited to the spec= ified node(s). =20 Pin dom0 vcpus to their respective pcpus =20 -### dtuart (ARM) +### dtuart (ARM, RISC-V) > `=3D path [:options]` =20 > Default: `""` =20 Specify the full path in the device tree for the UART. If the path doesn't start with `/`, it is assumed to be an alias. The options are device spec= ific. +If the option is left empty, Xen will try to probe the device from the DT +property /chosen/stdout-path if present. =20 ### e820-mtrr-clip (x86) > `=3D ` --=20 2.43.0 From nobody Thu Sep 3 07:03:35 2026 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=1788334604; cv=pass; d=zohomail.com; s=zohoarc; b=F5I6emMajJDkXnahlfMmHgVL5xkemuY6o1QgsWTS91ZVBf5M+Dd6g2DU/vY2+Q8Row/MJghYnyrqj/tHwCNKGKs+N5VTil3C/l10Cvu5XbYjvkvBuaAAccKgqQv55VTHPUCUlA7G9X3s0KVaOMHZMnXi97SNdgeWrb1upPB6s+c= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788334604; 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=T0Km7Tc1xeK6Y+oTde3bVSSHLb0d+PMC+KbuvBwG/aM=; b=O1AhfBTMB1VqZZSLeTlGK1xMCH6GeQQ0GV7zUeRB4rjLFn7HYTpXn7BR+txKcxq9S2elXMbVR3vj85Z1f/Jk7l3meCJU53F8SdVq8niMG38j4R8VUayScDClwrO5HCOCBAKwOyiQooucd9rWTYOYNuTTWPW6JyIduqgAfE59bDU= 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 1788334604583461.3434632893649; Wed, 2 Sep 2026 00:36:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1405210.1638757 (Exim 4.92) (envelope-from ) id 1x1fWF-0005Mm-3Q; Wed, 02 Sep 2026 07:36:27 +0000 Received: by outflank-mailman (output) from mailman id 1405210.1638757; Wed, 02 Sep 2026 07:36:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1fWE-0005Md-Vl; Wed, 02 Sep 2026 07:36:26 +0000 Received: by outflank-mailman (input) for mailman id 1405210; Wed, 02 Sep 2026 07:36:26 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1fWD-0005LZ-Vd for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 07:36:26 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1x1fWD-00AbTn-C2 for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 09:36:25 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a97d1ea-2eae-0a2a0a5409dd-0a2a4504ea94-44 for ; Wed, 02 Sep 2026 09:36:25 +0200 Received: from [40.93.196.2] (helo=SA9PR02CU001.outbound.protection.outlook.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a97d1f7-b57f-0a2a45040019-285dc402c94b-3 for ; Wed, 02 Sep 2026 09:36:24 +0200 Received: from BY1P220CA0014.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59d::9) by MW3PR12MB4378.namprd12.prod.outlook.com (2603:10b6:303:52::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.360.13; Wed, 2 Sep 2026 07:36:19 +0000 Received: from SJ1PEPF00002327.namprd03.prod.outlook.com (2603:10b6:a03:59d:cafe::6a) by BY1P220CA0014.outlook.office365.com (2603:10b6:a03:59d::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.382.11 via Frontend Transport; Wed, 2 Sep 2026 07:36:19 +0000 Received: from satlexmb07.amd.com (165.204.84.17) by SJ1PEPF00002327.mail.protection.outlook.com (10.167.242.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.382.8 via Frontend Transport; Wed, 2 Sep 2026 07:36:18 +0000 Received: from Satlexmb09.amd.com (10.181.42.218) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.46; Wed, 2 Sep 2026 02:36:16 -0500 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb09.amd.com (10.181.42.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.46; Wed, 2 Sep 2026 02:36:16 -0500 Received: from APPOL-18KY0J4.xilinx.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.46 via Frontend Transport; Wed, 2 Sep 2026 02:36:14 -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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ruiZ55ql3MHuqd4kyhExdrhBVftriaLYAD+O/sZi7YkSA9t5frXV92mABVBkvDW+JSqZUcuvvw9jYCuC1jE8aPQCeFLnhhLk2PSpiNx5FsAoUkiBBCEkxtWmxHH7ub3y93WbYqYppfycAowjsAT4CqGXQad8ZlV4U7fg7LjR761ZXXo0xkPIWFU4Oq4hsm4VJCmG13lY6ug/PItsh1vxJs+eknIuZiEqeEcZpkoIabLplrjYlPYy53+os+9X5XepsiG325kXiYL0EG6qecZXmr0s+x/oyrGXmgP23pp/Z9Hd5bQvTUTiEmCtsOan1+bWpSGBAYSiH+FE3bHtxRG1qA== 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=T0Km7Tc1xeK6Y+oTde3bVSSHLb0d+PMC+KbuvBwG/aM=; b=HujfN4uzT9W7d0GdV/nXy9usB04kHIrD3uX5ZNQPdNPpKB0gk6JgML/lSfBftNZfIN6av93BYuTRSqRdpp3BcdzMLjr4vLkyxutxplLs/xlQVVtipfN4gT7htrpyMxQViN/FhYtpxsejVqI92tvF9lbSFHKbj8jnSzDuf9YSQ0uQML+EdyjD5jS1/oRPhsDMqqQIRMzuTn8mTEJ/ZJW/o9BORrL5WRCpHx3Lnodv35FZbsAVF7AINuDPj0fHoy1WaW2Ejx39ZnZ60NXQX6GdR2gp09Xtg6MKmX5CpgNHSJqMt/nzetHijKHX1rQVJVte2UKkJLtUBhJm8mdi1BQJTg== 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=T0Km7Tc1xeK6Y+oTde3bVSSHLb0d+PMC+KbuvBwG/aM=; b=I3c8IQ7KSO1LofH4zjhZliFbtI+dNawN3diSpQNmpHzCKej1DY278qabCB6uBB5oPt/vd6D3Wzv/qQAequPU0fckQW5LRp/4Tiu0URLmGuWIr5pAcXRPw3gp5Q0mibrU5a/H/vxSGGOxRA/tZkTesf7Xzrh+SVLlGn8xYfYZiNk= 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=satlexmb07.amd.com; pr=C From: Michal Orzel To: CC: Michal Orzel , Andrew Cooper , Anthony PERARD , "Jan Beulich" , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Stefano Stabellini" Subject: [PATCH 2/3] drivers/char: Check if console=dtuart for ACPI SPCR serial bring up Date: Wed, 2 Sep 2026 09:36:05 +0200 Message-ID: <20260902073606.61062-3-michal.orzel@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902073606.61062-1-michal.orzel@amd.com> References: <20260902073606.61062-1-michal.orzel@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002327:EE_|MW3PR12MB4378:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e1eebe0-8f56-4cf0-36a0-08df08c4e0f0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|36860700016|376014|23010399003|10067099003|56012099006|5023799004|11063799006|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: btRi+gCgVcVTQQ6LxvWDx1UoudHSu7iIaGZg63j3h2wXvVu+33S+JcYVLMl0xJLFO6852x/uPvkAAVfk5bHSuciI2NATt4qj5j45sb1/y2eEBwU91qgnRrSqHIOHywS/Aw5S4E6kEzF7QcDG8k0Iupnn3/V4CEGZayONddEU7OtULpjwHl/A/afbrKQ0vbpfOZ+vsm+SsX/0eOtbT5fPT9AKilJ8I5gkWdJWlamPZIFrJqRI+2FH8EIO0CGu1oUnn7iu9VJRjJ2/YbdevnBD6qTNfRttEWNV8413IICZxD8tNC1Gq6mCbyqEw7rI/0XgezMONI8osnsV4n9AvY1f3nFUm0c3m93bwb08049pxwIKtUi5ri5hIVtYYO5QOKlTfk4QuPOsUyX55pp6dvgyY/fjID0CSf7kPySXTaVxwga9CDeX8dic15dQBS3O2Qc2Ga745uKVuMHHonwofdvCQx+MTLUOCqzzDT1KpiyBAeG2IVtI1H7UFZMuM/4ne7+H9ajkpBYH1DNFUYqitSzuej5xZ44ty5kacmBkiGdI2kg7vo2n2+EbswFmz4zbqvjvoDTdp1qpLVzBW+4uHsE1PRuiY9oKPPMW2iZUzYucBn2VgtH0tdIaU+fMdJavzjcH2Kw4JOfl4GqUpBIwFzE+sZ3FXHieFlPc5JeJHKfgs7CKZLLvWw6SGNX0Xy9uCga9WuqvXik303SRsPeKGGUaxA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(36860700016)(376014)(23010399003)(10067099003)(56012099006)(5023799004)(11063799006)(22082099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rvlXpI3B5D+dPkXML7sviu/KWyCWEs1w/Xn5xOGpnW2oWAbwrZXhvH7hdTrjpkDaqkS1fHSFTdbhMXUKesv/EP+NlT4WjKvCrAag+6KH4BCos1LBIPmoSMtl+XgpDen734sX0rtkc8R3L0FNKSD09KuT7mw+HevI0NTrmgrYX2ijmA3enZkt5uKniAG+j54BfSPdou4oBxVPJS3Y+N5FbZ/R71I4ITQJDxVABxanQKkJKN8LTPvceokYqoZXkFhz11BMVBrwMG63hd141wLX44KTrFNGwnjkjFtvD2ijwUsMu1Yt5kYsAZNMS7qY8P6s0qC9rpzwx9zvbC+yHILvhP+TxYMn2j2bw2zj3GsnEtasqK3HOt7yStgjH+TNN+mdFWjQVEh0f/aewtml/6YSzW605dgp867FNytmX98Gs82C75nEii14QucseBEcT79Y X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2026 07:36:18.9334 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3e1eebe0-8f56-4cf0-36a0-08df08c4e0f0 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=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00002327.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4378 X-purgate-ID: tlsNG-ebf023/1788334585-C1CD7B50-13E7476A/0/0 X-purgate-type: clean X-purgate-size: 1335 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1788334607515154100 Content-Type: text/plain; charset="utf-8" dtuart denotes a generic UART parsed from a device tree (back then it was the only method, hence dt prefix) or ACPI SPCR table (they all use the SERHND_DTUART serial handle). Currently we only check if console=3D is set to dtuart in the DT flow and not in the ACPI flow. This means that even if we set console=3Dnone we would still bring up ACPI parsed serial device for nothing. Move the check to uart_init() to cover both paths. Signed-off-by: Michal Orzel Reviewed-by: Jan Beulich --- xen/drivers/char/uart-init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/drivers/char/uart-init.c b/xen/drivers/char/uart-init.c index a2181399389f..eb7f85549593 100644 --- a/xen/drivers/char/uart-init.c +++ b/xen/drivers/char/uart-init.c @@ -38,9 +38,6 @@ static void __init dt_uart_init(void) const char *options; char *split; =20 - if ( !console_has("dtuart") ) - return; /* Not for us */ - if ( !strcmp(opt_dtuart, "") ) { const struct dt_device_node *chosen =3D dt_find_node_by_path("/cho= sen"); @@ -121,6 +118,9 @@ static void __init acpi_uart_init(void) { } =20 void __init uart_init(void) { + if ( !console_has("dtuart") ) + return; /* Not for us */ + if ( acpi_disabled ) dt_uart_init(); else --=20 2.43.0 From nobody Thu Sep 3 07:03:35 2026 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=1788334606; cv=pass; d=zohomail.com; s=zohoarc; b=BeqAiUfkutGh9TpSyPR6JOoG/yI2/G1ts+1AJuW2A/kTqZ7ybK+Nsl+u6bOvCXIhuQCQSeP27MvWzxqacVze+KlF+AzW31+lLhIL+nDNk669z12rbWi3oOJdaa9ghDbwb0VVSDxhgFkPZbV8vvqe1q++phZ9YAzw8PUIqVYU3aw= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788334606; 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=yoClwoPRx+rVoH90jrgZnJbWUIYvOiLRrYE1TxOYvoM=; b=QQ1M2fdEa8TR03ccjlfQsVkdPxXBvaED9PSJNtmuoz25burN1xqXWbb1cWPgt9Sr/8KCP66LfVQiwcxcC41mppcF4pbK6OuPRXneCDFthKqgSCFFjDMwmze2xFyIgPfX3WqHczMNhssYRR4h6T2uhDsc2ZdeSC6EOtv1aq85HP8= 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 1788334606544357.2179452875615; Wed, 2 Sep 2026 00:36:46 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1405211.1638766 (Exim 4.92) (envelope-from ) id 1x1fWH-0005cK-Cm; Wed, 02 Sep 2026 07:36:29 +0000 Received: by outflank-mailman (output) from mailman id 1405211.1638766; Wed, 02 Sep 2026 07:36: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 1x1fWH-0005c8-9v; Wed, 02 Sep 2026 07:36:29 +0000 Received: by outflank-mailman (input) for mailman id 1405211; Wed, 02 Sep 2026 07:36:28 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1fWG-0005Yd-7a for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 07:36:28 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1x1fWF-00AbTn-Kp for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 09:36:27 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a97d1f9-2eae-0a2a0a5409dd-0a2a450489c4-14 for ; Wed, 02 Sep 2026 09:36:27 +0200 Received: from [52.101.56.28] (helo=BN1PR04CU002.outbound.protection.outlook.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a97d1f9-b57f-0a2a45040019-3465381cd0e9-3 for ; Wed, 02 Sep 2026 09:36:26 +0200 Received: from BY1P220CA0039.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59e::7) by DS0PR12MB999288.namprd12.prod.outlook.com (2603:10b6:8:424::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.382.10; Wed, 2 Sep 2026 07:36:21 +0000 Received: from SJ1PEPF00002322.namprd03.prod.outlook.com (2603:10b6:a03:59e:cafe::18) by BY1P220CA0039.outlook.office365.com (2603:10b6:a03:59e::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.382.11 via Frontend Transport; Wed, 2 Sep 2026 07:36:20 +0000 Received: from satlexmb07.amd.com (165.204.84.17) by SJ1PEPF00002322.mail.protection.outlook.com (10.167.242.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.382.8 via Frontend Transport; Wed, 2 Sep 2026 07:36:20 +0000 Received: from Satlexmb09.amd.com (10.181.42.218) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.46; Wed, 2 Sep 2026 02:36:18 -0500 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb09.amd.com (10.181.42.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.46; Wed, 2 Sep 2026 02:36:18 -0500 Received: from APPOL-18KY0J4.xilinx.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.46 via Frontend Transport; Wed, 2 Sep 2026 02:36:16 -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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YEzISwQ84XgqB0ZzR1HbpBwRw+me3Pm80+4F6xlRKJhI6NXRTtSV4PxrT+74THsr11Et3WcIv8q3uRncc6FN5s5+stBlH7sE/9mOlkjsUq+djPzR+cipHZEvL6QirrbxtrqYWhc4j3zMFlhJSLx6d+jnNa6QJbRWDT8t1HtO3KpQGmVMz2JTIdn9ArF+ongc+KECMzJH3Z1y1Yv2mtw0ZDFnwBWVHLMt5hWYUCP6Acut2yK+lD1kjjceAATQOz904F5BrMRgeahIUmB2RlWBEAHTnPraOVVNYo6nd/kmd652cheIz5rjWuLGSRue+Qcv7y8gF+xVilFeTSjPGdd4+g== 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=yoClwoPRx+rVoH90jrgZnJbWUIYvOiLRrYE1TxOYvoM=; b=T/vfSFtavqWzoFZbDgXyBYju2y2P4tItG7FhM6FaTgjztusA8oVXEl4yNlZx5gk0VF9mlv5avoPqv73a2Y2YiCX727LtQRvT/AiC2ophep0DzpV0hYlXj6J88ly+qfvvjL8T0U153FzhV0cF2N080sRT+nZIwCnpS0h2noElyy+wes6uDIB8ZbaKhHZydy+DkmIRKnxLtFneGKt4D5uQsEV8hGpxGE19MsdEl9SIOCx/LYWTS/nZJVgI/TvzX60Zb5Vm8mRmVC6rY9FUH4N5TJXl0VwElWholBDbJaeKkrB9J2Ozv8skObY4XsLt25JJ2R0cHfDxtsBqVtlEuZ+8Qw== 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=yoClwoPRx+rVoH90jrgZnJbWUIYvOiLRrYE1TxOYvoM=; b=EmUbQ9CX1BNWXRkVkEDtf6WxAN5IVgkgHxENnWLjPT3VoEORydAAiR4h6xV6ze9hQX0rxt3M6YvFUd1mjGQl3m0WUsvtcWIXs03ZNE6I+WPsQ9M47SGuCBAQ3l8XouLJPwWTLnN1T7d+jsOjXoHLz8p7Z1JXDywo77n+UmGuHbc= 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=satlexmb07.amd.com; pr=C From: Michal Orzel To: CC: Michal Orzel , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Alistair Francis , Connor Davis , "Oleksii Kurochko" Subject: [PATCH 3/3] drivers/char: Panic when the requested UART fails to initialise Date: Wed, 2 Sep 2026 09:36:06 +0200 Message-ID: <20260902073606.61062-4-michal.orzel@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902073606.61062-1-michal.orzel@amd.com> References: <20260902073606.61062-1-michal.orzel@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002322:EE_|DS0PR12MB999288:EE_ X-MS-Office365-Filtering-Correlation-Id: 10646f25-b374-42d9-bd4f-08df08c4e20c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|23010399003|7416014|36860700016|376014|10067099003|6133799003|3023799007|18002099003|22082099003|56012099006|5023799004|11063799006; X-Microsoft-Antispam-Message-Info: LYXTnWg8pzguaX9iGFTwT6p5KPwjpciyLG7VqkPx6xyd8VPMnE+ubyLfIxUoP3ejSc0PHi7tOGSPnW4OOVt2cwu9GdfT1aptwZwkpoucw8sljxUGAmJObCgCE4FF5XXnLbACiU73PK/Nd6lEmZ7Hwfu6+nWBgFv6fJmGKo5kTCEeXFjbXDcsWx9DZ/xJesXoBs6MPzcnhJ8lUCVEYwVXZWwpaeWWESz0b4r7LbLTUCg2Mf9YC4HlMBs7yRkpewc2PExOnZnYf9wLUp4+8lGo+LmbhrmPKERdwGMc+7FmTO3RZAi0CIfZTJUY46WHk4Htj/id/KrekgwhRBcTtKLW+/EQQ/84FDW5+8JAkEjlxvS30Dmh39IvUTmmoeEA8622BogqsFODlWwMo6UHvsHfoyJB96m1LgRQooknyfqybSpfpQouXypD7eX1Hw6Rdrhk5HLHqMByXB7xG5yY+NnyfUHsbK9KPRXvIWuyxDMXlTKOXfNoSBg5AqirZN4Hp7Db0Ssuwq31BzrGJdUpTFtbbIE4fRbBuakBw+V73PbArzcgMo3DdlehwqQVYbPrcqXxX20mSpKpcyF43Z1oHR/jW+i/PWSrxNmpiuuQMh4ZuvlCYtQPw1pKW/QO1/KuJ5NU/JwVpjCkZIDUQfpCfzq++UQW0L6pPd/xdKzv2HDby+eXs4D1iy6Xu+Veu2C985KbnvyFj+4q5JhBPdDcDs0TAA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(23010399003)(7416014)(36860700016)(376014)(10067099003)(6133799003)(3023799007)(18002099003)(22082099003)(56012099006)(5023799004)(11063799006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BwZrWZNkPynlZPPvZqrDT2AI9+Py690EvaCNAH0keNnP8DMMVwNYAUqFqDl/zLGEI9pqdKtGHWnfe7O5vx0egH6fJyu99dFPnQDENCIE35utYf5ZLpK3jl1IB/SIQLr5AnX5aTiJSRwZa/9bKp6eaoCzc/VJQKsnMEQq2pLdwPkaKpYMTuzxljR/YKtcJQiMEKZBPP3XCk7q6+q4DS36xfqiEez4j0pi0dbM0WDSfsZ4pwnIBtVnR53+2LL1SUHxlVkz/Jx9lnb/MPF11otp7mFLnDiD8xtJSlc4Z1q+d8JpCXh7qpjq3N36dLU1ZNeSHTPkW24b0a6cUAnXcBV0gyuXJW8Ywn2MM2vWq6UiYnHCyZdLydsdlMMMG7peb2mp0yxfxMEcWifVuA4T08zUFdQpo7UH5BvOwQ85/qNP6NLcVh1SQT7COIb0xNqpSWHA X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2026 07:36:20.8276 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10646f25-b374-42d9-bd4f-08df08c4e20c 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=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00002322.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB999288 X-purgate-ID: tlsNG-ebf023/1788334587-C08D9B50-FA0CC9A4/0/0 X-purgate-type: clean X-purgate-size: 6552 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1788334609641154100 Content-Type: text/plain; charset="utf-8" uart_init() cannot tell its caller that the UART the user asked for did not come up: every failure path only printks. Arm and RISC-V carry on into console_init_preirq() and boot without a console, rather than refusing to boot as they do elsewhere when a user request cannot be met. Return an error from dt_uart_init() and panic in start_xen(). An explicit request Xen cannot satisfy should stop the boot rather than silently degrade it, which is what start_xen() already does for the rest of the boot configuration. Only a path given on the command line counts as a request we have to satisfy. Falling back to /chosen/stdout-path or acpi_uart_init() therefore never fails. SPCR is firmware provided, the analogue of stdout-path, and there is no ACPI equivalent of dtuart=3D to make an explicit request with. While here, decide whether the SPCR table was found from the returned acpi_status rather than from the table pointer, which was only NULL because the caller initialised it - acpi_get_table() writes it solely on success. Signed-off-by: Michal Orzel --- With this change diagnosibility decreases only for a single scenario: when dom0 is reachable not via console (e.g. network) and you'd have used xl dmesg to read messages from the conring. On Arm (I suppose RISC-V is similar), given that safety becomes the major use-case and we need to satisfy all the user/guest-xen contracts, I think t= he patch moves us in a direction we already chose (i.e. we panic on every boot failure where we cannot meet the requests). --- xen/arch/arm/setup.c | 5 +++- xen/arch/riscv/setup.c | 6 ++++- xen/drivers/char/uart-init.c | 52 +++++++++++++++++++++--------------- xen/include/xen/serial.h | 6 ++++- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 6310a47d68b6..d0066db42e7c 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -379,7 +379,10 @@ void asmlinkage __init noreturn start_xen(unsigned lon= g fdt_paddr) =20 gic_preinit(); =20 - uart_init(); + rc =3D uart_init(); + if ( rc ) + panic("Failed to initialize the requested UART (%d)\n", rc); + console_init_preirq(); console_init_ring(); =20 diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 56a0907a855f..07f46ac3ce27 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -77,6 +77,7 @@ void __init noreturn start_xen(unsigned long bootcpu_id, { const char *cmdline; size_t fdt_size; + int rc; =20 remove_identity_mapping(); =20 @@ -149,7 +150,10 @@ void __init noreturn start_xen(unsigned long bootcpu_i= d, =20 intc_preinit(); =20 - uart_init(); + rc =3D uart_init(); + if ( rc ) + panic("Failed to initialize the requested UART (%d)\n", rc); + console_init_preirq(); =20 intc_init(); diff --git a/xen/drivers/char/uart-init.c b/xen/drivers/char/uart-init.c index eb7f85549593..b79135be9620 100644 --- a/xen/drivers/char/uart-init.c +++ b/xen/drivers/char/uart-init.c @@ -30,15 +30,17 @@ static char __initdata opt_dtuart[256] =3D ""; string_param("dtuart", opt_dtuart); =20 -static void __init dt_uart_init(void) +static int __init dt_uart_init(void) { struct dt_device_node *dev; int ret; const char *devpath =3D opt_dtuart; const char *options; char *split; + /* Set on the command line, as opposed to inherited from /chosen */ + bool explicit_request =3D strcmp(opt_dtuart, "") !=3D 0; =20 - if ( !strcmp(opt_dtuart, "") ) + if ( !explicit_request ) { const struct dt_device_node *chosen =3D dt_find_node_by_path("/cho= sen"); =20 @@ -62,7 +64,12 @@ static void __init dt_uart_init(void) if ( !strcmp(opt_dtuart, "") ) { printk("No dtuart path configured\n"); - return; + + /* + * console=3Ddtuart is the compiled-in default, so an absent dtuar= t=3D is + * not a failed user request. + */ + return 0; } =20 split =3D strchr(opt_dtuart, ':'); @@ -83,48 +90,49 @@ static void __init dt_uart_init(void) if ( !dev ) { printk("Unable to find device \"%s\"\n", devpath); - return; + return explicit_request ? -ENODEV : 0; } =20 ret =3D device_init(dev, DEVICE_SERIAL, options); - if ( ret ) printk("Unable to initialize dtuart: %d\n", ret); + + return explicit_request ? ret : 0; } =20 #ifdef CONFIG_ACPI -static void __init acpi_uart_init(void) +static int __init acpi_uart_init(void) { - struct acpi_table_spcr *spcr =3D NULL; + struct acpi_table_spcr *spcr; + acpi_status status; int ret; =20 - acpi_get_table(ACPI_SIG_SPCR, 0, (struct acpi_table_header **)&spcr); + /* SPCR is firmware provided, so nothing here is a failed user request= */ + status =3D acpi_get_table(ACPI_SIG_SPCR, 0, + (struct acpi_table_header **)&spcr); =20 - if ( spcr =3D=3D NULL ) + if ( ACPI_FAILURE(status) ) { printk("Unable to get spcr table\n"); + return 0; } - else - { - ret =3D acpi_device_init(DEVICE_SERIAL, NULL, spcr->interface_type= ); =20 - if ( ret ) - printk("Unable to initialize acpi uart: %d\n", ret); - } + ret =3D acpi_device_init(DEVICE_SERIAL, NULL, spcr->interface_type); + if ( ret ) + printk("Unable to initialize acpi uart: %d\n", ret); + + return 0; } #else -static void __init acpi_uart_init(void) { } +static int __init acpi_uart_init(void) { return 0; } #endif =20 -void __init uart_init(void) +int __init uart_init(void) { if ( !console_has("dtuart") ) - return; /* Not for us */ + return 0; /* Not for us */ =20 - if ( acpi_disabled ) - dt_uart_init(); - else - acpi_uart_init(); + return acpi_disabled ? dt_uart_init() : acpi_uart_init(); } =20 /* diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h index 8e1844555208..3a71da767dd7 100644 --- a/xen/include/xen/serial.h +++ b/xen/include/xen/serial.h @@ -170,7 +170,11 @@ void xhci_dbc_uart_init(void); static void inline xhci_dbc_uart_init(void) {} #endif =20 -void uart_init(void); +/* + * Returns 0 unless a UART explicitly requested via dtuart=3D failed to + * initialise. + */ +int uart_init(void); =20 struct physdev_dbgp_op; int dbgp_op(const struct physdev_dbgp_op *op); --=20 2.43.0