All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/52] Support for modifying parameters at runtime
@ 2017-08-14  7:07 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
                   ` (52 more replies)
  0 siblings, 53 replies; 94+ messages in thread
From: Juergen Gross @ 2017-08-14  7:07 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, Kevin Tian, Stefano Stabellini, Wei Liu,
	Jun Nakajima, George Dunlap, Andrew Cooper, Dario Faggioli,
	Ian Jackson, Tim Deegan, Julien Grall, Paul Durrant, Jan Beulich,
	Daniel De Graaf, Suravee Suthikulpanit

Currently parameters of the hypervisor (e.g. console log level) can be
set via boot command line. Instead of having to reboot the system in
case another setting is desired, being able to modify many of those
parameters at runtime would be the better option.

This patch series addresses this by adding a new xl command
"xl set-parameters" which takes a string similar to the boot command
line as parameter and passes this string to the hypervisor which will
then use the same parsing infrastructure as for the command line in
order to apply the parameter settings.

As error checks for invalid parameters or parameter values have been
very sparse if present at all in the hypervisor, a major part of this
patch series addresses this problem first: all custom parameter parsing
functions are being changed to return success or an error. The main
parsing function tests for generic parameter value errors (like e.g.
overflow) or invalid parameters and issues a message in case an error
has been detected. Most error messages in the custom parsing functions
are removed then.

While not strictly required for runtime parameter modification I
believe an improved parameter validation is a win with or without the
runtime parameter modification support.

* Patches 1-38 are modifying the custom parameter parsing functions to
  return success or error
* Patch 39 adds generic parameter error tests in the core parameter
  parsing functions
* Patches 40-45 remove custom parsing function error messages
* Patches 46-51 add the runtime parameter modification support
* Patch 52 adds support for runtime modification of some console related
  parameters 

Changes in V2:
- patch 39 (xen: check parameter validity when parsing command line):
  replaced literal 8 by BITS_PER_BYTE (Wei Liu)
  added test for empty string to parse_bool()
- patch 47 (xen: add basic support for runtime parameter changing):
  added modification of ARM linker script (Wei Liu)
- patch 48 (xen: add hypercall for setting parameters at runtime):
  corrected XSM test (Daniel De Graaf)
- patch 50 (libxl: add libxl_set_parameters() function):
  corrected coding style (Wei Liu)

  
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: Dario Faggioli <dario.faggioli@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: Julien Grall <julien.grall@arm.com>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Paul Durrant <paul.durrant@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>

Juergen Gross (52):
  xen/arch/arm/acpi/boot.c: let custom parameter parsing routines return
    errno
  xen/arch/arm/domain_build.c: let custom parameter parsing routines
    return errno
  xen/arch/arm/traps.c: let custom parameter parsing routines return
    errno
  xen/arch/x86/apic.c: let custom parameter parsing routines return
    errno
  xen/arch/x86/cpu/mcheck/mce.c: let custom parameter parsing routines
    return errno
  xen/arch/x86/cpu/vpmu.c: let custom parameter parsing routines return
    errno
  xen/arch/x86/dom0_build.c: let custom parameter parsing routines
    return errno
  xen/arch/x86/genapic/probe.c: let custom parameter parsing routines
    return errno
  xen/arch/x86/hvm/viridian.c: let custom parameter parsing routines
    return errno
  xen/arch/x86/hvm/vmx/vmcs.c: let custom parameter parsing routines
    return errno
  xen/arch/x86/io_apic.c: let custom parameter parsing routines return
    errno
  xen/arch/x86/irq.c: let custom parameter parsing routines return errno
  xen/arch/x86/microcode.c: let custom parameter parsing routines return
    errno
  xen/arch/x86/mm.c: let custom parameter parsing routines return errno
  xen/arch/x86/nmi.c: let custom parameter parsing routines return errno
  xen/arch/x86/numa.c: let custom parameter parsing routines return
    errno
  xen/arch/x86/oprofile/nmi_int.c: let custom parameter parsing routines
    return errno
  xen/arch/x86/psr.c: let custom parameter parsing routines return errno
  xen/arch/x86/setup.c: let custom parameter parsing routines return
    errno
  xen/arch/x86/shutdown.c: let custom parameter parsing routines return
    errno
  xen/arch/x86/time.c: let custom parameter parsing routines return
    errno
  xen/arch/x86/x86_64/mmconfig-shared.c: let custom parameter parsing
    routines return errno
  xen/common/core_parking.c: let custom parameter parsing routines
    return errno
  xen/common/domain.c: let custom parameter parsing routines return
    errno
  xen/common/efi/boot.c: let custom parameter parsing routines return
    errno
  xen/common/kexec.c: let custom parameter parsing routines return errno
  xen/common/memory.c: let custom parameter parsing routines return
    errno
  xen/common/sched_credit2.c: let custom parameter parsing routines
    return errno
  xen/drivers/acpi/tables.c: let custom parameter parsing routines
    return errno
  xen/drivers/char/console.c: let custom parameter parsing routines
    return errno
  xen/drivers/cpufreq/cpufreq.c: let custom parameter parsing routines
    return errno
  xen/drivers/passthrough/amd/iommu_acpi.c: let custom parameter parsing
    routines return errno
  xen/drivers/passthrough/iommu.c: let custom parameter parsing routines
    return errno
  xen/drivers/passthrough/pci.c: let custom parameter parsing routines
    return errno
  xen/drivers/passthrough/vtd/dmar.c: let custom parameter parsing
    routines return errno
  xen/drivers/passthrough/vtd/quirks.c: let custom parameter parsing
    routines return errno
  xen/drivers/video/vesa.c: let custom parameter parsing routines return
    errno
  xen/xsm/flask/flask_op.c: let custom parameter parsing routines return
    errno
  xen: check parameter validity when parsing command line
  xen/arch/x86/apic.c: remove custom_param() error messages
  xen/arch/x86/cpu/mcheck/mce.c: remove custom_param() error messages
  xen/arch/x86/hvm/viridian.c: remove custom_param() error messages
  xen/arch/x86/io_apic.c: remove custom_param() error messages
  xen/common/kexec.c: remove custom_param() error messages
  xen/common/sched_credit2.c: remove custom_param() error messages
  xen: carve out a generic parsing function from _cmdline_parse()
  xen: add basic support for runtime parameter changing
  xen: add hypercall for setting parameters at runtime
  libxc: add function to set hypervisor parameters
  libxl: add libxl_set_parameters() function
  xl: add new xl command set-parameters
  xen: make some console related parameters settable at runtime

 docs/man/xl.pod.1.in                     |  5 +++
 docs/misc/xen-command-line.markdown      |  8 ++++
 tools/flask/policy/modules/dom0.te       |  2 +-
 tools/libxc/include/xenctrl.h            |  1 +
 tools/libxc/xc_misc.c                    | 20 +++++++++
 tools/libxl/libxl.c                      | 15 +++++++
 tools/libxl/libxl.h                      |  8 ++++
 tools/xl/xl.h                            |  1 +
 tools/xl/xl_cmdtable.c                   |  5 +++
 tools/xl/xl_misc.c                       | 20 +++++++++
 xen/arch/arm/acpi/boot.c                 |  8 +++-
 xen/arch/arm/domain_build.c              |  4 +-
 xen/arch/arm/traps.c                     |  8 ++--
 xen/arch/arm/xen.lds.S                   |  4 ++
 xen/arch/x86/apic.c                      | 10 +++--
 xen/arch/x86/cpu/mcheck/mce.c            |  7 +--
 xen/arch/x86/cpu/vpmu.c                  |  7 +--
 xen/arch/x86/dom0_build.c                | 19 +++++++--
 xen/arch/x86/genapic/probe.c             |  8 +++-
 xen/arch/x86/hvm/viridian.c              | 13 +++---
 xen/arch/x86/hvm/vmx/vmcs.c              |  7 ++-
 xen/arch/x86/io_apic.c                   |  6 ++-
 xen/arch/x86/irq.c                       |  9 +++-
 xen/arch/x86/microcode.c                 | 10 +++--
 xen/arch/x86/mm.c                        |  7 ++-
 xen/arch/x86/nmi.c                       | 20 ++++++---
 xen/arch/x86/numa.c                      | 10 +++--
 xen/arch/x86/oprofile/nmi_int.c          |  2 +
 xen/arch/x86/psr.c                       | 28 +++++++++---
 xen/arch/x86/setup.c                     | 32 +++++++++-----
 xen/arch/x86/shutdown.c                  |  6 ++-
 xen/arch/x86/time.c                      |  6 ++-
 xen/arch/x86/x86_64/mmconfig-shared.c    | 19 +++++++--
 xen/arch/x86/xen.lds.S                   |  4 ++
 xen/common/core_parking.c                |  6 ++-
 xen/common/domain.c                      |  4 +-
 xen/common/efi/boot.c                    |  6 ++-
 xen/common/kernel.c                      | 73 +++++++++++++++++++++++++-------
 xen/common/kexec.c                       | 31 +++++++++++---
 xen/common/memory.c                      |  4 +-
 xen/common/sched_credit2.c               |  6 +--
 xen/common/sysctl.c                      | 29 +++++++++++++
 xen/drivers/acpi/tables.c                |  5 ++-
 xen/drivers/char/console.c               | 35 +++++++++------
 xen/drivers/cpufreq/cpufreq.c            | 18 +++++---
 xen/drivers/passthrough/amd/iommu_acpi.c | 26 ++++++++----
 xen/drivers/passthrough/iommu.c          | 15 ++++---
 xen/drivers/passthrough/pci.c            | 17 +++++---
 xen/drivers/passthrough/vtd/dmar.c       |  4 +-
 xen/drivers/passthrough/vtd/quirks.c     |  7 +--
 xen/drivers/video/vesa.c                 |  4 +-
 xen/include/acpi/cpufreq/cpufreq.h       |  2 +-
 xen/include/public/sysctl.h              | 19 +++++++++
 xen/include/xen/init.h                   | 22 +++++++++-
 xen/include/xen/lib.h                    |  1 +
 xen/xsm/flask/flask_op.c                 |  6 ++-
 xen/xsm/flask/hooks.c                    |  3 ++
 xen/xsm/flask/policy/access_vectors      |  2 +
 58 files changed, 533 insertions(+), 151 deletions(-)

-- 
2.12.3


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

^ permalink raw reply	[flat|nested] 94+ messages in thread

end of thread, other threads:[~2017-08-15 16:10 UTC | newest]

Thread overview: 94+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2 52/52] xen: make some console related parameters settable at runtime Juergen Gross
2017-08-15 15:45   ` 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

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.