From nobody Wed Feb 11 05:38:42 2026 Delivered-To: importer@patchew.org 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; 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; dmarc=pass(p=quarantine dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1732663418; cv=none; d=zohomail.com; s=zohoarc; b=iLZ85yruYbO1elD7Ktb5M/xZ5kP6tnP3iDl9fKsntvibwq6U1Rv5UlxeTgvWMTMFTJoTBLRgfqWNfY9xbHR/TBn3LhJWOrZ4smI9/E04YggrfWSqEV7HS5ZiVaIse1aiouflfAcOEjHqxZfFs6URz3IdP2Cz7G6Gf4YSyCtq6+o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732663418; 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:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=Me70oX+fE9VfPiIx6lJXAk9ndNsijJyKpLgvhUFifM4=; b=YrX81sbIRhi1Aa93usc/qyyjoQ3Z0HmmxiZkQu144ree5mDITGahBAU9/T0w6lMuNOQnDqLVsqCB2fOao/GFlD2JxYjx7JahdiWLNHkJhgDd6WSMNBxyRj+1lObGG3tsWnDMTWv57L1R0vW4lz8vyKR8nl0hR+8UjTuSR12qjEc= ARC-Authentication-Results: i=1; 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; 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 1732663418579336.5011841203685; Tue, 26 Nov 2024 15:23:38 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.844060.1259668 (Exim 4.92) (envelope-from ) id 1tG4tq-0001jU-9W; Tue, 26 Nov 2024 23:23:18 +0000 Received: by outflank-mailman (output) from mailman id 844060.1259668; Tue, 26 Nov 2024 23:23:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tG4tp-0001hF-KO; Tue, 26 Nov 2024 23:23:17 +0000 Received: by outflank-mailman (input) for mailman id 844060; Tue, 26 Nov 2024 23:22:06 +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 1tG4sg-0000Ao-Lb for xen-devel@lists.xenproject.org; Tue, 26 Nov 2024 23:22:06 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [2604:1380:4641:c500::1]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3d87a499-ac4d-11ef-a0cd-8be0dac302b0; Wed, 27 Nov 2024 00:22:02 +0100 (CET) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 550B45C5CF1; Tue, 26 Nov 2024 23:21:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 83748C4CEDD; Tue, 26 Nov 2024 23:21:56 +0000 (UTC) Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C9CCD66B8E; Tue, 26 Nov 2024 23:21:56 +0000 (UTC) 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: 3d87a499-ac4d-11ef-a0cd-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjI2MDQ6MTM4MDo0NjQxOmM1MDA6OjEiLCJoZWxvIjoiZGZ3LnNvdXJjZS5rZXJuZWwub3JnIn0= X-Custom-Transaction: eyJpZCI6IjNkODdhNDk5LWFjNGQtMTFlZi1hMGNkLThiZTBkYWMzMDJiMCIsInRzIjoxNzMyNjYzMzIyLjg5ODM2Miwic2VuZGVyIjoiZGV2bnVsbCtkbXVraGluLmZvcmQuY29tQGtlcm5lbC5vcmciLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732663316; bh=Cap5cSdXQnJhIWZIJycGmw66XTO7q8HjNlh67Jy7JB4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Roi4bnO89HuQscE/mllmZ4di8KrGNkAEgaFCrZwspwH1JCGP7EeSelMhqJp3FtN2p 1vmqcBEY6PtxBqWJW1VUHMpW/bPH5B+YC80zhJx30UowTy+ZgCQQnJEd0hnAn1Hlkt XcGKUReaRSPFHSjEvr5WInFgGkBvQkKepHz1F2TNg2MZxcNVm5HUfJxwzd27u0Wdt2 DjdOJziJugSXgtF7Jn3f6bo30Ln6l01S2E8qR9nY0G4TFpac36FqwR/86tOFX/ts/x nKhPwQFQosdNK6Bir87YPHUpd+Dfu25EOC3kfrmlu72LVexy+/k0LtMpla4qGDvOj8 CoRT7AHq/AL0A== From: Denis Mukhin via B4 Relay Date: Tue, 26 Nov 2024 15:22:07 -0800 Subject: [PATCH 17/36] xen/console: rename switch_serial_input() to console_find_owner() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241126-vuart-ns8250-v1-v1-17-87b9a8375b7a@ford.com> References: <20241126-vuart-ns8250-v1-v1-0-87b9a8375b7a@ford.com> In-Reply-To: <20241126-vuart-ns8250-v1-v1-0-87b9a8375b7a@ford.com> To: Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , "Daniel P. Smith" , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Rahul Singh , Volodymyr Babchuk , Alistair Francis , Bob Eshleman , Connor Davis , Oleksii Kurochko , Shawn Anastasio , Anthony PERARD , Juergen Gross , Christian Lindig , David Scott , =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= Cc: xen-devel@lists.xenproject.org, Denis Mukhin X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732663312; l=1478; i=dmukhin@ford.com; s=20241125; h=from:subject:message-id; bh=kkv+AJB+iT69SEANPtdQ4jOx6o8Fe+p28DiGHObsMCE=; b=34yyRPfAwR5Xa4Xuz4/BOFOrcATMDRQQnnZ5y9UsR0hdVr18qx/Zq/l4GCrf/HFvgLYIzpxwv YVD7bNrxNZHCYCzTZGhZp5eE+8zkM7+FIcjsbE+IX79uUTZFrdW6EHP X-Developer-Key: i=dmukhin@ford.com; a=ed25519; pk=SsDZ9p39s0fqcpUKQuqKqrbn0rq6EtEAClvpOpzx6+U= X-Endpoint-Received: by B4 Relay for dmukhin@ford.com/20241125 with auth_id=287 X-Original-From: Denis Mukhin Reply-To: dmukhin@ford.com X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1732663419033019100 From: Denis Mukhin Updated the name to highlight the logic of selection the physical console owner: existing code does not switch only serial console, it also switches video console and debugging console (debug I/O port and console hypercall). Signed-off-by: Denis Mukhin --- xen/drivers/char/console.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 01fcbd5581d11f8f4f2b23592255b5c744430a3e..f8a7db385c9525cabc69ceb1a84= d73f57863aa45 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -485,7 +485,7 @@ struct domain *rcu_lock_domain_console_owner(void) } #endif =20 -static void switch_serial_input(void) +static void console_find_owner(void) { unsigned int next_rx =3D console_rx; =20 @@ -588,7 +588,7 @@ static void cf_check serial_rx(char c) /* We eat CTRL- in groups of 3 to switch console inpu= t. */ if ( ++switch_code_count =3D=3D 3 ) { - switch_serial_input(); + console_find_owner(); switch_code_count =3D 0; } return; @@ -1128,7 +1128,7 @@ void __init console_endboot(void) "toggle host/guest log level adjustment", 0); =20 /* Serial input is directed to DOM0 by default. */ - switch_serial_input(); + console_find_owner(); } =20 int __init console_has(const char *device) --=20 2.34.1