* [PATCH v6 0/2] add keyhandler to show Xen command line
@ 2026-08-14 1:02 dmukhin
2026-08-14 1:02 ` [PATCH v6 1/2] xen/common: " dmukhin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: dmukhin @ 2026-08-14 1:02 UTC (permalink / raw)
To: xen-devel
Cc: andrew.cooper3, anthony.perard, jbeulich, julien, michal.orzel,
roger, sstabellini, dmukhin
Mini-series to add new keyhander '?' for showing system information,
including command line and version info.
v5: https://lore.kernel.org/xen-devel/20260813035139.915536-2-dmukhin@ford.com/
CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/2758940285
Denis Mukhin (2):
xen/common: add keyhandler to show Xen command line
xen/common: move version printout under '?' keyhandler
xen/common/kernel.c | 20 +++++++++++++++++++-
xen/common/keyhandler.c | 14 +++++++++++---
xen/include/xen/lib.h | 1 +
3 files changed, 31 insertions(+), 4 deletions(-)
--
2.54.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v6 1/2] xen/common: add keyhandler to show Xen command line
2026-08-14 1:02 [PATCH v6 0/2] add keyhandler to show Xen command line dmukhin
@ 2026-08-14 1:02 ` dmukhin
2026-08-14 1:02 ` [PATCH v6 2/2] xen/common: move version printout under '?' keyhandler dmukhin
2026-08-18 8:49 ` [PATCH v6 0/2] add keyhandler to show Xen command line Jan Beulich
2 siblings, 0 replies; 5+ messages in thread
From: dmukhin @ 2026-08-14 1:02 UTC (permalink / raw)
To: xen-devel
Cc: andrew.cooper3, anthony.perard, jbeulich, julien, michal.orzel,
roger, sstabellini, dmukhin
From: Denis Mukhin <dmukhin@ford.com>
Currently there's no way to print Xen command line on the emergency
console for debugging purposes when 'xl' is unavailable.
Add new print_cmdline() function to print both built-in and run-time
command lines on the console.
To allow built-in command printout, drop __initconst in
'opt_builtin_cmdline' declaration.
Add new keyhander '?' to show command line printout.
Signed-off-by: Denis Mukhin <dmukhin@ford.com>
---
Changes since v5:
- drop version printout from 'h'
- add new handler for system information
Changes since v4:
- promote opt_builtin_cmdline to __ro_after_init and use it for
built-in command line reporting
- account for empty saved_cmdline
- adjust register_keyhandler() call - use '?'
Changes since v3:
- print built-in command line too
- change handler to print command line only
Changes since v2:
- account for CONFIG_CMDLINE_OVERRIDE case
---
xen/common/kernel.c | 20 +++++++++++++++++++-
xen/common/keyhandler.c | 10 +++++++++-
xen/include/xen/lib.h | 1 +
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index d1bef9ac2b2b..f4bbd8818fa8 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -35,7 +35,7 @@ boolean_param("dit", opt_dit);
#endif
static xen_commandline_t __ro_after_init saved_cmdline;
-static const char __initconst opt_builtin_cmdline[] = CONFIG_CMDLINE;
+static const char opt_builtin_cmdline[] = CONFIG_CMDLINE;
char __ro_after_init xen_cap_info[128];
static int assign_integer_param(const struct kernel_param *param, uint64_t val)
@@ -758,6 +758,24 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
return -ENOSYS;
}
+void print_cmdline(void)
+{
+ const char *cmdline;
+
+ if ( opt_builtin_cmdline[0] )
+ printk("Built-in command line: %s\n", opt_builtin_cmdline);
+
+ if ( IS_ENABLED(CONFIG_CMDLINE_OVERRIDE) )
+ cmdline = "<ignored> (CONFIG_CMDLINE_OVERRIDE=y)";
+ else if ( saved_cmdline[0] )
+ cmdline = saved_cmdline;
+ else
+ cmdline = NULL;
+
+ if ( cmdline )
+ printk("Command line: %s\n", cmdline);
+}
+
/*
* Local variables:
* mode: C
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index cb6df2823b00..92b0573d8b3a 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -28,7 +28,7 @@ static unsigned char keypress_key;
static bool alt_key_handling;
static keyhandler_fn_t cf_check show_handlers, cf_check dump_hwdom_registers,
- cf_check dump_domains, cf_check read_clocks;
+ cf_check dump_domains, cf_check read_clocks, cf_check show_system_info;
static irq_keyhandler_fn_t cf_check do_toggle_alt_key, cf_check dump_registers,
cf_check reboot_machine, cf_check run_all_keyhandlers;
@@ -58,6 +58,7 @@ static struct keyhandler {
KEYHANDLER('t', read_clocks, "display multi-cpu clock info", 1),
KEYHANDLER('0', dump_hwdom_registers, "dump Dom0 registers", 1),
IRQ_KEYHANDLER('*', run_all_keyhandlers, "print all diagnostics", 0),
+ KEYHANDLER('?', show_system_info, "show system information", false),
#ifdef CONFIG_PERF_COUNTERS
KEYHANDLER('p', perfc_printall, "print performance counters", 1),
@@ -138,6 +139,13 @@ static void cf_check show_handlers(unsigned char key)
isprint(i) ? i : ' ', i, key_table[i].desc);
}
+static void cf_check show_system_info(unsigned char key)
+{
+ printk("'%c' pressed -> showing system information\n", key);
+
+ print_cmdline();
+}
+
static cpumask_t dump_execstate_mask;
void cf_check dump_execstate(const struct cpu_user_regs *regs)
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index 3c545ff33c61..618e37b920e3 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -48,6 +48,7 @@ int parse_signed_integer(const char *name, const char *s, const char *e,
int cmdline_strcmp(const char *frag, const char *name);
void print_version(void);
+void print_cmdline(void);
#ifdef CONFIG_DEBUG_TRACE
extern void debugtrace_dump(void);
--
2.54.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v6 2/2] xen/common: move version printout under '?' keyhandler
2026-08-14 1:02 [PATCH v6 0/2] add keyhandler to show Xen command line dmukhin
2026-08-14 1:02 ` [PATCH v6 1/2] xen/common: " dmukhin
@ 2026-08-14 1:02 ` dmukhin
2026-08-18 8:49 ` [PATCH v6 0/2] add keyhandler to show Xen command line Jan Beulich
2 siblings, 0 replies; 5+ messages in thread
From: dmukhin @ 2026-08-14 1:02 UTC (permalink / raw)
To: xen-devel
Cc: andrew.cooper3, anthony.perard, jbeulich, julien, michal.orzel,
roger, sstabellini, dmukhin
From: Denis Mukhin <dmukhin@ford.com>
Move Xen version printout from 'h' keyhandler to the new dedicated
handler '?'.
Signed-off-by: Denis Mukhin <dmukhin@ford.com>
---
Changes since v5:
- new patch
---
xen/common/keyhandler.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 92b0573d8b3a..03ecc4d5187a 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -131,8 +131,6 @@ static void cf_check show_handlers(unsigned char key)
printk("'%c' pressed -> showing installed handlers\n", key);
- print_version();
-
for ( i = 0; i < ARRAY_SIZE(key_table); i++ )
if ( key_table[i].fn )
printk(" key '%c' (ascii '%02x') => %s\n",
@@ -143,6 +141,8 @@ static void cf_check show_system_info(unsigned char key)
{
printk("'%c' pressed -> showing system information\n", key);
+ print_version();
+
print_cmdline();
}
--
2.54.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v6 0/2] add keyhandler to show Xen command line
2026-08-14 1:02 [PATCH v6 0/2] add keyhandler to show Xen command line dmukhin
2026-08-14 1:02 ` [PATCH v6 1/2] xen/common: " dmukhin
2026-08-14 1:02 ` [PATCH v6 2/2] xen/common: move version printout under '?' keyhandler dmukhin
@ 2026-08-18 8:49 ` Jan Beulich
2026-08-18 20:07 ` dmukhin
2 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2026-08-18 8:49 UTC (permalink / raw)
To: dmukhin
Cc: andrew.cooper3, anthony.perard, julien, michal.orzel, roger,
sstabellini, xen-devel
On 14.08.2026 03:02, dmukhin@ford.com wrote:
> Mini-series to add new keyhander '?' for showing system information,
> including command line and version info.
>
> v5: https://lore.kernel.org/xen-devel/20260813035139.915536-2-dmukhin@ford.com/
> CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/2758940285
>
> Denis Mukhin (2):
> xen/common: add keyhandler to show Xen command line
> xen/common: move version printout under '?' keyhandler
I would have wished them to be the other way around (as was requested), but well:
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v6 0/2] add keyhandler to show Xen command line
2026-08-18 8:49 ` [PATCH v6 0/2] add keyhandler to show Xen command line Jan Beulich
@ 2026-08-18 20:07 ` dmukhin
0 siblings, 0 replies; 5+ messages in thread
From: dmukhin @ 2026-08-18 20:07 UTC (permalink / raw)
To: Jan Beulich
Cc: dmukhin, andrew.cooper3, anthony.perard, julien, michal.orzel,
roger, sstabellini, xen-devel
On Tue, Aug 18, 2026 at 10:49:33AM +0200, Jan Beulich wrote:
> On 14.08.2026 03:02, dmukhin@ford.com wrote:
> > Mini-series to add new keyhander '?' for showing system information,
> > including command line and version info.
> >
> > v5: https://lore.kernel.org/xen-devel/20260813035139.915536-2-dmukhin@ford.com/
> > CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/2758940285
> >
> > Denis Mukhin (2):
> > xen/common: add keyhandler to show Xen command line
> > xen/common: move version printout under '?' keyhandler
>
> I would have wished them to be the other way around (as was requested), but well:
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
Thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-18 20:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 1:02 [PATCH v6 0/2] add keyhandler to show Xen command line dmukhin
2026-08-14 1:02 ` [PATCH v6 1/2] xen/common: " dmukhin
2026-08-14 1:02 ` [PATCH v6 2/2] xen/common: move version printout under '?' keyhandler dmukhin
2026-08-18 8:49 ` [PATCH v6 0/2] add keyhandler to show Xen command line Jan Beulich
2026-08-18 20:07 ` dmukhin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.