[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] xen/common: add keyhandler to show Xen command line


  • To: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
  • From: dmukhin@xxxxxxxx
  • Date: Tue, 11 Aug 2026 13:56:30 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 205.220.161.53) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=ford.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ford.com; dkim=pass (signature was verified) header.d=saarlouis.ford.com; dkim=pass (signature was verified) header.d=ford.com; arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xaJSCv2lEXMaKDFwipG2L6SrodZaW09V9uuUK67N/dc=; b=voS6uiKb3XaJwLynr2rMmEVjKGzoPkL7NYUDMiMMXDC0J/OEqPI8dctiSx9lfiu6oXOX83MQtdeFG6dj3UTmOVAn/Ys+Xumr6CgwJOMud+9XoVnmLjUlUQKpjrmYdyzsbeGzuGxg9UWl5OuSNvNlY6JP5cJ7DmbfOcTgEuI0XO2Q99oKs6GsTjnRU63Sn31Eg4BhqI9+olt//uAOCZ+3x7hlYfASoaSDcbmA6s484wm086tDAbzpyYC35K0+l3hsHkLwlU/+VMe96pK0FmyK1CWn0BzScL7mKqGdFXClHETA0uCu0xixOh7/kZzhYRNiD5u2CRSjcUv+EZrZlduu8Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QJoOPPTQDT/Rh5naPIfHi1ltmGlTuhYVl9R/r7OsTimr+nEmQnehQaAyqQ31ucJdAIMvsTzknmvRc+DmdcR0lGRfWYoXEovYPNSw9974mRt1gLeA52am2Vj0d+wEj9jVsWjEUXbbsuxZ9dSfCE2TIUEhl/PiDbzbWQpyN5uqO8qPDJK40Vun3WODTCS9xM9RN7vj1ANXNoSf5fjFk6C1c9vuhyhDoS5L691YZJ2SRro4JAHhs33+QZ26c/bHYoHxwO91BCh+ipFbjTrq96GqEJYFZDD6/jNt4zM/8Wq+KbFoZAL0BmmNatLDWWDxM+tDdEcA90f7c1/no1o4z1+q3Q==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=ppford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=fail header.s=selector2-azureford-onmicrosoft-com header.d=azureford.onmicrosoft.com header.i="@azureford.onmicrosoft.com"; dkim=pass header.s=ppserprodsaar header.d=saarlouis.ford.com header.i="@saarlouis.ford.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=ppfserpocford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"
  • Cc: dmukhin@xxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, anthony.perard@xxxxxxxxxx, jbeulich@xxxxxxxx, julien@xxxxxxx, michal.orzel@xxxxxxx, sstabellini@xxxxxxxxxx
  • Delivery-date: Tue, 11 Aug 2026 20:57:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Pser-m365-app: SER-APP

Thanks for taking a look!

On Tue, Aug 11, 2026 at 10:05:17AM +0200, Roger Pau Monné wrote:
> On Mon, Aug 10, 2026 at 04:04:01PM -0700, dmukhin@xxxxxxxx wrote:
> > From: Denis Mukhin <dmukhin@xxxxxxxx> 
> > 
> > Currently there's no way to print Xen command line on the emergency
> > console for debugging purposes when 'xl' is not unavailable.
> > 
> > Add new keyhander 'X' to do command line printout.
> > 
> > Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
> > ---
> > Changes since v2:
> > - account for CONFIG_CMDLINE_OVERRIDE case
> > - use IS_ENABLED()
> > 
> > v2: 
> > https://lore.kernel.org/xen-devel/20260803070047.3097846-3-dmukhin@xxxxxxxx/
> > CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/2748655201
> > ---
> >  xen/common/kernel.c | 20 ++++++++++++++++++++
> >  1 file changed, 20 insertions(+)
> > 
> > diff --git a/xen/common/kernel.c b/xen/common/kernel.c
> > index d1bef9ac2b2b..54a7ee6f68e5 100644
> > --- a/xen/common/kernel.c
> > +++ b/xen/common/kernel.c
> > @@ -5,6 +5,7 @@
> >   */
> >  
> >  #include <xen/init.h>
> > +#include <xen/keyhandler.h>
> >  #include <xen/lib.h>
> >  #include <xen/errno.h>
> >  #include <xen/param.h>
> > @@ -505,6 +506,25 @@ static int __init cf_check param_init(void)
> >  __initcall(param_init);
> >  #endif
> >  
> > +static void cf_check show_hypervisor_info(unsigned char key)
> > +{
> > +    printk("'%c' pressed -> showing hypervisor information\n", key);
> > +
> > +    if ( IS_ENABLED(CONFIG_CMDLINE_OVERRIDE) )
> > +        printk("Bootloader command line ignored 
> > (CONFIG_CMDLINE_OVERRIDE=y)\n");
> 
> Since we are there already, why not print the builtin command line
> using CONFIG_CMDLINE?

Will update.

> 
> > +    else
> > +        printk("Command line: %s\n", saved_cmdline);
> > +}
> > +
> > +static int __init cf_check misc_init(void)
> > +{
> > +    register_keyhandler('X', show_hypervisor_info,
> > +                        "show hypervisor information", 0);
> 
> "show hypervisor information" seems too generic to me, almost all
> debug keys could be defined by this sentence TBH.  I think this needs
> to be more specific, but I'm not sure what's the plan regarding this
> key.  Is there an intention to print more stuff here, or just the
> command line?  Knowing the full set of information to be printed might
> help come up with a better name.

I will update to "show_cmdline" since I originally planed to expose Xen
command line only so it is possible to better debug a system when dom0
becomes almost unresponsive.

> 
> Thanks, Roger.
> 

--
Denis



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.