Version 2:
- review comments addressed; see individual patches for details

This patch series does several things:

- fixes tests to avoid relying on bugs in our code
- adds support for advertising supported CPU modes and models in domain
  capabilities
- starts adding better and higher level APIs to our cpu driver (the old
  low level APIs will be removed once this process is over)
- prepares qemu driver for asking QEMU what a host CPU looks like and
  what CPU models can be run on it
- makes QEMU CPU command line builder build command line and nothing
  else

The added part of domain capabilities XML looks like this:

<cpu>
    <mode name='host-passthrough' supported='yes'/>
    <mode name='host-model' supported='yes'>
        <model fallback='allow'>Broadwell</model>
        <vendor>Intel</vendor>
        <feature policy='disable' name='aes'/>
        <feature policy='require' name='vmx'/>
    </mode>
    <mode name='custom' supported='yes'>
        <model usable='no'>Broadwell</model>
        <model usable='yes'>Broadwell-noTSX</model>
        ...
    </mode>
</cpu>

and host-passthrough is only advertised as supported for KVM domains,
host-model is only supported when guest architecture is compatible with
host and overall it should just work the way one would expect (in
contrast to the current state of the code).

Jiri Denemark (45):
  cpuGetModels: Switch to virArch
  domcaps: Add support for listing supported CPU models
  qemu: Use virDomainCapsCPUModels for cpuDefinitions
  qemuxml2argvtest: Rename extraFlags as qemuCaps
  qemuxml2argvtest: Rename "out" labels as "cleanup"
  qemuxml2argvtest: Get rid of testCompareXMLToArgvHelper
  qemuxml2argvtest: Reorder functions
  qemuxml2argvtest: Update qemuCaps after parsing domain XML
  qemuxml2argvtest: Properly initialize qemuCaps->arch
  testutilsqemu: Helpers for changing host CPU and arch
  testutilsqemu: Add default CPU for PPC64 architectures
  qemu: Separate guest CPU validation from command line creation
  qemuxml2argvtest: Properly setup CPU models in qemuCaps
  qemuxml2argvtest: Set correct architecture for KVM guests
  qemuxml2argvtest: Reorder CPU features
  qemu: Introduce virQEMUCapsGuestIsNative
  qemu: Fill in CPU domain capabilities
  cpu: Special case models == NULL in cpuGetModels
  cpu: Don't overwrite errors in cpuGetModels
  domcaps: Show only CPU models supported by libvirt
  domcaps: Add CPU usable flag
  schema: Separate CPU related definitions into cputypes.rng
  qemu: Propagate virCapsPtr to virQEMUCapsNewForBinaryInternal
  conf: Introduce virCPUDefCopyWithoutModel
  conf: Introduce virCPUDefStealModel
  conf: Introduce virCPUDefCopyModelFilter
  qemu: Store host-model CPU in qemu capabilities
  cpu: Drop false support for ARM cpu-model
  Show host model in domain capabilities
  qemu: Introduce virQEMUCapsGetHostModel
  qemu: Introduce virQEMUCapsIsCPUModeSupported
  cpu: Make x86ModelFromCPU easier to read
  cpu: Make x86ModelFromCPU a bit smarter
  cpu: Report error for unknown features in x86HasFeature
  cpu: Add x86FeatureInData
  cpu: Rework cpuUpdate
  cpu: Set nfeatures_max correctly in x86Decode
  cpu: Introduce virCPUTranslate
  cpu: Rename cpuHasFeature to virCPUDataCheckFeature
  cpu: Rework virCPUDataCheckFeature
  cpu: Introduce virCPUCheckFeature
  cpu: Document missing parameters for cpuCompare*
  cpu: Rework cpuCompare* APIs
  qemu: Update guest CPU def in live XML
  Move CMT feature filtering to QEMU driver

 docs/formatdomaincaps.html.in                      |  65 +++
 docs/schemas/cputypes.rng                          | 135 ++++++
 docs/schemas/domaincaps.rng                        |  60 +++
 docs/schemas/domaincommon.rng                      | 129 +-----
 po/POTFILES.in                                     |   1 +
 src/conf/cpu_conf.c                                |  64 ++-
 src/conf/cpu_conf.h                                |  21 +
 src/conf/domain_capabilities.c                     | 198 +++++++++
 src/conf/domain_capabilities.h                     |  47 +++
 src/cpu/cpu.c                                      | 264 +++++++++---
 src/cpu/cpu.h                                      |  72 +++-
 src/cpu/cpu_arm.c                                  |  79 ++--
 src/cpu/cpu_ppc64.c                                |  48 ++-
 src/cpu/cpu_s390.c                                 |   1 -
 src/cpu/cpu_x86.c                                  | 463 +++++++++++++--------
 src/driver-hypervisor.h                            |   2 +-
 src/libvirt-host.c                                 |   3 +-
 src/libvirt_private.syms                           |  20 +-
 src/libxl/libxl_driver.c                           |  14 +-
 src/qemu/qemu_capabilities.c                       | 394 +++++++++++++-----
 src/qemu/qemu_capabilities.h                       |  24 +-
 src/qemu/qemu_capspriv.h                           |  13 +-
 src/qemu/qemu_command.c                            | 216 +++-------
 src/qemu/qemu_domain.c                             |  37 +-
 src/qemu/qemu_driver.c                             |  41 +-
 src/qemu/qemu_monitor.c                            |  12 +-
 src/qemu/qemu_monitor.h                            |  10 +-
 src/qemu/qemu_monitor_json.c                       |  24 +-
 src/qemu/qemu_monitor_json.h                       |   2 +-
 src/qemu/qemu_parse_command.c                      |   2 +-
 src/qemu/qemu_process.c                            |  95 ++++-
 src/test/test_driver.c                             |  12 +-
 src/vmware/vmware_conf.c                           |   6 +-
 tests/cputest.c                                    |  24 +-
 .../cputestdata/x86-host+host-model-nofallback.xml |   2 +-
 tests/cputestdata/x86-host+host-model.xml          |   2 +-
 .../x86-host+host-passthrough-features.xml         |   4 +
 tests/cputestdata/x86-host+host-passthrough.xml    |  19 +-
 tests/cputestdata/x86-host+min.xml                 |  27 +-
 tests/cputestdata/x86-host+pentium3.xml            |  39 +-
 tests/cputestdata/x86-host-invtsc+host-model.xml   |   2 +-
 .../cputestdata/x86-host-passthrough-features.xml  |   4 +
 tests/domaincapsschemadata/basic.xml               |   5 +
 tests/domaincapsschemadata/full.xml                |  12 +
 tests/domaincapsschemadata/libxl-xenfv-usb.xml     |   5 +
 tests/domaincapsschemadata/libxl-xenfv.xml         |   5 +
 tests/domaincapsschemadata/libxl-xenpv-usb.xml     |   5 +
 tests/domaincapsschemadata/libxl-xenpv.xml         |   5 +
 tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml   |  32 ++
 .../qemu_2.6.0-gicv2-virt.aarch64.xml              |  36 ++
 .../qemu_2.6.0-gicv3-virt.aarch64.xml              |  36 ++
 tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml  |  36 ++
 tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml  |  10 +
 tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml   |  36 ++
 tests/domaincapstest.c                             |  78 +++-
 tests/qemucapabilitiestest.c                       |   2 +-
 tests/qemucapsprobe.c                              |   2 +-
 tests/qemumonitorjsontest.c                        |   8 +-
 .../qemuxml2argvdata/qemuxml2argv-cpu-Haswell2.xml |   2 +-
 .../qemuxml2argv-cpu-Haswell3.args                 |   2 +-
 tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml |  12 +-
 .../qemuxml2argv-cpu-exact2-nofallback.args        |   3 +-
 .../qemuxml2argv-cpu-exact2-nofallback.xml         |  14 +-
 .../qemuxml2argvdata/qemuxml2argv-cpu-exact2.args  |   3 +-
 tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml |  14 +-
 .../qemuxml2argv-cpu-fallback.args                 |   2 +-
 .../qemuxml2argv-cpu-host-model-cmt.args           |   2 +-
 .../qemuxml2argv-cpu-host-model-fallback.args      |   2 +-
 .../qemuxml2argv-cpu-minimum2.args                 |   2 +-
 .../qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml |   6 +-
 .../qemuxml2argvdata/qemuxml2argv-cpu-strict1.args |   3 +-
 .../qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml  |  20 +-
 .../qemuxml2argv-graphics-spice-timeout.xml        |  24 +-
 .../qemuxml2argv-pseries-cpu-exact.args            |   2 +-
 .../qemuxml2argv-pseries-cpu-exact.xml             |   2 +-
 tests/qemuxml2argvtest.c                           | 312 +++++++-------
 .../qemuxml2xmlout-graphics-spice-timeout.xml      |  24 +-
 tests/testutilsqemu.c                              | 128 ++++--
 tests/testutilsqemu.h                              |  11 +-
 tools/virsh-host.c                                 |  10 +-
 80 files changed, 2473 insertions(+), 1137 deletions(-)
 create mode 100644 docs/schemas/cputypes.rng
 create mode 100644 tests/cputestdata/x86-host+host-passthrough-features.xml
 create mode 100644 tests/cputestdata/x86-host-passthrough-features.xml

-- 
2.10.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to