[libvirt] [PATCH 00/11] Fixes and improvements to feature handling

Andrea Bolognani abologna at redhat.com
Tue Feb 6 16:42:49 UTC 2018


This series is the result of shaving many a yak while implementing
support for pSeries optional features (first attempt at [1], respin
coming right after I send this).

Quick summary of the changes:

* handle more sanely cases where the GIC capability has been
  enabled but no GIC version has been provided;

* use the switch construct more, so that the compiler can warn us
  when we forget to handle some feature;

* where possible (eg. the value is mandatory and there is only a
  limited number of options to choose from) avoid storing whether
  a feature is enabled and its actual value separately.

Save for the first one, none of the changes should be visible to
the user, but they will hopefully improve things for developers.


[1] https://www.redhat.com/archives/libvir-list/2018-January/msg00779.html

Andrea Bolognani (11):
  qemu: Move feature verification from PostParse() to Validate()
  qemu: Use switch in qemuDomainDefValidateFeatures()
  qemu: Move GIC checks to qemuDomainDefValidateFeatures()
  conf: Use switch in virDomainDefFeaturesCheckABIStability()
  conf: Validate VIR_DOMAIN_FEATURE_CAPABILITIES properly
  conf: Integrate all features ABI checks in the switch
  tests: Improve GIC tests
  qemu: Fix GIC behavior for the default case
  conf: Improve IOAPIC feature handling
  conf: Improve HPT feature handling
  tests: Clean up HPT tests

 src/conf/domain_conf.c                             | 174 +++++++++++++--------
 src/conf/domain_conf.h                             |  15 +-
 src/libvirt_private.syms                           |   2 +
 src/qemu/qemu_command.c                            |  16 +-
 src/qemu/qemu_domain.c                             | 117 +++++++++-----
 .../qemuxml2argvdata/aarch64-gic-default-both.args |   1 +
 .../qemuxml2argvdata/aarch64-gic-default-both.xml  |   1 +
 tests/qemuxml2argvdata/aarch64-gic-default-v2.args |   1 +
 tests/qemuxml2argvdata/aarch64-gic-default-v2.xml  |   1 +
 tests/qemuxml2argvdata/aarch64-gic-default-v3.args |   1 +
 tests/qemuxml2argvdata/aarch64-gic-default-v3.xml  |   1 +
 ...hpt-resizing.args => pseries-features-hpt.args} |   1 -
 .../pseries-features-hpt.xml}                      |   0
 ...ne.xml => pseries-features-invalid-machine.xml} |   2 +-
 tests/qemuxml2argvdata/pseries-hpt-resizing.xml    |  19 ---
 tests/qemuxml2argvtest.c                           |  29 ++--
 .../aarch64-gic-default-both.xml                   |   1 +
 .../qemuxml2xmloutdata/aarch64-gic-default-v2.xml  |   1 +
 .../qemuxml2xmloutdata/aarch64-gic-default-v3.xml  |   1 +
 tests/qemuxml2xmloutdata/pseries-features-hpt.xml  |   1 +
 tests/qemuxml2xmltest.c                            |   9 +-
 21 files changed, 230 insertions(+), 164 deletions(-)
 create mode 120000 tests/qemuxml2argvdata/aarch64-gic-default-both.args
 create mode 120000 tests/qemuxml2argvdata/aarch64-gic-default-both.xml
 create mode 120000 tests/qemuxml2argvdata/aarch64-gic-default-v2.args
 create mode 120000 tests/qemuxml2argvdata/aarch64-gic-default-v2.xml
 create mode 120000 tests/qemuxml2argvdata/aarch64-gic-default-v3.args
 create mode 120000 tests/qemuxml2argvdata/aarch64-gic-default-v3.xml
 rename tests/qemuxml2argvdata/{pseries-hpt-resizing.args => pseries-features-hpt.args} (96%)
 rename tests/{qemuxml2xmloutdata/pseries-hpt-resizing.xml => qemuxml2argvdata/pseries-features-hpt.xml} (100%)
 rename tests/qemuxml2argvdata/{pseries-hpt-resizing-invalid-machine.xml => pseries-features-invalid-machine.xml} (86%)
 delete mode 100644 tests/qemuxml2argvdata/pseries-hpt-resizing.xml
 create mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml
 create mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml
 create mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml
 create mode 120000 tests/qemuxml2xmloutdata/pseries-features-hpt.xml

-- 
2.14.3




More information about the libvir-list mailing list