[PATCH 00/23] Fix host-model if the chosen CPU model has more features in QEMU compared to our cpu_map.xml

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

 



When decoding CPUID data to virCPUDef we need to be careful about using
a CPU model which cannot be directly used on the current host. Normally,
libvirt would notice the features which prevent the model from being
usable and it would disable them in the computed virCPUDef, but this
won't work in case the definition of the CPU model in QEMU contains more
features than what we have in cpu_map.xml. We need to count with the
usability blockers we got from QEMU and explicitly disable all of them
to make the computed virCPUDef usable.

https://bugzilla.redhat.com/show_bug.cgi?id=1464832


Jiri Denemark (23):
  util: Introduce virStringListCopy
  conf: Add usability blockers to virDomainCapsCPUModel
  qemu: Store CPU usability blockers in caps cache
  qemu: Parse unavailable features for CPU models
  cpu: Use virDomainCapsCPUModelsPtr in cpu driver APIs
  cpu: Drop unused parameter from cpuDecode
  cpu: Return model from virCPUModelIsAllowed
  cpu_x86: Move x86FeatureFind* to avoid forward prototypes
  cpu_x86: Disable blockers from unusable CPU models
  cputest: Replace json bool with enum
  cputest: Avoid calling json_reformat in cpu-parse.sh
  cputest: Print correct feature in virCPUUpdateLive test
  cputest: Test CPU usability blockers
  cputest: Separate QEMUCaps creation from cpuTestCPUIDJson
  build: Export virCPUModelIsAllowed private API
  cputest: Use CPU models from QEMU when available
  cputest: Add query-cpu-definitions reply for Core-i5-2540M
  cputest: Add CPUID data for Intel(R) Xeon(R) CPU E7-4830
  cputest: Add query-cpu-definitions reply for Xeon-E7-4830
  cputest: Update Xeon-E3-1245 data
  cputest: Add query-cpu-definitions reply for Xeon-E3-1245
  cputest: Update Core-i7-2600 data
  cputest: Make a crippled version of Core-i7-2600

 src/conf/domain_capabilities.c                     |   30 +-
 src/conf/domain_capabilities.h                     |    7 +-
 src/cpu/cpu.c                                      |   95 +-
 src/cpu/cpu.h                                      |   31 +-
 src/cpu/cpu_arm.c                                  |    3 +-
 src/cpu/cpu_ppc64.c                                |   14 +-
 src/cpu/cpu_x86.c                                  |  108 +-
 src/libvirt_private.syms                           |    1 +
 src/libxl/libxl_capabilities.c                     |    2 +-
 src/libxl/libxl_driver.c                           |    2 +-
 src/qemu/qemu_capabilities.c                       |  123 +--
 src/qemu/qemu_capabilities.h                       |    6 +-
 src/qemu/qemu_capspriv.h                           |    5 +
 src/qemu/qemu_driver.c                             |    2 +-
 src/qemu/qemu_monitor.c                            |    2 +
 src/qemu/qemu_monitor.h                            |    1 +
 src/qemu/qemu_monitor_json.c                       |   26 +-
 src/qemu/qemu_process.c                            |    9 +-
 src/test/test_driver.c                             |    2 +-
 src/util/virstring.c                               |   37 +
 src/util/virstring.h                               |    3 +
 tests/cputest.c                                    |  324 ++++--
 tests/cputestdata/cpu-cpuid.py                     |   26 +-
 tests/cputestdata/cpu-gather.sh                    |    1 +
 tests/cputestdata/cpu-parse.sh                     |    2 +-
 tests/cputestdata/cpu-reformat.py                  |    9 +
 tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json  |  362 +++++++
 .../x86_64-cpuid-Core-i7-2600-disabled.xml         |    1 -
 .../x86_64-cpuid-Core-i7-2600-enabled.xml          |    1 +
 .../cputestdata/x86_64-cpuid-Core-i7-2600-json.xml |    1 +
 ...x86_64-cpuid-Core-i7-2600-xsaveopt-disabled.xml |    6 +
 .../x86_64-cpuid-Core-i7-2600-xsaveopt-enabled.xml |    8 +
 .../x86_64-cpuid-Core-i7-2600-xsaveopt-guest.xml   |   25 +
 .../x86_64-cpuid-Core-i7-2600-xsaveopt-host.xml    |   25 +
 .../x86_64-cpuid-Core-i7-2600-xsaveopt-json.xml    |   11 +
 .../x86_64-cpuid-Core-i7-2600-xsaveopt.json        |  615 +++++++++++
 .../x86_64-cpuid-Core-i7-2600-xsaveopt.xml         |   33 +
 tests/cputestdata/x86_64-cpuid-Core-i7-2600.json   |  496 ++++++++-
 tests/cputestdata/x86_64-cpuid-Core-i7-2600.xml    |    6 +-
 .../x86_64-cpuid-Xeon-E3-1245-disabled.xml         |    1 -
 .../x86_64-cpuid-Xeon-E3-1245-enabled.xml          |    2 +-
 .../cputestdata/x86_64-cpuid-Xeon-E3-1245-json.xml |    1 +
 tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json   |  712 +++++++++----
 tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.xml    |    7 +-
 .../x86_64-cpuid-Xeon-E7-4830-disabled.xml         |    5 +
 .../x86_64-cpuid-Xeon-E7-4830-enabled.xml          |    8 +
 .../x86_64-cpuid-Xeon-E7-4830-guest.xml            |   28 +
 .../cputestdata/x86_64-cpuid-Xeon-E7-4830-host.xml |   29 +
 .../cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml |   14 +
 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.json   |  657 ++++++++++++
 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.xml    |   30 +
 tests/domaincapstest.c                             |    6 +-
 tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml   | 1102 ++++++++++++++++++--
 tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml  |  236 ++++-
 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |  154 ++-
 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml   |  154 ++-
 56 files changed, 4927 insertions(+), 680 deletions(-)
 create mode 100755 tests/cputestdata/cpu-reformat.py
 create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-disabled.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-enabled.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-guest.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-host.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-json.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt.json
 create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-disabled.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-enabled.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-guest.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-host.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml
 create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.json
 create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.xml

-- 
2.14.2

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux