lkml.org 
[lkml]   [2022]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 14/14] tty: gunyah: Add tty console driver for RM Console Services


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

\
 
 \ /
  Last update: 2022-10-09 23:11    [W:0.056 / U:1.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site