Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3942967rwb; Sun, 9 Oct 2022 14:20:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4hg36l2/QxusMYxVXh4rIb+Gzqf6RnTyMwGvS23ykhKtyCD8UdTsVxQuc7HXqBXqRkUMxy X-Received: by 2002:a17:907:3e02:b0:782:1267:f2c8 with SMTP id hp2-20020a1709073e0200b007821267f2c8mr12365598ejc.585.1665350439539; Sun, 09 Oct 2022 14:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665350439; cv=none; d=google.com; s=arc-20160816; b=W1Re6itRwWw7fU7Beu65lSztWY/w4ndiXWRhpYyZV7WzpMCPHqBHN/Nw9mmylTH72N CvdisyDrivE34UbofyCnuuVOzVPgPtsBoTxNTZxdl6j+zNuUyNvJGtAXOlEQ8Q3UPV/+ bVeo3fs97wfDjHwyaJ4KCRkgmdvfnS7/p5PJu1DueHetpz0qvUjccGa6gBIqr6c4LeMR Be9yqmRGZs+QNTBRxaZV7STFdCJtfMpg2EBo2ClfoAUkTKaKl2hnE1LnkpSRJTNJ1O8V qUthtl6p1cr3eJSJlJxDl42+VJgzeFgAEG4rTqKdBCvvRJIQcXA/IOazpCoXdOxjz1hV ArmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=YEYGFGEhRUF1GvIBQpFpZ4vv7/I8t1gr51UudbUv544=; b=zph7nPTXRYcn9rLu2JN64WwOHTVUJnLy/AunaV4BI/4PDWVcLbRH4gu/1ft/mZOkXX 526x7ujJh/2SlR9D6aqENq8QMe2B4tsoRGWnuPnS0Zrit8qJR59Nx9TcErYOeZlWLDxX UYuTWkKbOPjAt1QLSVvH+FhXhC4UFkE+tuAWc0sNaPaCyEBbZgBpPdXt6YVeO6ApkaJZ AXlMYHfhniqcEV+7AouzXutbupJ7JmcDcFb1VntR0BOPeG5LTv5/tbD1QRM3PRvuksRP bUgbsAe1W2HNOLBnB9PD5yJ08DDoXRhIfh2A1bBSVUQM82aRwvp8fOuEMmKza9HOKeMj hLuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=Bs7jzHJR; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14-20020a170906314e00b00782b2a97827si8645947eje.242.2022.10.09.14.20.14; Sun, 09 Oct 2022 14:20:39 -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=@quicinc.com header.s=qcdkim header.b=Bs7jzHJR; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231472AbiJIVKl (ORCPT + 99 others); Sun, 9 Oct 2022 17:10:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbiJIVKQ (ORCPT ); Sun, 9 Oct 2022 17:10:16 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9241238697; Sun, 9 Oct 2022 14:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1665349471; x=1696885471; h=message-id:date:mime-version:from:subject:to:cc: references:in-reply-to:content-transfer-encoding; bh=YEYGFGEhRUF1GvIBQpFpZ4vv7/I8t1gr51UudbUv544=; b=Bs7jzHJRIvuHHpNEGGD1xeqCUt9TOTEHsqX+75/607+77Vnmzr5KzyMF 8JJmog56YXTl1O9mnCwoFOykHY6lmiYkCbUT9ErTAspZbZtOUngjoyn8V 1ZszqJJKBBsdQ+5uA2j+ZhKp89G/9qgZ0HRvLYOuCKV6zxeqhomYFMXIk 4=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 09 Oct 2022 13:59:23 -0700 X-QCInternal: smtphost Received: from nasanex01b.na.qualcomm.com ([10.46.141.250]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2022 13:59:23 -0700 Received: from [10.110.10.240] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Sun, 9 Oct 2022 13:59:22 -0700 Message-ID: <615493a8-449d-b105-709e-0642dfb5359b@quicinc.com> Date: Sun, 9 Oct 2022 13:59:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 From: Elliot Berman Subject: Re: [PATCH v4 14/14] tty: gunyah: Add tty console driver for RM Console Services To: Greg Kroah-Hartman , Jiri Slaby CC: Bjorn Andersson , Murali Nalajala , Trilok Soni , "Srivatsa Vaddagiri" , Carl van Schaik , Prakruthi Deepak Heragu , Andy Gross , Dmitry Baryshkov , Jassi Brar , , Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , "Will Deacon" , Catalin Marinas , "Arnd Bergmann" , , , , References: <20220928195633.2348848-1-quic_eberman@quicinc.com> <20220928195633.2348848-15-quic_eberman@quicinc.com> <14d0ff9f-60f3-71cc-ea42-ceee389298ac@quicinc.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 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: - 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. Thanks, Elliot