[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 21/35] xen/console: introduce console_init_owner()
On Tuesday, December 10th, 2024 at 11:31 PM, Jan Beulich <jbeulich@xxxxxxxx> wrote: > > > On 06.12.2024 05:41, Denis Mukhin via B4 Relay wrote: > > > --- a/xen/drivers/char/console.c > > +++ b/xen/drivers/char/console.c > > @@ -554,6 +554,22 @@ static void console_find_owner(void) > > console_set_owner(DOMID_XEN); > > } > > > > +static void console_init_owner(void) > > +{ > > + domid_t domid; > > + > > + /* > > + * If user specifies so, we fool the switch routine to redirect input > > + * straight back to Xen. > > + */ > > + if ( opt_conswitch[1] == 'x' ) > > + domid = DOMID_XEN; > > + else > > + domid = get_initial_domain_id(); > > + > > + console_set_owner(domid); > > +} > > > Is this function meant to gain a 2nd user? If not, what exactly is the goal > of introducing this new function? I cannot foresee the second user. My rationale was moving all console ownership initialization into one place so the code is better localized. > > If the function's addition is warranted, it wants to be __init, matching ... I ended up dropping the patch in v3. > > > @@ -1160,8 +1168,7 @@ void __init console_endboot(void) > > register_irq_keyhandler('G', &do_toggle_guest, > > "toggle host/guest log level adjustment", 0); > > > > - /* Serial input is directed to DOM0 by default. */ > > - console_find_owner(); > > + console_init_owner(); > > } > > > ... sole caller. > > Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |