All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Jan Beulich <jbeulich@suse.com>
Subject: [PATCH v2 52/52] xen: make some console related parameters settable at runtime
Date: Mon, 14 Aug 2017 09:08:49 +0200	[thread overview]
Message-ID: <20170814070849.20986-53-jgross@suse.com> (raw)
In-Reply-To: <20170814070849.20986-1-jgross@suse.com>

Support modifying conswitch, console_timestamps, loglvl and
guest_loglvl at runtime.

Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
---
 docs/misc/xen-command-line.markdown |  8 ++++++++
 xen/drivers/char/console.c          | 14 +++++++++-----
 2 files changed, 17 insertions(+), 5 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-&lt;switch char&gt; 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 daf0e1878d..283bd3ac6c 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -41,6 +41,7 @@ string_param("console", opt_console);
 /*         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_param_runtime("conswitch", opt_conswitch);
 
 /* sync_console: force synchronous console output (useful for debugging). */
 static bool_t __initdata opt_sync_console;
@@ -69,6 +70,7 @@ static enum con_timestamp_mode __read_mostly opt_con_timestamp_mode = TSM_NONE;
 
 static int parse_console_timestamps(char *s);
 custom_param("console_timestamps", parse_console_timestamps);
+custom_param_runtime("console_timestamps", parse_console_timestamps);
 
 /* conring_size: allows a large console ring than default (16kB). */
 static uint32_t __initdata opt_conring_size;
@@ -136,6 +138,8 @@ static int parse_guest_loglvl(char *s);
  */
 custom_param("loglvl", parse_loglvl);
 custom_param("guest_loglvl", parse_guest_loglvl);
+custom_param_runtime("loglvl", parse_loglvl);
+custom_param_runtime("guest_loglvl", parse_guest_loglvl);
 
 static atomic_t print_everything = ATOMIC_INIT(0);
 
@@ -145,7 +149,7 @@ static atomic_t print_everything = ATOMIC_INIT(0);
         return (lvlnum);                                \
     }
 
-static int __init __parse_loglvl(char *s, char **ps)
+static int __parse_loglvl(char *s, char **ps)
 {
     ___parse_loglvl(s, ps, "none",    0);
     ___parse_loglvl(s, ps, "error",   1);
@@ -156,7 +160,7 @@ static int __init __parse_loglvl(char *s, char **ps)
     return 2; /* sane fallback */
 }
 
-static int __init _parse_loglvl(char *s, int *lower, int *upper)
+static int _parse_loglvl(char *s, int *lower, int *upper)
 {
     *lower = *upper = __parse_loglvl(s, &s);
     if ( *s == '/' )
@@ -167,12 +171,12 @@ static int __init _parse_loglvl(char *s, int *lower, int *upper)
     return *s ? -EINVAL : 0;
 }
 
-static int __init parse_loglvl(char *s)
+static int parse_loglvl(char *s)
 {
     return _parse_loglvl(s, &xenlog_lower_thresh, &xenlog_upper_thresh);
 }
 
-static int __init parse_guest_loglvl(char *s)
+static int parse_guest_loglvl(char *s)
 {
     return _parse_loglvl(s, &xenlog_guest_lower_thresh,
                          &xenlog_guest_upper_thresh);
@@ -606,7 +610,7 @@ static int printk_prefix_check(char *p, char **pp)
             ((loglvl < upper_thresh) && printk_ratelimit()));
 } 
 
-static int __init parse_console_timestamps(char *s)
+static int parse_console_timestamps(char *s)
 {
     switch ( parse_bool(s) )
     {
-- 
2.12.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-08-14  7:09 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14  7:07 [PATCH v2 00/52] Support for modifying parameters at runtime Juergen Gross
2017-08-14  7:07 ` [PATCH v2 01/52] xen/arch/arm/acpi/boot.c: let custom parameter parsing routines return errno Juergen Gross
2017-08-14 14:26   ` Julien Grall
2017-08-14  7:07 ` [PATCH v2 02/52] xen/arch/arm/domain_build.c: " Juergen Gross
2017-08-14 14:27   ` Julien Grall
2017-08-14  7:08 ` [PATCH v2 03/52] xen/arch/arm/traps.c: " Juergen Gross
2017-08-14 14:28   ` Julien Grall
2017-08-14  7:08 ` [PATCH v2 04/52] xen/arch/x86/apic.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 05/52] xen/arch/x86/cpu/mcheck/mce.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 06/52] xen/arch/x86/cpu/vpmu.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 07/52] xen/arch/x86/dom0_build.c: " Juergen Gross
2017-08-14 13:24   ` Jan Beulich
     [not found]   ` <5991C099020000780016F637@suse.com>
2017-08-14 13:32     ` Juergen Gross
2017-08-14  7:08 ` [PATCH v2 08/52] xen/arch/x86/genapic/probe.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 09/52] xen/arch/x86/hvm/viridian.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 10/52] xen/arch/x86/hvm/vmx/vmcs.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 11/52] xen/arch/x86/io_apic.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 12/52] xen/arch/x86/irq.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 13/52] xen/arch/x86/microcode.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 14/52] xen/arch/x86/mm.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 15/52] xen/arch/x86/nmi.c: " Juergen Gross
2017-08-14 13:31   ` Jan Beulich
     [not found]   ` <5991C244020000780016F64F@suse.com>
2017-08-14 13:33     ` Juergen Gross
2017-08-14  7:08 ` [PATCH v2 16/52] xen/arch/x86/numa.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 17/52] xen/arch/x86/oprofile/nmi_int.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 18/52] xen/arch/x86/psr.c: " Juergen Gross
2017-08-14 13:35   ` Jan Beulich
     [not found]   ` <5991C34F020000780016F675@suse.com>
2017-08-14 14:25     ` Juergen Gross
2017-08-14  7:08 ` [PATCH v2 19/52] xen/arch/x86/setup.c: " Juergen Gross
2017-08-14 13:37   ` Jan Beulich
     [not found]   ` <5991C3C8020000780016F678@suse.com>
2017-08-14 14:25     ` Juergen Gross
2017-08-14  7:08 ` [PATCH v2 20/52] xen/arch/x86/shutdown.c: " Juergen Gross
2017-08-14 13:39   ` Jan Beulich
     [not found]   ` <5991C417020000780016F68E@suse.com>
2017-08-14 14:29     ` Juergen Gross
2017-08-14  7:08 ` [PATCH v2 21/52] xen/arch/x86/time.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 22/52] xen/arch/x86/x86_64/mmconfig-shared.c: " Juergen Gross
2017-08-14 13:40   ` Jan Beulich
     [not found]   ` <5991C483020000780016F691@suse.com>
2017-08-14 14:30     ` Juergen Gross
2017-08-14  7:08 ` [PATCH v2 23/52] xen/common/core_parking.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 24/52] xen/common/domain.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 25/52] xen/common/efi/boot.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 26/52] xen/common/kexec.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 27/52] xen/common/memory.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 28/52] xen/common/sched_credit2.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 29/52] xen/drivers/acpi/tables.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 30/52] xen/drivers/char/console.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 31/52] xen/drivers/cpufreq/cpufreq.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 32/52] xen/drivers/passthrough/amd/iommu_acpi.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 33/52] xen/drivers/passthrough/iommu.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 34/52] xen/drivers/passthrough/pci.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 35/52] xen/drivers/passthrough/vtd/dmar.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 36/52] xen/drivers/passthrough/vtd/quirks.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 37/52] xen/drivers/video/vesa.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 38/52] xen/xsm/flask/flask_op.c: " Juergen Gross
2017-08-14 14:55   ` Daniel De Graaf
2017-08-14  7:08 ` [PATCH v2 39/52] xen: check parameter validity when parsing command line Juergen Gross
2017-08-14 12:46   ` Jan Beulich
2017-08-15 12:54     ` Juergen Gross
2017-08-15 13:01       ` Jan Beulich
2017-08-15 14:56       ` Wei Liu
     [not found]   ` <5991B7B8020000780016F5D0@suse.com>
2017-08-14 13:31     ` Juergen Gross
2017-08-14 13:54       ` Jan Beulich
2017-08-14  7:08 ` [PATCH v2 40/52] xen/arch/x86/apic.c: remove custom_param() error messages Juergen Gross
2017-08-14 14:13   ` Jan Beulich
2017-08-14  7:08 ` [PATCH v2 41/52] xen/arch/x86/cpu/mcheck/mce.c: " Juergen Gross
2017-08-14 14:13   ` Jan Beulich
2017-08-14  7:08 ` [PATCH v2 42/52] xen/arch/x86/hvm/viridian.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 43/52] xen/arch/x86/io_apic.c: " Juergen Gross
2017-08-14 14:14   ` Jan Beulich
2017-08-14  7:08 ` [PATCH v2 44/52] xen/common/kexec.c: " Juergen Gross
2017-08-14  8:39   ` Jan Beulich
     [not found]   ` <59917DF4020000780016F346@suse.com>
2017-08-14  9:07     ` Juergen Gross
2017-08-14  9:11       ` Jan Beulich
2017-08-14  7:08 ` [PATCH v2 45/52] xen/common/sched_credit2.c: " Juergen Gross
2017-08-14  7:08 ` [PATCH v2 46/52] xen: carve out a generic parsing function from _cmdline_parse() Juergen Gross
2017-08-15 15:13   ` Jan Beulich
2017-08-14  7:08 ` [PATCH v2 47/52] xen: add basic support for runtime parameter changing Juergen Gross
2017-08-15 12:07   ` Wei Liu
2017-08-15 15:31   ` Jan Beulich
     [not found]   ` <59932FF8020000780016FFB1@suse.com>
2017-08-15 16:04     ` Juergen Gross
2017-08-14  7:08 ` [PATCH v2 48/52] xen: add hypercall for setting parameters at runtime Juergen Gross
2017-08-14 14:56   ` Daniel De Graaf
2017-08-15 15:39   ` Jan Beulich
     [not found]   ` <599331DE020000780016FFCD@suse.com>
2017-08-15 15:57     ` Juergen Gross
2017-08-15 16:03       ` Jan Beulich
2017-08-14  7:08 ` [PATCH v2 49/52] libxc: add function to set hypervisor parameters Juergen Gross
2017-08-14  7:08 ` [PATCH v2 50/52] libxl: add libxl_set_parameters() function Juergen Gross
2017-08-14  7:08 ` [PATCH v2 51/52] xl: add new xl command set-parameters Juergen Gross
2017-08-14  7:08 ` Juergen Gross [this message]
2017-08-15 15:45   ` [PATCH v2 52/52] xen: make some console related parameters settable at runtime Jan Beulich
     [not found]   ` <5993331E020000780016FFE3@suse.com>
2017-08-15 15:52     ` Juergen Gross
2017-08-15 15:59       ` Jan Beulich
     [not found]       ` <5993367E0200007800170016@suse.com>
2017-08-15 16:10         ` Juergen Gross
2017-08-14 13:50 ` [PATCH v2 00/52] Support for modifying parameters " Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170814070849.20986-53-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.