HUPin the ttys in drivers/char/hvcs.c

Ryan Arnold rsa at
Thu Feb 3 06:50:51 EST 2005

On Tue, 2005-02-01 at 14:34 -0500, Jimi Xenidis wrote:
> In an LPAR environment there is the hvc (client side VTERM) and the
> hvcs (server side VTERM).  If the /dev/hvcs<n> is paired/registered
> with a VTERM what is removed (as in the case of LPAR death) the
> H_GET_TERM_CHAR hcall will eventually return H_Closed.
> IMHO, when this event occurs the /dev/hvcs<n> should get HUPed and
> ultimately an H_FREE_VTERM should occurs on the channel.
> Otherwise the administrator would have to clean up after it.
> Thoughts?
> -JX

Hey Jimi,

Great catch, you're absolutely right.  At the moment, hvcs
uses /arch/ppc64/kernel/hvconsole.c::hvc_get_chars() to gather character
data from the hypervisor.  If the partner vty adapter is removed, as you
say, an H_Closed will be returned to hvc_get_chars().  This function
doesn't do anything with errors atm.  I think the best thing to do would
be to update the arch code to return an errno when errors are

Then hvcs can kick off a hangup if a partner adapter is removed.

Thanks for catching this Jimi.  It may take me a bit to get a fix.  I
have to make sure the hvcs scheduling algorithm can properly handle this

Ryan Arnold <rsa at>
IBM Linux Technology Center

More information about the Linuxppc64-dev mailing list