From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2761C433FE for ; Mon, 10 Oct 2022 20:25:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229943AbiJJUZ3 (ORCPT ); Mon, 10 Oct 2022 16:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231370AbiJJUYs (ORCPT ); Mon, 10 Oct 2022 16:24:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD0F27C1CD; Mon, 10 Oct 2022 13:23:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0122FB810D2; Mon, 10 Oct 2022 20:22:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36D30C433D6; Mon, 10 Oct 2022 20:22:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665433365; bh=CHynigbFeyVcxvAoFQLwXJcDP7G6kpYQrKkE1dE9CSc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CF5T9mxCd+XOc59MIW/z3FQPNegwAu9mRPPpzHF5fL/flQaQdxMvVKxG8OhUpN8xI UfJ0RkWL6ObjBUX6G/fCxetSew7VvVCFJkz7zEvBSoqRbb1+TBUhDmHJIOkjEGQLPn eqp3Jak+hwhrFq0IDHhRkWM358HPzOSW21aXse1A= Date: Mon, 10 Oct 2022 22:23:29 +0200 From: Greg Kroah-Hartman To: Elliot Berman Cc: Jiri Slaby , Bjorn Andersson , Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Prakruthi Deepak Heragu , Andy Gross , Dmitry Baryshkov , Jassi Brar , linux-arm-kernel@lists.infradead.org, Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Will Deacon , Catalin Marinas , Arnd Bergmann , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 14/14] tty: gunyah: Add tty console driver for RM Console Services Message-ID: References: <20220928195633.2348848-1-quic_eberman@quicinc.com> <20220928195633.2348848-15-quic_eberman@quicinc.com> <14d0ff9f-60f3-71cc-ea42-ceee389298ac@quicinc.com> <615493a8-449d-b105-709e-0642dfb5359b@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <615493a8-449d-b105-709e-0642dfb5359b@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 09, 2022 at 01:59:21PM -0700, Elliot Berman wrote: > > > On 10/7/2022 12:40 AM, Greg Kroah-Hartman wrote: > > On Thu, Oct 06, 2022 at 10:59:51PM -0700, Elliot Berman wrote: > > > > > > "GH" is the shorthand we've been using for "Gunyah". I didn't find > > > documentation for dynamically assigned char devices, but if it exists, I can > > > add entry for ttyGH. > > > > Why use a new name at all? Why not stick with the existing tty names > > and device numbers? > > > > I can use hvc framework, although driver-level buffering is needed on > both the get_chars/put_chars paths because: I'm not asking about the framework (although that is a good question, you need to document why this has to be new.) I'm asking why pick a new name? You will not have a name conflict in your system with this device with any other tty name right? > - get_chars wants to poll for characters, but Gunyah will push > characters to Linux > - put_chars can be called in atomic context in the printk console path. > Gunyah RM calls can sleep, so we add to buffer and queue work to > write the characters. > > I also chose to use new tty driver because the Gunyah hypervisor call to > open the console (gh_rm_console_open) can only be done after starting the > VM. Gunyah will only forward characters sent from the other VM to Linux > after the gh_rm_console_open call is made. When launching a VM, users would > want to open console before VM starts so they can get startup messages from > the VM. I planned to use the carrier_raised() to hold > tty_port_block_until_ready until the VM is started and the > gh_rm_console_open() happens. I'm sorry, but I don't understand this. Why is this all a new api at all? What about the virtio api? Why not just use that instead? thanks, greg k-h