[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 53/53] xen: make some console related parameters settable at runtime
Support modifying conswitch, console_timestamps, loglvl and guest_loglvl at runtime. Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Tim Deegan <tim@xxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- V3: - *_runtime_param() now includes boot parameter setting (Jan Beulich) --- docs/misc/xen-command-line.markdown | 8 ++++++++ xen/drivers/char/console.c | 18 +++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index 4002eab08b..9797c8db2d 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -391,6 +391,8 @@ makes sense on its own. > Default: `none` +> Can be modified at runtime + Specify which timestamp format Xen should use for each console line. * `none`: No timestamps @@ -417,6 +419,8 @@ into the console ring buffer. > Default: `conswitch=a` +> Can be modified at runtime + Specify which character should be used to switch serial input between Xen and dom0. The required sequence is CTRL-<switch char> three times. @@ -898,6 +902,8 @@ maximum number of maptrack frames domain. > Default: `guest_loglvl=none/warning` +> Can be modified at runtime + Set the logging level for Xen guests. Any log message with equal more more importance will be printed. @@ -1164,6 +1170,8 @@ if left disabled by the BIOS. > Default: `loglvl=warning` +> Can be modified at runtime + Set the logging level for Xen. Any log message with equal more more importance will be printed. diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 36f94e6b94..19d0e74f17 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -40,7 +40,7 @@ string_param("console", opt_console); /* Char 2: If this character is 'x', then do not auto-switch to DOM0 when it */ /* boots. Any other value, or omitting the char, enables auto-switch */ static unsigned char __read_mostly opt_conswitch[3] = "a"; -string_param("conswitch", opt_conswitch); +string_runtime_param("conswitch", opt_conswitch); /* sync_console: force synchronous console output (useful for debugging). */ static bool_t __initdata opt_sync_console; @@ -68,7 +68,7 @@ enum con_timestamp_mode static enum con_timestamp_mode __read_mostly opt_con_timestamp_mode = TSM_NONE; static int parse_console_timestamps(const char *s); -custom_param("console_timestamps", parse_console_timestamps); +custom_runtime_param("console_timestamps", parse_console_timestamps); /* conring_size: allows a large console ring than default (16kB). */ static uint32_t __initdata opt_conring_size; @@ -134,8 +134,8 @@ static int parse_guest_loglvl(const char *s); * Similar definitions for guest_loglvl, but applies to guest tracing. * Defaults: loglvl=warning ; guest_loglvl=none/warning */ -custom_param("loglvl", parse_loglvl); -custom_param("guest_loglvl", parse_guest_loglvl); +custom_runtime_param("loglvl", parse_loglvl); +custom_runtime_param("guest_loglvl", parse_guest_loglvl); static atomic_t print_everything = ATOMIC_INIT(0); @@ -145,7 +145,7 @@ static atomic_t print_everything = ATOMIC_INIT(0); return (lvlnum); \ } -static int __init __parse_loglvl(const char *s, const char **ps) +static int __parse_loglvl(const char *s, const char **ps) { ___parse_loglvl(s, ps, "none", 0); ___parse_loglvl(s, ps, "error", 1); @@ -156,7 +156,7 @@ static int __init __parse_loglvl(const char *s, const char **ps) return 2; /* sane fallback */ } -static int __init _parse_loglvl(const char *s, int *lower, int *upper) +static int _parse_loglvl(const char *s, int *lower, int *upper) { *lower = *upper = __parse_loglvl(s, &s); if ( *s == '/' ) @@ -167,12 +167,12 @@ static int __init _parse_loglvl(const char *s, int *lower, int *upper) return *s ? -EINVAL : 0; } -static int __init parse_loglvl(const char *s) +static int parse_loglvl(const char *s) { return _parse_loglvl(s, &xenlog_lower_thresh, &xenlog_upper_thresh); } -static int __init parse_guest_loglvl(const char *s) +static int parse_guest_loglvl(const char *s) { return _parse_loglvl(s, &xenlog_guest_lower_thresh, &xenlog_guest_upper_thresh); @@ -606,7 +606,7 @@ static int printk_prefix_check(char *p, char **pp) ((loglvl < upper_thresh) && printk_ratelimit())); } -static int __init parse_console_timestamps(const char *s) +static int parse_console_timestamps(const char *s) { switch ( parse_bool(s, NULL) ) { -- 2.12.3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |