Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1273654rwi; Mon, 10 Oct 2022 13:56:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5maPrhEwt+uIW951RhMQ+b8XHhgLMW24J5GkZkSBixcIKlF1GXvT6OfffokYHY/jRUfUJB X-Received: by 2002:a17:902:7c0d:b0:178:a6ca:1dbc with SMTP id x13-20020a1709027c0d00b00178a6ca1dbcmr21347390pll.115.1665435401174; Mon, 10 Oct 2022 13:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665435401; cv=none; d=google.com; s=arc-20160816; b=DP31gFBegaxcXVL6ceKhPasKYOvZhd9Q8Ahswn2oISlzroBwCnto9cfdhS4xYxXNw1 8G+HNrN2aorAXnGAWYICSHiCSMHrOyBTXWGC/B43PfIkPIJWE+CUCPQyIU46foXmDAcT 9drABbkg1cr1QvQnnwYEDLiaGkao/bYzf85XB33U1GIQU0C+w7RA36ePcH3oM80tqQWC JU3BrB/V3Z6xd/ilnsEyOjI8tyQGvRMsQQl/JZMRxqz1S8IjQnsFsJMy4XtsiQ2oIIxJ 3J21MWU1M5ad0enU+dXAi6beGu1zIN1RjzEjXeHnqE5ax9bgfS0lultmK084mFkt2xTy A5hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eXiV+nC8IQmQA/CEQn7oEcWLauXEIdiSx1+U7VH6EBY=; b=CTslg/DD2w/huNsqHN/W9ueHmplEIAb4VlvDvcSlH2vFk3Ys3poKJlE0K7MwOvt5rL tLwSQsT8nA5FFYORuAENlVmo6MARXdBJ1hCCrrlO83D6oE9kica8rKSDGXodDr0myeB9 bY27lvvSFMQeQzHh+EhhwAjNzLV+rptef7YWl9mG59buACUkzS928XRStFL5KNaJTJqT zN9eDh6C+ErbApmDBfVpTjFJdbka+of7MpZLo24whli9t3ePLlefEd/Nj+e0gpqVg0N5 Be3I6ZQLrXhVv1N6b/j0yKUZGAwV5wVqdkK0/ecfQ9lMYiCHgSUl2wSDaZBLZZg3WyBh qEUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CF5T9mxC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a631755000000b0044e12bf26ecsi12553567pgx.465.2022.10.10.13.56.28; Mon, 10 Oct 2022 13:56:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CF5T9mxC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229928AbiJJUZ2 (ORCPT + 99 others); Mon, 10 Oct 2022 16:25:28 -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> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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