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

[Xen-devel] [PATCH 00/52] Support for modifying parameters at runtime



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 

Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Cc: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Cc: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Julien Grall <julien.grall@xxxxxxx>
Cc: Jun Nakajima <jun.nakajima@xxxxxxxxx>
Cc: Kevin Tian <kevin.tian@xxxxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Paul Durrant <paul.durrant@xxxxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>

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                      | 14 +++++++
 tools/libxl/libxl.h                      | 11 +++++
 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/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                      | 70 +++++++++++++++++++++++++-------
 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 +
 57 files changed, 529 insertions(+), 150 deletions(-)

-- 
2.12.3


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

 


Rackspace

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