[libvirt] [PATCH v3 0/6] Add setting CPU features (CPUID) with libxenlight driver.

Marek Marczykowski-Górecki marmarek at invisiblethingslab.com
Sun Dec 10 02:10:45 UTC 2017


Add support for CPUID setting based on <cpu> element. Since libxl format
support only adjusting specific bits over host CPU, only
mode='host-passthrough' is supported - other values are rejected (including
default 'custom'). This will break some configurations working before (bare
<cpu> element with for example NUMA configuration), but libxl driver never
supported full 'custom' mode - it was silently ignored, which might lead to
some unexpected effects.
Since mode='host-passthrough' is now necessary to specify CPU options, do not
enable nested HVM feature by mere presence of this element, require explicit
enabling "vmx" or "svm" bits. Nested HVM is still in "preview" state, so better
be explicit here.

v2 of this patch series:
https://www.redhat.com/archives/libvir-list/2017-July/msg00050.html

Marek Marczykowski-Górecki (6):
  libxl: error out on not supported CPU mode, instead of silently ignoring
  libxl: do not enable nested HVM by mere presence of <cpu> element
  libxl: add support for CPUID features policy
  tests: check CPU features handling in libxl driver
  xenconfig: add CPUID handling to domXML <-> xl.cfg conversion
  tests: add test case for CPUID in xenconfig driver

 src/libxl/libxl_conf.c                                  |  53 +-
 src/xenconfig/xen_xl.c                                  | 260 ++++++++-
 src/xenconfig/xen_xl.h                                  |   2 +-
 tests/libxlxml2domconfigdata/fullvirt-cpuid.json        |  64 ++-
 tests/libxlxml2domconfigdata/fullvirt-cpuid.xml         |  37 +-
 tests/libxlxml2domconfigdata/vnuma-hvm.json             |   1 +-
 tests/libxlxml2domconfigtest.c                          |   1 +-
 tests/xlconfigdata/test-fullvirt-cpuid.cfg              |  25 +-
 tests/xlconfigdata/test-fullvirt-cpuid.xml              |  36 +-
 tests/xlconfigdata/test-fullvirt-nestedhvm.xml          |   4 +-
 tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.xml |   2 +-
 tests/xlconfigdata/test-fullvirt-vnuma-nodistances.xml  |   2 +-
 tests/xlconfigdata/test-fullvirt-vnuma-partialdist.xml  |   2 +-
 tests/xlconfigdata/test-fullvirt-vnuma.xml              |   2 +-
 tests/xlconfigtest.c                                    |   1 +-
 15 files changed, 453 insertions(+), 39 deletions(-)
 create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.json
 create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.xml
 create mode 100644 tests/xlconfigdata/test-fullvirt-cpuid.cfg
 create mode 100644 tests/xlconfigdata/test-fullvirt-cpuid.xml

base-commit: 984c534a3f2219444f4cb4df61d77b8c6e5054d7
-- 
git-series 0.9.1




More information about the libvir-list mailing list