[libvirt] [PATCH v3 00/28] qemu: Detect host CPU model by asking QEMU on x86_64

Until now host-model CPU mode tried to enable all CPU features supported by the host CPU even if QEMU/KVM did not support them. This caused a number of issues and made host-model quite unreliable. Asking QEMU for the CPU it can provide and the current host makes host-model much more robust. This series fixes the following bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1018251 https://bugzilla.redhat.com/show_bug.cgi?id=1371617 https://bugzilla.redhat.com/show_bug.cgi?id=1372581 https://bugzilla.redhat.com/show_bug.cgi?id=1404627 https://bugzilla.redhat.com/show_bug.cgi?id=870071 In addition to that, the following bug should be mostly limited to cases when an unsupported feature is explicitly requested: https://bugzilla.redhat.com/show_bug.cgi?id=1335534 The series relies on features which are not in QEMU yet, but should be hopefully close enough to be pushed in 2.9.0. In the meantime, Eduardo's work/x86-query-cpu-expansion-full branch can be used to play with them. Version 3: - a few patches which were ACKed in v2 and didn't have any dependencies were pushed to make the series a bit smaller - review comments addressed (see individual patches for more details) Version 2: - properly set vendor property in converted test data files - fix cpu-parse.sh to use "x86_64" prefix for the generated files Jiri Denemark (28): qemucapstest: Update test data for QEMU 2.9.0 domaincapstest: Add test data for QEMU 2.9.0 qemu: Refactor virQEMUCapsInitHostCPUModel qemu: Fix CPU model fallback in domain capabilities docs: Update description of the host-model CPU mode qemu: Rename hostCPU/feature element in capabilities cache qemu: Prepare for more types in qemuMonitorCPUModelInfo qemu: Store more types in qemuMonitorCPUModelInfo qemu: Probe "max" CPU model in TCG cpu_x86: Drop virCPUx86MakeData and use virCPUDataNew cpu_x86: Make virCPUx86DataClear static cpu: Rework cpuDataFree cpu_x86: Make virCPUx86DataAddCPUID work with virCPUDataPtr cpu_x86: Introduce virCPUx86DataSetSignature cpu_x86: Introduce virCPUx86DataSetVendor cpu_x86: Introduce virCPUx86DataAddFeature qemu: Get host CPU model from QEMU on x86_64 qemu: Use enum for CPU model expansion type qemu: Use full CPU model expansion on x86 qemu: Make virQEMUCapsInitCPUModel testable cputest: Rename x86 data files cputest: Use virArch enum rather then strings cputest: Switch host CPU data scripts to model expansion cputest: Convert all json data files to query-cpu-model-expansion cputest: Test virQEMUCapsInitCPUModel cputest: Drop obsolete CPU test data files cputest: Drop .new suffix from CPU test data files news: Detect host CPU model by asking QEMU on x86_64 docs/formatdomain.html.in | 37 +- docs/news.xml | 11 + src/bhyve/bhyve_capabilities.c | 2 +- src/cpu/cpu.c | 21 +- src/cpu/cpu.h | 4 +- src/cpu/cpu_arm.c | 7 - src/cpu/cpu_ppc64.c | 6 +- src/cpu/cpu_s390.c | 7 - src/cpu/cpu_x86.c | 280 ++++--- src/cpu/cpu_x86.h | 13 +- src/libvirt_private.syms | 7 +- src/libxl/libxl_capabilities.c | 18 +- src/qemu/qemu_capabilities.c | 463 ++++++++--- src/qemu/qemu_capabilities.h | 3 +- src/qemu/qemu_capspriv.h | 13 +- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_monitor.c | 29 +- src/qemu/qemu_monitor.h | 35 +- src/qemu/qemu_monitor_json.c | 107 ++- src/qemu/qemu_monitor_json.h | 4 +- src/qemu/qemu_parse_command.c | 2 +- src/qemu/qemu_process.c | 7 +- src/vmware/vmware_conf.c | 2 +- src/vz/vz_driver.c | 2 +- tests/cputest.c | 324 ++++---- tests/cputestdata/cpu-convert.py | 249 ++++++ tests/cputestdata/cpu-gather.sh | 39 +- tests/cputestdata/cpu-parse.sh | 5 +- tests/cputestdata/x86-cpuid-A10-5800K.json | 77 -- tests/cputestdata/x86-cpuid-Core-i5-2500.json | 88 --- tests/cputestdata/x86-cpuid-Core-i5-2540M.json | 82 -- tests/cputestdata/x86-cpuid-Core-i5-4670T.json | 77 -- tests/cputestdata/x86-cpuid-Core-i5-6600.json | 82 -- tests/cputestdata/x86-cpuid-Core-i7-2600.json | 77 -- tests/cputestdata/x86-cpuid-Core-i7-3740QM.json | 77 -- tests/cputestdata/x86-cpuid-Core-i7-3770.json | 77 -- tests/cputestdata/x86-cpuid-Core-i7-4600U.json | 82 -- tests/cputestdata/x86-cpuid-Core-i7-5600U-json.xml | 12 - tests/cputestdata/x86-cpuid-Core-i7-5600U.json | 88 --- tests/cputestdata/x86-cpuid-Core2-E6850.json | 77 -- tests/cputestdata/x86-cpuid-Opteron-2350.json | 71 -- tests/cputestdata/x86-cpuid-Opteron-6234.json | 88 --- tests/cputestdata/x86-cpuid-Phenom-B95.json | 77 -- tests/cputestdata/x86-cpuid-Xeon-E3-1245.json | 88 --- tests/cputestdata/x86-cpuid-Xeon-E5-2630.json | 77 -- tests/cputestdata/x86-cpuid-Xeon-E5-2650.json | 71 -- tests/cputestdata/x86-cpuid-Xeon-E7-4820.json | 77 -- tests/cputestdata/x86-cpuid-Xeon-W3520.json | 77 -- ...ack.xml => x86_64-Haswell-noTSX-nofallback.xml} | 0 ...-Haswell-noTSX.xml => x86_64-Haswell-noTSX.xml} | 0 .../{x86-Haswell.xml => x86_64-Haswell.xml} | 0 ...e-1-result.xml => x86_64-baseline-1-result.xml} | 0 .../{x86-baseline-1.xml => x86_64-baseline-1.xml} | 0 ...e-2-result.xml => x86_64-baseline-2-result.xml} | 0 .../{x86-baseline-2.xml => x86_64-baseline-2.xml} | 0 ...expanded.xml => x86_64-baseline-3-expanded.xml} | 0 ...e-3-result.xml => x86_64-baseline-3-result.xml} | 0 .../{x86-baseline-3.xml => x86_64-baseline-3.xml} | 0 ...expanded.xml => x86_64-baseline-4-expanded.xml} | 0 ...e-4-result.xml => x86_64-baseline-4-result.xml} | 0 .../{x86-baseline-4.xml => x86_64-baseline-4.xml} | 0 ...expanded.xml => x86_64-baseline-5-expanded.xml} | 0 ...e-5-result.xml => x86_64-baseline-5-result.xml} | 0 .../{x86-baseline-5.xml => x86_64-baseline-5.xml} | 0 ...atable.xml => x86_64-baseline-6-migratable.xml} | 0 ...e-6-result.xml => x86_64-baseline-6-result.xml} | 0 .../{x86-baseline-6.xml => x86_64-baseline-6.xml} | 0 ...e-7-result.xml => x86_64-baseline-7-result.xml} | 0 .../{x86-baseline-7.xml => x86_64-baseline-7.xml} | 0 ...e-8-result.xml => x86_64-baseline-8-result.xml} | 0 .../{x86-baseline-8.xml => x86_64-baseline-8.xml} | 0 ...ml => x86_64-baseline-incompatible-vendors.xml} | 0 ...lt.xml => x86_64-baseline-no-vendor-result.xml} | 0 ...no-vendor.xml => x86_64-baseline-no-vendor.xml} | 0 ...xml => x86_64-baseline-some-vendors-result.xml} | 0 ...endors.xml => x86_64-baseline-some-vendors.xml} | 0 ...-bogus-feature.xml => x86_64-bogus-feature.xml} | 0 ...{x86-bogus-model.xml => x86_64-bogus-model.xml} | 0 ...86-bogus-vendor.xml => x86_64-bogus-vendor.xml} | 0 ...-guest.xml => x86_64-cpuid-A10-5800K-guest.xml} | 0 ...0K-host.xml => x86_64-cpuid-A10-5800K-host.xml} | 0 ...0K-json.xml => x86_64-cpuid-A10-5800K-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-A10-5800K.json | 203 +++++ ...id-A10-5800K.xml => x86_64-cpuid-A10-5800K.xml} | 0 ...-guest.xml => x86_64-cpuid-Atom-D510-guest.xml} | 0 ...10-host.xml => x86_64-cpuid-Atom-D510-host.xml} | 0 ...id-Atom-D510.xml => x86_64-cpuid-Atom-D510.xml} | 0 ...-guest.xml => x86_64-cpuid-Atom-N450-guest.xml} | 0 ...50-host.xml => x86_64-cpuid-Atom-N450-host.xml} | 0 ...id-Atom-N450.xml => x86_64-cpuid-Atom-N450.xml} | 0 ...est.xml => x86_64-cpuid-Core-i5-2500-guest.xml} | 0 ...host.xml => x86_64-cpuid-Core-i5-2500-host.xml} | 0 ...json.xml => x86_64-cpuid-Core-i5-2500-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Core-i5-2500.json | 203 +++++ ...e-i5-2500.xml => x86_64-cpuid-Core-i5-2500.xml} | 0 ...st.xml => x86_64-cpuid-Core-i5-2540M-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i5-2540M-host.xml} | 0 ...son.xml => x86_64-cpuid-Core-i5-2540M-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json | 203 +++++ ...i5-2540M.xml => x86_64-cpuid-Core-i5-2540M.xml} | 0 ...st.xml => x86_64-cpuid-Core-i5-4670T-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i5-4670T-host.xml} | 0 ...son.xml => x86_64-cpuid-Core-i5-4670T-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json | 203 +++++ ...i5-4670T.xml => x86_64-cpuid-Core-i5-4670T.xml} | 0 ...est.xml => x86_64-cpuid-Core-i5-6600-guest.xml} | 0 ...host.xml => x86_64-cpuid-Core-i5-6600-host.xml} | 0 ...json.xml => x86_64-cpuid-Core-i5-6600-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Core-i5-6600.json | 203 +++++ ...e-i5-6600.xml => x86_64-cpuid-Core-i5-6600.xml} | 0 ...est.xml => x86_64-cpuid-Core-i7-2600-guest.xml} | 0 ...host.xml => x86_64-cpuid-Core-i7-2600-host.xml} | 0 ...json.xml => x86_64-cpuid-Core-i7-2600-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-2600.json | 203 +++++ ...e-i7-2600.xml => x86_64-cpuid-Core-i7-2600.xml} | 0 ...st.xml => x86_64-cpuid-Core-i7-3520M-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i7-3520M-host.xml} | 0 ...i7-3520M.xml => x86_64-cpuid-Core-i7-3520M.xml} | 0 ...t.xml => x86_64-cpuid-Core-i7-3740QM-guest.xml} | 0 ...st.xml => x86_64-cpuid-Core-i7-3740QM-host.xml} | 0 ...on.xml => x86_64-cpuid-Core-i7-3740QM-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json | 203 +++++ ...-3740QM.xml => x86_64-cpuid-Core-i7-3740QM.xml} | 0 ...est.xml => x86_64-cpuid-Core-i7-3770-guest.xml} | 0 ...host.xml => x86_64-cpuid-Core-i7-3770-host.xml} | 0 ...json.xml => x86_64-cpuid-Core-i7-3770-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-3770.json | 203 +++++ ...e-i7-3770.xml => x86_64-cpuid-Core-i7-3770.xml} | 0 ...st.xml => x86_64-cpuid-Core-i7-4600U-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i7-4600U-host.xml} | 0 ...son.xml => x86_64-cpuid-Core-i7-4600U-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json | 203 +++++ ...i7-4600U.xml => x86_64-cpuid-Core-i7-4600U.xml} | 0 ...st.xml => x86_64-cpuid-Core-i7-5600U-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i7-5600U-host.xml} | 0 .../x86_64-cpuid-Core-i7-5600U-json.xml | 16 + tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json | 203 +++++ ...i7-5600U.xml => x86_64-cpuid-Core-i7-5600U.xml} | 0 ...uest.xml => x86_64-cpuid-Core2-E6850-guest.xml} | 0 ...-host.xml => x86_64-cpuid-Core2-E6850-host.xml} | 0 ...-json.xml => x86_64-cpuid-Core2-E6850-json.xml} | 5 +- tests/cputestdata/x86_64-cpuid-Core2-E6850.json | 203 +++++ ...ore2-E6850.xml => x86_64-cpuid-Core2-E6850.xml} | 0 ...uest.xml => x86_64-cpuid-Core2-Q9500-guest.xml} | 0 ...-host.xml => x86_64-cpuid-Core2-Q9500-host.xml} | 0 ...ore2-Q9500.xml => x86_64-cpuid-Core2-Q9500.xml} | 0 ...50-guest.xml => x86_64-cpuid-FX-8150-guest.xml} | 0 ...8150-host.xml => x86_64-cpuid-FX-8150-host.xml} | 0 ...-cpuid-FX-8150.xml => x86_64-cpuid-FX-8150.xml} | 0 ...est.xml => x86_64-cpuid-Opteron-1352-guest.xml} | 0 ...host.xml => x86_64-cpuid-Opteron-1352-host.xml} | 0 ...eron-1352.xml => x86_64-cpuid-Opteron-1352.xml} | 0 ...est.xml => x86_64-cpuid-Opteron-2350-guest.xml} | 0 ...host.xml => x86_64-cpuid-Opteron-2350-host.xml} | 0 ...json.xml => x86_64-cpuid-Opteron-2350-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Opteron-2350.json | 203 +++++ ...eron-2350.xml => x86_64-cpuid-Opteron-2350.xml} | 0 ...est.xml => x86_64-cpuid-Opteron-6234-guest.xml} | 0 ...host.xml => x86_64-cpuid-Opteron-6234-host.xml} | 0 ...json.xml => x86_64-cpuid-Opteron-6234-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Opteron-6234.json | 203 +++++ ...eron-6234.xml => x86_64-cpuid-Opteron-6234.xml} | 0 ...est.xml => x86_64-cpuid-Opteron-6282-guest.xml} | 0 ...host.xml => x86_64-cpuid-Opteron-6282-host.xml} | 0 ...eron-6282.xml => x86_64-cpuid-Opteron-6282.xml} | 0 ...st.xml => x86_64-cpuid-Pentium-P6100-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Pentium-P6100-host.xml} | 0 ...um-P6100.xml => x86_64-cpuid-Pentium-P6100.xml} | 0 ...guest.xml => x86_64-cpuid-Phenom-B95-guest.xml} | 0 ...5-host.xml => x86_64-cpuid-Phenom-B95-host.xml} | 0 ...5-json.xml => x86_64-cpuid-Phenom-B95-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Phenom-B95.json | 203 +++++ ...-Phenom-B95.xml => x86_64-cpuid-Phenom-B95.xml} | 0 ...-guest.xml => x86_64-cpuid-Xeon-5110-guest.xml} | 0 ...10-host.xml => x86_64-cpuid-Xeon-5110-host.xml} | 0 ...id-Xeon-5110.xml => x86_64-cpuid-Xeon-5110.xml} | 0 ...est.xml => x86_64-cpuid-Xeon-E3-1245-guest.xml} | 0 ...host.xml => x86_64-cpuid-Xeon-E3-1245-host.xml} | 0 ...json.xml => x86_64-cpuid-Xeon-E3-1245-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json | 203 +++++ ...n-E3-1245.xml => x86_64-cpuid-Xeon-E3-1245.xml} | 0 ...est.xml => x86_64-cpuid-Xeon-E5-2630-guest.xml} | 0 ...host.xml => x86_64-cpuid-Xeon-E5-2630-host.xml} | 0 ...json.xml => x86_64-cpuid-Xeon-E5-2630-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json | 203 +++++ ...n-E5-2630.xml => x86_64-cpuid-Xeon-E5-2630.xml} | 0 ...est.xml => x86_64-cpuid-Xeon-E5-2650-guest.xml} | 0 ...host.xml => x86_64-cpuid-Xeon-E5-2650-host.xml} | 0 ...json.xml => x86_64-cpuid-Xeon-E5-2650-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json | 203 +++++ ...n-E5-2650.xml => x86_64-cpuid-Xeon-E5-2650.xml} | 0 ...est.xml => x86_64-cpuid-Xeon-E7-4820-guest.xml} | 0 ...host.xml => x86_64-cpuid-Xeon-E7-4820-host.xml} | 0 ...json.xml => x86_64-cpuid-Xeon-E7-4820-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json | 203 +++++ ...n-E7-4820.xml => x86_64-cpuid-Xeon-E7-4820.xml} | 0 ...guest.xml => x86_64-cpuid-Xeon-W3520-guest.xml} | 0 ...0-host.xml => x86_64-cpuid-Xeon-W3520-host.xml} | 0 ...0-json.xml => x86_64-cpuid-Xeon-W3520-json.xml} | 1 + tests/cputestdata/x86_64-cpuid-Xeon-W3520.json | 203 +++++ ...-Xeon-W3520.xml => x86_64-cpuid-Xeon-W3520.xml} | 0 ...guest.xml => x86_64-cpuid-Xeon-X5460-guest.xml} | 0 ...0-host.xml => x86_64-cpuid-Xeon-X5460-host.xml} | 0 ...-Xeon-X5460.xml => x86_64-cpuid-Xeon-X5460.xml} | 0 ...le-extra.xml => x86_64-exact-disable-extra.xml} | 0 ...-exact-disable.xml => x86_64-exact-disable.xml} | 0 ...xact-disable2.xml => x86_64-exact-disable2.xml} | 0 ...bid-extra.xml => x86_64-exact-forbid-extra.xml} | 0 ...86-exact-forbid.xml => x86_64-exact-forbid.xml} | 0 ...-Haswell.xml => x86_64-exact-force-Haswell.xml} | 0 ...{x86-exact-force.xml => x86_64-exact-force.xml} | 0 ...re-extra.xml => x86_64-exact-require-extra.xml} | 0 ...-exact-require.xml => x86_64-exact-require.xml} | 0 .../{x86-exact.xml => x86_64-exact.xml} | 0 ...-nofallback.xml => x86_64-guest-nofallback.xml} | 0 .../{x86-guest.xml => x86_64-guest.xml} | 0 ...t.xml => x86_64-host+guest,model486-result.xml} | 0 ...ult.xml => x86_64-host+guest,models-result.xml} | 0 ...est-result.xml => x86_64-host+guest-result.xml} | 0 .../{x86-host+guest.xml => x86_64-host+guest.xml} | 0 ... x86_64-host+host+host-model,models-result.xml} | 0 ...k.xml => x86_64-host+host-model-nofallback.xml} | 0 ...t+host-model.xml => x86_64-host+host-model.xml} | 0 ...l => x86_64-host+host-passthrough-features.xml} | 0 ...hrough.xml => x86_64-host+host-passthrough.xml} | 0 .../{x86-host+min.xml => x86_64-host+min.xml} | 0 ...ult.xml => x86_64-host+penryn-force-result.xml} | 0 ...-host+pentium3.xml => x86_64-host+pentium3.xml} | 0 ...l => x86_64-host+strict-force-extra-result.xml} | 0 ...-host-Haswell-noTSX+Haswell,haswell-result.xml} | 0 ...Haswell-noTSX+Haswell-noTSX,haswell-result.xml} | 0 ...64-host-Haswell-noTSX+Haswell-noTSX-result.xml} | 0 ...ell-noTSX.xml => x86_64-host-Haswell-noTSX.xml} | 0 ...SandyBridge.xml => x86_64-host-SandyBridge.xml} | 0 ...-host-amd-fake.xml => x86_64-host-amd-fake.xml} | 0 .../{x86-host-amd.xml => x86_64-host-amd.xml} | 0 ....xml => x86_64-host-better+pentium3-result.xml} | 0 ...{x86-host-better.xml => x86_64-host-better.xml} | 0 ...incomp-arch.xml => x86_64-host-incomp-arch.xml} | 0 ...model.xml => x86_64-host-invtsc+host-model.xml} | 0 ...{x86-host-invtsc.xml => x86_64-host-invtsc.xml} | 0 ...llback.xml => x86_64-host-model-nofallback.xml} | 0 .../{x86-host-model.xml => x86_64-host-model.xml} | 0 ...ost-no-vendor.xml => x86_64-host-no-vendor.xml} | 0 ...es.xml => x86_64-host-passthrough-features.xml} | 0 ...passthrough.xml => x86_64-host-passthrough.xml} | 0 ...sult.xml => x86_64-host-worse+guest-result.xml} | 0 .../{x86-host-worse.xml => x86_64-host-worse.xml} | 0 .../cputestdata/{x86-host.xml => x86_64-host.xml} | 0 tests/cputestdata/{x86-min.xml => x86_64-min.xml} | 0 ...86-penryn-force.xml => x86_64-penryn-force.xml} | 0 ...86-pentium3-amd.xml => x86_64-pentium3-amd.xml} | 0 .../{x86-pentium3.xml => x86_64-pentium3.xml} | 0 ...trict-disable.xml => x86_64-strict-disable.xml} | 0 ...rce-extra.xml => x86_64-strict-force-extra.xml} | 0 ...{x86-strict-full.xml => x86_64-strict-full.xml} | 0 .../{x86-strict.xml => x86_64-strict.xml} | 0 tests/domaincapsschemadata/qemu_2.8.0.s390x.xml | 2 +- .../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 145 ++++ tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 124 +++ tests/domaincapstest.c | 8 + .../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 8 + tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 32 +- .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 879 ++++++++++++++++++++- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 465 ++++++++++- tests/qemumonitorjsontest.c | 4 +- tests/qemuxml2argvtest.c | 3 +- 267 files changed, 6731 insertions(+), 2055 deletions(-) create mode 100755 tests/cputestdata/cpu-convert.py delete mode 100644 tests/cputestdata/x86-cpuid-A10-5800K.json delete mode 100644 tests/cputestdata/x86-cpuid-Core-i5-2500.json delete mode 100644 tests/cputestdata/x86-cpuid-Core-i5-2540M.json delete mode 100644 tests/cputestdata/x86-cpuid-Core-i5-4670T.json delete mode 100644 tests/cputestdata/x86-cpuid-Core-i5-6600.json delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-2600.json delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3740QM.json delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3770.json delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-4600U.json delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-5600U-json.xml delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-5600U.json delete mode 100644 tests/cputestdata/x86-cpuid-Core2-E6850.json delete mode 100644 tests/cputestdata/x86-cpuid-Opteron-2350.json delete mode 100644 tests/cputestdata/x86-cpuid-Opteron-6234.json delete mode 100644 tests/cputestdata/x86-cpuid-Phenom-B95.json delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-E3-1245.json delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-E5-2630.json delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-E5-2650.json delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-E7-4820.json delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-W3520.json rename tests/cputestdata/{x86-Haswell-noTSX-nofallback.xml => x86_64-Haswell-noTSX-nofallback.xml} (100%) rename tests/cputestdata/{x86-Haswell-noTSX.xml => x86_64-Haswell-noTSX.xml} (100%) rename tests/cputestdata/{x86-Haswell.xml => x86_64-Haswell.xml} (100%) rename tests/cputestdata/{x86-baseline-1-result.xml => x86_64-baseline-1-result.xml} (100%) rename tests/cputestdata/{x86-baseline-1.xml => x86_64-baseline-1.xml} (100%) rename tests/cputestdata/{x86-baseline-2-result.xml => x86_64-baseline-2-result.xml} (100%) rename tests/cputestdata/{x86-baseline-2.xml => x86_64-baseline-2.xml} (100%) rename tests/cputestdata/{x86-baseline-3-expanded.xml => x86_64-baseline-3-expanded.xml} (100%) rename tests/cputestdata/{x86-baseline-3-result.xml => x86_64-baseline-3-result.xml} (100%) rename tests/cputestdata/{x86-baseline-3.xml => x86_64-baseline-3.xml} (100%) rename tests/cputestdata/{x86-baseline-4-expanded.xml => x86_64-baseline-4-expanded.xml} (100%) rename tests/cputestdata/{x86-baseline-4-result.xml => x86_64-baseline-4-result.xml} (100%) rename tests/cputestdata/{x86-baseline-4.xml => x86_64-baseline-4.xml} (100%) rename tests/cputestdata/{x86-baseline-5-expanded.xml => x86_64-baseline-5-expanded.xml} (100%) rename tests/cputestdata/{x86-baseline-5-result.xml => x86_64-baseline-5-result.xml} (100%) rename tests/cputestdata/{x86-baseline-5.xml => x86_64-baseline-5.xml} (100%) rename tests/cputestdata/{x86-baseline-6-migratable.xml => x86_64-baseline-6-migratable.xml} (100%) rename tests/cputestdata/{x86-baseline-6-result.xml => x86_64-baseline-6-result.xml} (100%) rename tests/cputestdata/{x86-baseline-6.xml => x86_64-baseline-6.xml} (100%) rename tests/cputestdata/{x86-baseline-7-result.xml => x86_64-baseline-7-result.xml} (100%) rename tests/cputestdata/{x86-baseline-7.xml => x86_64-baseline-7.xml} (100%) rename tests/cputestdata/{x86-baseline-8-result.xml => x86_64-baseline-8-result.xml} (100%) rename tests/cputestdata/{x86-baseline-8.xml => x86_64-baseline-8.xml} (100%) rename tests/cputestdata/{x86-baseline-incompatible-vendors.xml => x86_64-baseline-incompatible-vendors.xml} (100%) rename tests/cputestdata/{x86-baseline-no-vendor-result.xml => x86_64-baseline-no-vendor-result.xml} (100%) rename tests/cputestdata/{x86-baseline-no-vendor.xml => x86_64-baseline-no-vendor.xml} (100%) rename tests/cputestdata/{x86-baseline-some-vendors-result.xml => x86_64-baseline-some-vendors-result.xml} (100%) rename tests/cputestdata/{x86-baseline-some-vendors.xml => x86_64-baseline-some-vendors.xml} (100%) rename tests/cputestdata/{x86-bogus-feature.xml => x86_64-bogus-feature.xml} (100%) rename tests/cputestdata/{x86-bogus-model.xml => x86_64-bogus-model.xml} (100%) rename tests/cputestdata/{x86-bogus-vendor.xml => x86_64-bogus-vendor.xml} (100%) rename tests/cputestdata/{x86-cpuid-A10-5800K-guest.xml => x86_64-cpuid-A10-5800K-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-A10-5800K-host.xml => x86_64-cpuid-A10-5800K-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-A10-5800K-json.xml => x86_64-cpuid-A10-5800K-json.xml} (96%) create mode 100644 tests/cputestdata/x86_64-cpuid-A10-5800K.json rename tests/cputestdata/{x86-cpuid-A10-5800K.xml => x86_64-cpuid-A10-5800K.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-D510-guest.xml => x86_64-cpuid-Atom-D510-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-D510-host.xml => x86_64-cpuid-Atom-D510-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-D510.xml => x86_64-cpuid-Atom-D510.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-N450-guest.xml => x86_64-cpuid-Atom-N450-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-N450-host.xml => x86_64-cpuid-Atom-N450-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-N450.xml => x86_64-cpuid-Atom-N450.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2500-guest.xml => x86_64-cpuid-Core-i5-2500-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2500-host.xml => x86_64-cpuid-Core-i5-2500-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2540M-json.xml => x86_64-cpuid-Core-i5-2500-json.xml} (94%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2500.json rename tests/cputestdata/{x86-cpuid-Core-i5-2500.xml => x86_64-cpuid-Core-i5-2500.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2540M-guest.xml => x86_64-cpuid-Core-i5-2540M-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2540M-host.xml => x86_64-cpuid-Core-i5-2540M-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2500-json.xml => x86_64-cpuid-Core-i5-2540M-json.xml} (94%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json rename tests/cputestdata/{x86-cpuid-Core-i5-2540M.xml => x86_64-cpuid-Core-i5-2540M.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-4670T-guest.xml => x86_64-cpuid-Core-i5-4670T-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-4670T-host.xml => x86_64-cpuid-Core-i5-4670T-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-4670T-json.xml => x86_64-cpuid-Core-i5-4670T-json.xml} (95%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json rename tests/cputestdata/{x86-cpuid-Core-i5-4670T.xml => x86_64-cpuid-Core-i5-4670T.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-6600-guest.xml => x86_64-cpuid-Core-i5-6600-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-6600-host.xml => x86_64-cpuid-Core-i5-6600-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-6600-json.xml => x86_64-cpuid-Core-i5-6600-json.xml} (93%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-6600.json rename tests/cputestdata/{x86-cpuid-Core-i5-6600.xml => x86_64-cpuid-Core-i5-6600.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-2600-guest.xml => x86_64-cpuid-Core-i7-2600-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-2600-host.xml => x86_64-cpuid-Core-i7-2600-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-2600-json.xml => x86_64-cpuid-Core-i7-2600-json.xml} (93%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600.json rename tests/cputestdata/{x86-cpuid-Core-i7-2600.xml => x86_64-cpuid-Core-i7-2600.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3520M-guest.xml => x86_64-cpuid-Core-i7-3520M-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3520M-host.xml => x86_64-cpuid-Core-i7-3520M-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3520M.xml => x86_64-cpuid-Core-i7-3520M.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM-guest.xml => x86_64-cpuid-Core-i7-3740QM-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM-host.xml => x86_64-cpuid-Core-i7-3740QM-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM-json.xml => x86_64-cpuid-Core-i7-3740QM-json.xml} (93%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM.xml => x86_64-cpuid-Core-i7-3740QM.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3770-guest.xml => x86_64-cpuid-Core-i7-3770-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3770-host.xml => x86_64-cpuid-Core-i7-3770-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3770-json.xml => x86_64-cpuid-Core-i7-3770-json.xml} (92%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3770.json rename tests/cputestdata/{x86-cpuid-Core-i7-3770.xml => x86_64-cpuid-Core-i7-3770.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-4600U-guest.xml => x86_64-cpuid-Core-i7-4600U-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-4600U-host.xml => x86_64-cpuid-Core-i7-4600U-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-4600U-json.xml => x86_64-cpuid-Core-i7-4600U-json.xml} (95%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json rename tests/cputestdata/{x86-cpuid-Core-i7-4600U.xml => x86_64-cpuid-Core-i7-4600U.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-5600U-guest.xml => x86_64-cpuid-Core-i7-5600U-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-5600U-host.xml => x86_64-cpuid-Core-i7-5600U-host.xml} (100%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-5600U-json.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json rename tests/cputestdata/{x86-cpuid-Core-i7-5600U.xml => x86_64-cpuid-Core-i7-5600U.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-E6850-guest.xml => x86_64-cpuid-Core2-E6850-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-E6850-host.xml => x86_64-cpuid-Core2-E6850-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-E6850-json.xml => x86_64-cpuid-Core2-E6850-json.xml} (75%) create mode 100644 tests/cputestdata/x86_64-cpuid-Core2-E6850.json rename tests/cputestdata/{x86-cpuid-Core2-E6850.xml => x86_64-cpuid-Core2-E6850.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-Q9500-guest.xml => x86_64-cpuid-Core2-Q9500-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-Q9500-host.xml => x86_64-cpuid-Core2-Q9500-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-Q9500.xml => x86_64-cpuid-Core2-Q9500.xml} (100%) rename tests/cputestdata/{x86-cpuid-FX-8150-guest.xml => x86_64-cpuid-FX-8150-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-FX-8150-host.xml => x86_64-cpuid-FX-8150-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-FX-8150.xml => x86_64-cpuid-FX-8150.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-1352-guest.xml => x86_64-cpuid-Opteron-1352-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-1352-host.xml => x86_64-cpuid-Opteron-1352-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-1352.xml => x86_64-cpuid-Opteron-1352.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-2350-guest.xml => x86_64-cpuid-Opteron-2350-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-2350-host.xml => x86_64-cpuid-Opteron-2350-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-2350-json.xml => x86_64-cpuid-Opteron-2350-json.xml} (97%) create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-2350.json rename tests/cputestdata/{x86-cpuid-Opteron-2350.xml => x86_64-cpuid-Opteron-2350.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6234-guest.xml => x86_64-cpuid-Opteron-6234-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6234-host.xml => x86_64-cpuid-Opteron-6234-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6234-json.xml => x86_64-cpuid-Opteron-6234-json.xml} (96%) create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-6234.json rename tests/cputestdata/{x86-cpuid-Opteron-6234.xml => x86_64-cpuid-Opteron-6234.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6282-guest.xml => x86_64-cpuid-Opteron-6282-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6282-host.xml => x86_64-cpuid-Opteron-6282-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6282.xml => x86_64-cpuid-Opteron-6282.xml} (100%) rename tests/cputestdata/{x86-cpuid-Pentium-P6100-guest.xml => x86_64-cpuid-Pentium-P6100-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Pentium-P6100-host.xml => x86_64-cpuid-Pentium-P6100-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Pentium-P6100.xml => x86_64-cpuid-Pentium-P6100.xml} (100%) rename tests/cputestdata/{x86-cpuid-Phenom-B95-guest.xml => x86_64-cpuid-Phenom-B95-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Phenom-B95-host.xml => x86_64-cpuid-Phenom-B95-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Phenom-B95-json.xml => x86_64-cpuid-Phenom-B95-json.xml} (97%) create mode 100644 tests/cputestdata/x86_64-cpuid-Phenom-B95.json rename tests/cputestdata/{x86-cpuid-Phenom-B95.xml => x86_64-cpuid-Phenom-B95.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-5110-guest.xml => x86_64-cpuid-Xeon-5110-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-5110-host.xml => x86_64-cpuid-Xeon-5110-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-5110.xml => x86_64-cpuid-Xeon-5110.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245-guest.xml => x86_64-cpuid-Xeon-E3-1245-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245-host.xml => x86_64-cpuid-Xeon-E3-1245-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245-json.xml => x86_64-cpuid-Xeon-E3-1245-json.xml} (93%) create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245.xml => x86_64-cpuid-Xeon-E3-1245.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630-guest.xml => x86_64-cpuid-Xeon-E5-2630-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630-host.xml => x86_64-cpuid-Xeon-E5-2630-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630-json.xml => x86_64-cpuid-Xeon-E5-2630-json.xml} (95%) create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630.xml => x86_64-cpuid-Xeon-E5-2630.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650-guest.xml => x86_64-cpuid-Xeon-E5-2650-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650-host.xml => x86_64-cpuid-Xeon-E5-2650-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650-json.xml => x86_64-cpuid-Xeon-E5-2650-json.xml} (94%) create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650.xml => x86_64-cpuid-Xeon-E5-2650.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820-guest.xml => x86_64-cpuid-Xeon-E7-4820-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820-host.xml => x86_64-cpuid-Xeon-E7-4820-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820-json.xml => x86_64-cpuid-Xeon-E7-4820-json.xml} (94%) create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820.xml => x86_64-cpuid-Xeon-E7-4820.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-W3520-guest.xml => x86_64-cpuid-Xeon-W3520-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-W3520-host.xml => x86_64-cpuid-Xeon-W3520-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-W3520-json.xml => x86_64-cpuid-Xeon-W3520-json.xml} (93%) create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-W3520.json rename tests/cputestdata/{x86-cpuid-Xeon-W3520.xml => x86_64-cpuid-Xeon-W3520.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-X5460-guest.xml => x86_64-cpuid-Xeon-X5460-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-X5460-host.xml => x86_64-cpuid-Xeon-X5460-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-X5460.xml => x86_64-cpuid-Xeon-X5460.xml} (100%) rename tests/cputestdata/{x86-exact-disable-extra.xml => x86_64-exact-disable-extra.xml} (100%) rename tests/cputestdata/{x86-exact-disable.xml => x86_64-exact-disable.xml} (100%) rename tests/cputestdata/{x86-exact-disable2.xml => x86_64-exact-disable2.xml} (100%) rename tests/cputestdata/{x86-exact-forbid-extra.xml => x86_64-exact-forbid-extra.xml} (100%) rename tests/cputestdata/{x86-exact-forbid.xml => x86_64-exact-forbid.xml} (100%) rename tests/cputestdata/{x86-exact-force-Haswell.xml => x86_64-exact-force-Haswell.xml} (100%) rename tests/cputestdata/{x86-exact-force.xml => x86_64-exact-force.xml} (100%) rename tests/cputestdata/{x86-exact-require-extra.xml => x86_64-exact-require-extra.xml} (100%) rename tests/cputestdata/{x86-exact-require.xml => x86_64-exact-require.xml} (100%) rename tests/cputestdata/{x86-exact.xml => x86_64-exact.xml} (100%) rename tests/cputestdata/{x86-guest-nofallback.xml => x86_64-guest-nofallback.xml} (100%) rename tests/cputestdata/{x86-guest.xml => x86_64-guest.xml} (100%) rename tests/cputestdata/{x86-host+guest,model486-result.xml => x86_64-host+guest,model486-result.xml} (100%) rename tests/cputestdata/{x86-host+guest,models-result.xml => x86_64-host+guest,models-result.xml} (100%) rename tests/cputestdata/{x86-host+guest-result.xml => x86_64-host+guest-result.xml} (100%) rename tests/cputestdata/{x86-host+guest.xml => x86_64-host+guest.xml} (100%) rename tests/cputestdata/{x86-host+host+host-model,models-result.xml => x86_64-host+host+host-model,models-result.xml} (100%) rename tests/cputestdata/{x86-host+host-model-nofallback.xml => x86_64-host+host-model-nofallback.xml} (100%) rename tests/cputestdata/{x86-host+host-model.xml => x86_64-host+host-model.xml} (100%) rename tests/cputestdata/{x86-host+host-passthrough-features.xml => x86_64-host+host-passthrough-features.xml} (100%) rename tests/cputestdata/{x86-host+host-passthrough.xml => x86_64-host+host-passthrough.xml} (100%) rename tests/cputestdata/{x86-host+min.xml => x86_64-host+min.xml} (100%) rename tests/cputestdata/{x86-host+penryn-force-result.xml => x86_64-host+penryn-force-result.xml} (100%) rename tests/cputestdata/{x86-host+pentium3.xml => x86_64-host+pentium3.xml} (100%) rename tests/cputestdata/{x86-host+strict-force-extra-result.xml => x86_64-host+strict-force-extra-result.xml} (100%) rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell,haswell-result.xml => x86_64-host-Haswell-noTSX+Haswell,haswell-result.xml} (100%) rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml => x86_64-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml} (100%) rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell-noTSX-result.xml => x86_64-host-Haswell-noTSX+Haswell-noTSX-result.xml} (100%) rename tests/cputestdata/{x86-host-Haswell-noTSX.xml => x86_64-host-Haswell-noTSX.xml} (100%) rename tests/cputestdata/{x86-host-SandyBridge.xml => x86_64-host-SandyBridge.xml} (100%) rename tests/cputestdata/{x86-host-amd-fake.xml => x86_64-host-amd-fake.xml} (100%) rename tests/cputestdata/{x86-host-amd.xml => x86_64-host-amd.xml} (100%) rename tests/cputestdata/{x86-host-better+pentium3-result.xml => x86_64-host-better+pentium3-result.xml} (100%) rename tests/cputestdata/{x86-host-better.xml => x86_64-host-better.xml} (100%) rename tests/cputestdata/{x86-host-incomp-arch.xml => x86_64-host-incomp-arch.xml} (100%) rename tests/cputestdata/{x86-host-invtsc+host-model.xml => x86_64-host-invtsc+host-model.xml} (100%) rename tests/cputestdata/{x86-host-invtsc.xml => x86_64-host-invtsc.xml} (100%) rename tests/cputestdata/{x86-host-model-nofallback.xml => x86_64-host-model-nofallback.xml} (100%) rename tests/cputestdata/{x86-host-model.xml => x86_64-host-model.xml} (100%) rename tests/cputestdata/{x86-host-no-vendor.xml => x86_64-host-no-vendor.xml} (100%) rename tests/cputestdata/{x86-host-passthrough-features.xml => x86_64-host-passthrough-features.xml} (100%) rename tests/cputestdata/{x86-host-passthrough.xml => x86_64-host-passthrough.xml} (100%) rename tests/cputestdata/{x86-host-worse+guest-result.xml => x86_64-host-worse+guest-result.xml} (100%) rename tests/cputestdata/{x86-host-worse.xml => x86_64-host-worse.xml} (100%) rename tests/cputestdata/{x86-host.xml => x86_64-host.xml} (100%) rename tests/cputestdata/{x86-min.xml => x86_64-min.xml} (100%) rename tests/cputestdata/{x86-penryn-force.xml => x86_64-penryn-force.xml} (100%) rename tests/cputestdata/{x86-pentium3-amd.xml => x86_64-pentium3-amd.xml} (100%) rename tests/cputestdata/{x86-pentium3.xml => x86_64-pentium3.xml} (100%) rename tests/cputestdata/{x86-strict-disable.xml => x86_64-strict-disable.xml} (100%) rename tests/cputestdata/{x86-strict-force-extra.xml => x86_64-strict-force-extra.xml} (100%) rename tests/cputestdata/{x86-strict-full.xml => x86_64-strict-full.xml} (100%) rename tests/cputestdata/{x86-strict.xml => x86_64-strict.xml} (100%) create mode 100644 tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml create mode 100644 tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml -- 2.11.1

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Generated from Eduardo's work/x86-query-cpu-expansion-full branch rebased on current QEMU master. Version 3: - regenerated with a rebased QEMU to avoid conflicts with existing caps_2.9.0.x86_64.replies file - summary changed from "qemucapstest: Add test data for QEMU 2.9.0" Version 2: - no change .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 224 ++++++++++++++++++++- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 170 +++++++++++++++- 2 files changed, 391 insertions(+), 3 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies index fe9fe7d5b..c000f8cf9 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies @@ -6,7 +6,7 @@ "minor": 8, "major": 2 }, - "package": " (v2.8.0-1321-gad584d3)" + "package": " (v2.8.0-1428-g1b1a68c602)" }, "capabilities": [ ] @@ -26,7 +26,7 @@ "minor": 8, "major": 2 }, - "package": " (v2.8.0-1321-gad584d3)" + "package": " (v2.8.0-1428-g1b1a68c602)" }, "id": "libvirt-2" } @@ -215,6 +215,9 @@ "name": "query-cpus" }, { + "name": "query-cpu-model-expansion" + }, + { "name": "query-cpu-definitions" }, { @@ -677,6 +680,9 @@ "name": "floppy-bus" }, { + "name": "base-x86_64-cpu" + }, + { "name": "isa-parallel" }, { @@ -1406,6 +1412,9 @@ "name": "pc-i440fx-1.7-machine" }, { + "name": "max-x86_64-cpu" + }, + { "name": "virtio-serial-device" }, { @@ -3996,6 +4005,14 @@ { "return": [ { + "name": "max", + "typename": "max-x86_64-cpu", + "unavailable-features": [ + ], + "static": false, + "migration-safe": false + }, + { "name": "host", "typename": "host-x86_64-cpu", "unavailable-features": [ @@ -4004,6 +4021,14 @@ "migration-safe": false }, { + "name": "base", + "typename": "base-x86_64-cpu", + "unavailable-features": [ + ], + "static": true, + "migration-safe": true + }, + { "name": "qemu64", "typename": "qemu64-x86_64-cpu", "unavailable-features": [ @@ -14337,6 +14362,185 @@ { "return": { + "model": { + "name": "base", + "props": { + "cmov": true, + "ia64": false, + "aes": true, + "mmx": true, + "rdpid": false, + "arat": true, + "pause-filter": false, + "xsavec": true, + "osxsave": false, + "kvm-asyncpf": true, + "perfctr-core": false, + "mpx": true, + "pbe": false, + "avx512cd": false, + "decodeassists": false, + "sse4.1": true, + "family": 6, + "avx512f": false, + "msr": true, + "mce": true, + "mca": true, + "xcrypt": false, + "min-level": 13, + "xgetbv1": true, + "cid": false, + "ds": false, + "fxsr": true, + "xsaveopt": true, + "xtpr": false, + "avx512vl": false, + "avx512-vpopcntdq": false, + "phe": false, + "extapic": false, + "3dnowprefetch": true, + "cr8legacy": false, + "xcrypt-en": false, + "pn": false, + "dca": false, + "vendor": "GenuineIntel", + "pku": false, + "smx": false, + "cmp-legacy": false, + "avx512-4fmaps": false, + "vmcb-clean": false, + "hle": true, + "3dnowext": false, + "npt": false, + "clwb": false, + "lbrv": false, + "adx": true, + "ss": true, + "pni": true, + "svm-lock": false, + "smep": true, + "smap": true, + "pfthreshold": false, + "x2apic": true, + "avx512vbmi": false, + "flushbyasid": false, + "f16c": true, + "ace2-en": false, + "pae": true, + "pat": true, + "sse": true, + "phe-en": false, + "kvm-nopiodelay": true, + "tm": false, + "kvmclock-stable-bit": true, + "hypervisor": true, + "pcommit": false, + "syscall": true, + "avx512dq": false, + "svm": false, + "invtsc": false, + "sse2": true, + "est": false, + "avx512ifma": false, + "tm2": false, + "kvm-pv-eoi": true, + "cx8": true, + "kvm-mmu": false, + "sse4.2": true, + "pge": true, + "pdcm": false, + "model": 94, + "movbe": true, + "nrip-save": false, + "ssse3": true, + "sse4a": false, + "invpcid": true, + "pdpe1gb": true, + "tsc-deadline": true, + "fma": true, + "cx16": true, + "de": true, + "stepping": 3, + "xsave": true, + "clflush": true, + "skinit": false, + "tsc": true, + "tce": false, + "fpu": true, + "ds-cpl": false, + "ibs": false, + "fma4": false, + "la57": false, + "osvw": false, + "apic": true, + "pmm": false, + "tsc-adjust": true, + "kvm-steal-time": true, + "kvmclock": true, + "lwp": false, + "xop": false, + "avx": true, + "ospke": false, + "acpi": false, + "avx512bw": false, + "ace2": false, + "fsgsbase": true, + "ht": false, + "nx": true, + "pclmulqdq": true, + "mmxext": false, + "popcnt": true, + "xsaves": true, + "lm": true, + "umip": false, + "pse": true, + "avx2": true, + "sep": true, + "nodeid-msr": false, + "misalignsse": false, + "min-xlevel": 2147483656, + "bmi1": true, + "bmi2": true, + "kvm-pv-unhalt": true, + "tsc-scale": false, + "topoext": false, + "clflushopt": true, + "monitor": false, + "avx512er": false, + "pmm-en": false, + "pcid": true, + "3dnow": false, + "erms": true, + "lahf-lm": true, + "fxsr-opt": false, + "xstore": false, + "rtm": true, + "lmce": true, + "perfctr-nb": false, + "rdrand": true, + "rdseed": true, + "avx512-4vnniw": false, + "vme": true, + "vmx": true, + "dtes64": false, + "mtrr": true, + "rdtscp": true, + "pse36": true, + "tbm": false, + "wdt": false, + "model-id": "Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz", + "sha-ni": false, + "abm": true, + "avx512pf": false, + "xstore-en": false + } + } + }, + "id": "libvirt-48" +} + +{ + "return": { }, "id": "libvirt-1" } @@ -14344,6 +14548,14 @@ { "return": [ { + "name": "max", + "typename": "max-x86_64-cpu", + "unavailable-features": [ + ], + "static": false, + "migration-safe": false + }, + { "name": "host", "typename": "host-x86_64-cpu", "unavailable-features": [ @@ -14353,6 +14565,14 @@ "migration-safe": false }, { + "name": "base", + "typename": "base-x86_64-cpu", + "unavailable-features": [ + ], + "static": true, + "migration-safe": true + }, + { "name": "qemu64", "typename": "qemu64-x86_64-cpu", "unavailable-features": [ diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index dcdc0e621..369e18ee1 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -201,12 +201,178 @@ <flag name='gluster.debug_level'/> <flag name='vhost-scsi'/> <flag name='drive-iotune-group'/> + <flag name='query-cpu-model-expansion'/> <flag name='virtio-net.host_mtu'/> <version>2008050</version> <kvmVersion>0</kvmVersion> - <package> (v2.8.0-1321-gad584d3)</package> + <package> (v2.8.0-1428-g1b1a68c602)</package> <arch>x86_64</arch> + <hostCPU model='base'> + <feature name='cmov' supported='yes'/> + <feature name='ia64' supported='no'/> + <feature name='aes' supported='yes'/> + <feature name='mmx' supported='yes'/> + <feature name='rdpid' supported='no'/> + <feature name='arat' supported='yes'/> + <feature name='pause-filter' supported='no'/> + <feature name='xsavec' supported='yes'/> + <feature name='osxsave' supported='no'/> + <feature name='kvm-asyncpf' supported='yes'/> + <feature name='perfctr-core' supported='no'/> + <feature name='mpx' supported='yes'/> + <feature name='pbe' supported='no'/> + <feature name='avx512cd' supported='no'/> + <feature name='decodeassists' supported='no'/> + <feature name='sse4.1' supported='yes'/> + <feature name='avx512f' supported='no'/> + <feature name='msr' supported='yes'/> + <feature name='mce' supported='yes'/> + <feature name='mca' supported='yes'/> + <feature name='xcrypt' supported='no'/> + <feature name='xgetbv1' supported='yes'/> + <feature name='cid' supported='no'/> + <feature name='ds' supported='no'/> + <feature name='fxsr' supported='yes'/> + <feature name='xsaveopt' supported='yes'/> + <feature name='xtpr' supported='no'/> + <feature name='avx512vl' supported='no'/> + <feature name='avx512-vpopcntdq' supported='no'/> + <feature name='phe' supported='no'/> + <feature name='extapic' supported='no'/> + <feature name='3dnowprefetch' supported='yes'/> + <feature name='cr8legacy' supported='no'/> + <feature name='xcrypt-en' supported='no'/> + <feature name='pn' supported='no'/> + <feature name='dca' supported='no'/> + <feature name='pku' supported='no'/> + <feature name='smx' supported='no'/> + <feature name='cmp-legacy' supported='no'/> + <feature name='avx512-4fmaps' supported='no'/> + <feature name='vmcb-clean' supported='no'/> + <feature name='hle' supported='yes'/> + <feature name='3dnowext' supported='no'/> + <feature name='npt' supported='no'/> + <feature name='clwb' supported='no'/> + <feature name='lbrv' supported='no'/> + <feature name='adx' supported='yes'/> + <feature name='ss' supported='yes'/> + <feature name='pni' supported='yes'/> + <feature name='svm-lock' supported='no'/> + <feature name='smep' supported='yes'/> + <feature name='smap' supported='yes'/> + <feature name='pfthreshold' supported='no'/> + <feature name='x2apic' supported='yes'/> + <feature name='avx512vbmi' supported='no'/> + <feature name='flushbyasid' supported='no'/> + <feature name='f16c' supported='yes'/> + <feature name='ace2-en' supported='no'/> + <feature name='pae' supported='yes'/> + <feature name='pat' supported='yes'/> + <feature name='sse' supported='yes'/> + <feature name='phe-en' supported='no'/> + <feature name='kvm-nopiodelay' supported='yes'/> + <feature name='tm' supported='no'/> + <feature name='kvmclock-stable-bit' supported='yes'/> + <feature name='hypervisor' supported='yes'/> + <feature name='pcommit' supported='no'/> + <feature name='syscall' supported='yes'/> + <feature name='avx512dq' supported='no'/> + <feature name='svm' supported='no'/> + <feature name='invtsc' supported='no'/> + <feature name='sse2' supported='yes'/> + <feature name='est' supported='no'/> + <feature name='avx512ifma' supported='no'/> + <feature name='tm2' supported='no'/> + <feature name='kvm-pv-eoi' supported='yes'/> + <feature name='cx8' supported='yes'/> + <feature name='kvm-mmu' supported='no'/> + <feature name='sse4.2' supported='yes'/> + <feature name='pge' supported='yes'/> + <feature name='pdcm' supported='no'/> + <feature name='movbe' supported='yes'/> + <feature name='nrip-save' supported='no'/> + <feature name='ssse3' supported='yes'/> + <feature name='sse4a' supported='no'/> + <feature name='invpcid' supported='yes'/> + <feature name='pdpe1gb' supported='yes'/> + <feature name='tsc-deadline' supported='yes'/> + <feature name='fma' supported='yes'/> + <feature name='cx16' supported='yes'/> + <feature name='de' supported='yes'/> + <feature name='xsave' supported='yes'/> + <feature name='clflush' supported='yes'/> + <feature name='skinit' supported='no'/> + <feature name='tsc' supported='yes'/> + <feature name='tce' supported='no'/> + <feature name='fpu' supported='yes'/> + <feature name='ds-cpl' supported='no'/> + <feature name='ibs' supported='no'/> + <feature name='fma4' supported='no'/> + <feature name='la57' supported='no'/> + <feature name='osvw' supported='no'/> + <feature name='apic' supported='yes'/> + <feature name='pmm' supported='no'/> + <feature name='tsc-adjust' supported='yes'/> + <feature name='kvm-steal-time' supported='yes'/> + <feature name='kvmclock' supported='yes'/> + <feature name='lwp' supported='no'/> + <feature name='xop' supported='no'/> + <feature name='avx' supported='yes'/> + <feature name='ospke' supported='no'/> + <feature name='acpi' supported='no'/> + <feature name='avx512bw' supported='no'/> + <feature name='ace2' supported='no'/> + <feature name='fsgsbase' supported='yes'/> + <feature name='ht' supported='no'/> + <feature name='nx' supported='yes'/> + <feature name='pclmulqdq' supported='yes'/> + <feature name='mmxext' supported='no'/> + <feature name='popcnt' supported='yes'/> + <feature name='xsaves' supported='yes'/> + <feature name='lm' supported='yes'/> + <feature name='umip' supported='no'/> + <feature name='pse' supported='yes'/> + <feature name='avx2' supported='yes'/> + <feature name='sep' supported='yes'/> + <feature name='nodeid-msr' supported='no'/> + <feature name='misalignsse' supported='no'/> + <feature name='bmi1' supported='yes'/> + <feature name='bmi2' supported='yes'/> + <feature name='kvm-pv-unhalt' supported='yes'/> + <feature name='tsc-scale' supported='no'/> + <feature name='topoext' supported='no'/> + <feature name='clflushopt' supported='yes'/> + <feature name='monitor' supported='no'/> + <feature name='avx512er' supported='no'/> + <feature name='pmm-en' supported='no'/> + <feature name='pcid' supported='yes'/> + <feature name='3dnow' supported='no'/> + <feature name='erms' supported='yes'/> + <feature name='lahf-lm' supported='yes'/> + <feature name='fxsr-opt' supported='no'/> + <feature name='xstore' supported='no'/> + <feature name='rtm' supported='yes'/> + <feature name='lmce' supported='yes'/> + <feature name='perfctr-nb' supported='no'/> + <feature name='rdrand' supported='yes'/> + <feature name='rdseed' supported='yes'/> + <feature name='avx512-4vnniw' supported='no'/> + <feature name='vme' supported='yes'/> + <feature name='vmx' supported='yes'/> + <feature name='dtes64' supported='no'/> + <feature name='mtrr' supported='yes'/> + <feature name='rdtscp' supported='yes'/> + <feature name='pse36' supported='yes'/> + <feature name='tbm' supported='no'/> + <feature name='wdt' supported='no'/> + <feature name='sha-ni' supported='no'/> + <feature name='abm' supported='yes'/> + <feature name='avx512pf' supported='no'/> + <feature name='xstore-en' supported='no'/> + </hostCPU> + <cpu type='kvm' name='max' usable='yes'/> <cpu type='kvm' name='host' usable='yes'/> + <cpu type='kvm' name='base' usable='yes'/> <cpu type='kvm' name='qemu64' usable='yes'/> <cpu type='kvm' name='qemu32' usable='yes'/> <cpu type='kvm' name='phenom' usable='no'/> @@ -236,7 +402,9 @@ <cpu type='kvm' name='Broadwell' usable='yes'/> <cpu type='kvm' name='Broadwell-noTSX' usable='yes'/> <cpu type='kvm' name='486' usable='yes'/> + <cpu type='tcg' name='max' usable='yes'/> <cpu type='tcg' name='host' usable='no'/> + <cpu type='tcg' name='base' usable='yes'/> <cpu type='tcg' name='qemu64' usable='yes'/> <cpu type='tcg' name='qemu32' usable='yes'/> <cpu type='tcg' name='phenom' usable='no'/> -- 2.11.1

On Thu, Feb 23, 2017 at 03:14:59PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Generated from Eduardo's work/x86-query-cpu-expansion-full branch rebased on current QEMU master.
Version 3: - regenerated with a rebased QEMU to avoid conflicts with existing caps_2.9.0.x86_64.replies file - summary changed from "qemucapstest: Add test data for QEMU 2.9.0"
Version 2: - no change
.../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 224 ++++++++++++++++++++- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 170 +++++++++++++++- 2 files changed, 391 insertions(+), 3 deletions(-)
ACK Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - no change .../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 116 +++++++++++++++++++++ tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 116 +++++++++++++++++++++ tests/domaincapstest.c | 8 ++ 3 files changed, 240 insertions(+) create mode 100644 tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml create mode 100644 tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml diff --git a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml new file mode 100644 index 000000000..9b9dfec09 --- /dev/null +++ b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml @@ -0,0 +1,116 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>qemu</domain> + <machine>pc-i440fx-2.9</machine> + <arch>x86_64</arch> + <vcpu max='255'/> + <os supported='yes'> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='no'/> + <mode name='host-model' supported='yes'> + <model fallback='allow'>Broadwell</model> + </mode> + <mode name='custom' supported='yes'> + <model usable='yes'>qemu64</model> + <model usable='yes'>qemu32</model> + <model usable='no'>phenom</model> + <model usable='yes'>pentium3</model> + <model usable='yes'>pentium2</model> + <model usable='yes'>pentium</model> + <model usable='yes'>n270</model> + <model usable='yes'>kvm64</model> + <model usable='yes'>kvm32</model> + <model usable='yes'>coreduo</model> + <model usable='yes'>core2duo</model> + <model usable='yes'>athlon</model> + <model usable='yes'>Westmere</model> + <model usable='no'>Skylake-Client</model> + <model usable='no'>SandyBridge</model> + <model usable='yes'>Penryn</model> + <model usable='no'>Opteron_G5</model> + <model usable='no'>Opteron_G4</model> + <model usable='no'>Opteron_G3</model> + <model usable='yes'>Opteron_G2</model> + <model usable='yes'>Opteron_G1</model> + <model usable='yes'>Nehalem</model> + <model usable='no'>IvyBridge</model> + <model usable='no'>Haswell</model> + <model usable='no'>Haswell-noTSX</model> + <model usable='yes'>Conroe</model> + <model usable='no'>Broadwell</model> + <model usable='no'>Broadwell-noTSX</model> + <model usable='yes'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>ide</value> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>kvm</value> + <value>vfio</value> + </enum> + </hostdev> + </devices> + <features> + <gic supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml new file mode 100644 index 000000000..49722f91f --- /dev/null +++ b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml @@ -0,0 +1,116 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>kvm</domain> + <machine>pc-i440fx-2.9</machine> + <arch>x86_64</arch> + <vcpu max='255'/> + <os supported='yes'> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='yes'/> + <mode name='host-model' supported='yes'> + <model fallback='allow'>Broadwell</model> + </mode> + <mode name='custom' supported='yes'> + <model usable='yes'>qemu64</model> + <model usable='yes'>qemu32</model> + <model usable='no'>phenom</model> + <model usable='yes'>pentium3</model> + <model usable='yes'>pentium2</model> + <model usable='yes'>pentium</model> + <model usable='yes'>n270</model> + <model usable='yes'>kvm64</model> + <model usable='yes'>kvm32</model> + <model usable='yes'>coreduo</model> + <model usable='yes'>core2duo</model> + <model usable='no'>athlon</model> + <model usable='yes'>Westmere</model> + <model usable='yes'>Skylake-Client</model> + <model usable='yes'>SandyBridge</model> + <model usable='yes'>Penryn</model> + <model usable='no'>Opteron_G5</model> + <model usable='no'>Opteron_G4</model> + <model usable='no'>Opteron_G3</model> + <model usable='yes'>Opteron_G2</model> + <model usable='yes'>Opteron_G1</model> + <model usable='yes'>Nehalem</model> + <model usable='yes'>IvyBridge</model> + <model usable='yes'>Haswell</model> + <model usable='yes'>Haswell-noTSX</model> + <model usable='yes'>Conroe</model> + <model usable='yes'>Broadwell</model> + <model usable='yes'>Broadwell-noTSX</model> + <model usable='yes'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>ide</value> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>kvm</value> + <value>vfio</value> + </enum> + </hostdev> + </devices> + <features> + <gic supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 28d8609ac..9b64f2c18 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -453,6 +453,14 @@ mymain(void) "/usr/bin/qemu-system-x86_64", NULL, "x86_64", VIR_DOMAIN_VIRT_QEMU); + DO_TEST_QEMU("2.9.0", "caps_2.9.0", + "/usr/bin/qemu-system-x86_64", NULL, + "x86_64", VIR_DOMAIN_VIRT_KVM); + + DO_TEST_QEMU("2.9.0-tcg", "caps_2.9.0", + "/usr/bin/qemu-system-x86_64", NULL, + "x86_64", VIR_DOMAIN_VIRT_QEMU); + DO_TEST_QEMU("2.7.0", "caps_2.7.0", "/usr/bin/qemu-system-s390x", NULL, "s390x", VIR_DOMAIN_VIRT_KVM); -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:00PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - no change
.../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 116 +++++++++++++++++++++ tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 116 +++++++++++++++++++++ tests/domaincapstest.c | 8 ++ 3 files changed, 240 insertions(+) create mode 100644 tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml create mode 100644 tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml
ACK Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - no change src/qemu/qemu_capabilities.c | 109 ++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 5b5e3ac18..0f5acb76a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3048,37 +3048,36 @@ virQEMUCapsCPUFilterFeatures(const char *name, } -static void -virQEMUCapsCopyCPUModelFromQEMU(virQEMUCapsPtr qemuCaps) +/** + * Returns 0 when host CPU model provided by QEMU was filled in qemuCaps, + * 1 when the caller should fall back to using virCapsPtr->host.cpu, + * -1 on error. + */ +static int +virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps, + virCPUDefPtr cpu) { - virCPUDefPtr cpu = NULL; - qemuMonitorCPUModelInfoPtr modelInfo = NULL; + qemuMonitorCPUModelInfoPtr modelInfo = qemuCaps->hostCPUModelInfo; size_t i; - if (!(modelInfo = qemuCaps->hostCPUModelInfo)) { + if (!modelInfo) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing host CPU model info from QEMU capabilities" - " for binary %s"), qemuCaps->binary); - goto error; + _("missing host CPU model info from QEMU capabilities " + "for binary %s"), + qemuCaps->binary); + return -1; } - if (VIR_ALLOC(cpu) < 0) - goto error; - if (VIR_STRDUP(cpu->model, modelInfo->name) < 0 || VIR_ALLOC_N(cpu->features, modelInfo->nprops) < 0) - goto error; + return -1; cpu->nfeatures_max = modelInfo->nprops; cpu->nfeatures = 0; - cpu->sockets = cpu->cores = cpu->threads = 0; - cpu->type = VIR_CPU_TYPE_GUEST; - cpu->mode = VIR_CPU_MODE_CUSTOM; - cpu->match = VIR_CPU_MATCH_EXACT; for (i = 0; i < modelInfo->nprops; i++) { if (VIR_STRDUP(cpu->features[i].name, modelInfo->props[i].name) < 0) - goto error; + return -1; if (modelInfo->props[i].supported) cpu->features[i].policy = VIR_CPU_FEATURE_REQUIRE; @@ -3088,31 +3087,53 @@ virQEMUCapsCopyCPUModelFromQEMU(virQEMUCapsPtr qemuCaps) cpu->nfeatures++; } - qemuCaps->hostCPUModel = cpu; - return; - - error: - virCPUDefFree(cpu); - qemuCaps->hostCPUModel = NULL; - virResetLastError(); + return 0; } -static void -virQEMUCapsCopyCPUModelFromHost(virQEMUCapsPtr qemuCaps, - virCapsPtr caps) +/** + * Returns 0 when host CPU model provided by QEMU was filled in qemuCaps, + * 1 when the caller should fall back to using virCapsPtr->host.cpu, + * -1 on error. + */ +static int +virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, + virCPUDefPtr cpu) +{ + int ret = 1; + + if (ARCH_IS_S390(qemuCaps->arch)) + ret = virQEMUCapsInitCPUModelS390(qemuCaps, cpu); + + return ret; +} + + +void +virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, + virCapsPtr caps) { virCPUDefPtr cpu = NULL; + int rc; - if (caps->host.cpu && caps->host.cpu->model) { - if (VIR_ALLOC(cpu) < 0) + if (!caps || !virQEMUCapsGuestIsNative(caps->host.arch, qemuCaps->arch)) + return; + + if (VIR_ALLOC(cpu) < 0) + goto error; + + cpu->type = VIR_CPU_TYPE_GUEST; + cpu->mode = VIR_CPU_MODE_CUSTOM; + cpu->match = VIR_CPU_MATCH_EXACT; + cpu->fallback = VIR_CPU_FALLBACK_ALLOW; + + if ((rc = virQEMUCapsInitCPUModel(qemuCaps, cpu)) < 0) { + goto error; + } else if (rc == 1) { + VIR_DEBUG("No host CPU model info from QEMU; using host capabilities"); + if (!caps->host.cpu || !caps->host.cpu->model) goto error; - cpu->sockets = cpu->cores = cpu->threads = 0; - cpu->type = VIR_CPU_TYPE_GUEST; - cpu->mode = VIR_CPU_MODE_CUSTOM; - cpu->match = VIR_CPU_MATCH_EXACT; - if (virCPUDefCopyModelFilter(cpu, caps->host.cpu, true, virQEMUCapsCPUFilterFeatures, qemuCaps) < 0) @@ -3124,30 +3145,10 @@ virQEMUCapsCopyCPUModelFromHost(virQEMUCapsPtr qemuCaps, error: virCPUDefFree(cpu); - qemuCaps->hostCPUModel = NULL; virResetLastError(); } -void -virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, - virCapsPtr caps) -{ - if (!caps || !virQEMUCapsGuestIsNative(caps->host.arch, qemuCaps->arch)) - return; - - switch (qemuCaps->arch) { - case VIR_ARCH_S390: - case VIR_ARCH_S390X: - virQEMUCapsCopyCPUModelFromQEMU(qemuCaps); - break; - - default: - virQEMUCapsCopyCPUModelFromHost(qemuCaps, caps); - } -} - - static int virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, xmlXPathContextPtr ctxt) -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:01PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - no change
src/qemu/qemu_capabilities.c | 109 ++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 54 deletions(-)
ACK Pavel

Our documentation of the domain capabilities XML says that the fallback attribute of a CPU model is used to indicate whether the CPU model was detected by libvirt itself (fallback="allow") or by asking the hypervisor (fallback="forbid"). We need to properly set fallback="forbid" when CPU model comes from QEMU to match the documentation. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - ACKed in v2 - no change Version 2: - no change src/qemu/qemu_capabilities.c | 3 +++ tests/domaincapsschemadata/qemu_2.8.0.s390x.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 0f5acb76a..29ca3d4f9 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3105,6 +3105,9 @@ virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, if (ARCH_IS_S390(qemuCaps->arch)) ret = virQEMUCapsInitCPUModelS390(qemuCaps, cpu); + if (ret == 0) + cpu->fallback = VIR_CPU_FALLBACK_FORBID; + return ret; } diff --git a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml index efe345962..0b8135bc5 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml @@ -21,7 +21,7 @@ <cpu> <mode name='host-passthrough' supported='yes'/> <mode name='host-model' supported='yes'> - <model fallback='allow'>zEC12.2-base</model> + <model fallback='forbid'>zEC12.2-base</model> <feature policy='require' name='aefsi'/> <feature policy='require' name='msa5'/> <feature policy='require' name='msa4'/> -- 2.11.1

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - reworded and updated documentation Version 2: - no change docs/formatdomain.html.in | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 02ce7924c..ee631186c 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1272,19 +1272,21 @@ model even if the destination host contains more capable CPUs for the running instance of the guest; but shutting down and restarting the guest may present different hardware to the guest according to - the capabilities of the new host. <strong>Beware</strong>, due to the - way libvirt detects host CPU and due to the fact libvirt does not - talk to QEMU/KVM when creating the CPU model, CPU configuration - created using <code>host-model</code> may not work as expected. The - guest CPU may differ from the configuration and it may also confuse - guest OS by using a combination of CPU features and other parameters - (such as CPUID level) that don't work. Until these issues are fixed, - it's a good idea to avoid using <code>host-model</code> and use - <code>custom</code> mode with just the CPU model from host - capabilities XML. - <span class="since">Since 1.2.11</span> PowerISA allows - processors to run VMs in binary compatibility mode supporting an - older version of ISA. Libvirt on PowerPC architecture uses the + the capabilities of the new host. Prior to libvirt 3.1.0 and QEMU + 2.9.0 detection of the host CPU model via QEMU is not supported. + Thus the CPU configuration created using <code>host-model</code> + may not work as expected. + <span class="since">Since 3.1.0 and QEMU 2.9.0</span> this mode + works the way it was designed and it is indicated by the + <code>fallback</code> attribute set to <code>forbid</code> in the + host-model CPU definition advertised in + <a href="formatdomaincaps.html#elementsCPU">domain capabilities XML</a>. + When <code>fallback</code> attribute is set to <code>allow</code> + in the domain capabilities XML, it is recommended to use + <code>custom</code> mode with just the CPU model from the host + capabilities XML. <span class="since">Since 1.2.11</span> PowerISA + allows processors to run VMs in binary compatibility mode supporting + an older version of ISA. Libvirt on PowerPC architecture uses the <code>host-model</code> to signify a guest mode CPU running in binary compatibility mode. Example: When a user needs a power7 VM to run in compatibility mode @@ -1307,6 +1309,15 @@ a migration is attempted then the guest may hang or crash upon resuming execution on the destination host.</dd> </dl> + + Both <code>host-model</code> and <code>host-passthrough</code> modes + make sense when a domain can run directly on the host CPUs (for + example, domains with type <code>kvm</code>). The actual host CPU is + irrelevant for domains with emulated virtual CPUs (such as domains with + type <code>qemu</code>). However, for backward compatibility + <code>host-model</code> may be implemented even for domains running on + emulated CPUs in which case the best CPU the hypervisor is able to + emulate may be used rather then trying to mimic the host CPU model. </dd> <dt><code>model</code></dt> -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:03PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - reworded and updated documentation
Version 2: - no change
docs/formatdomain.html.in | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-)
ACK Pavel

The element will be generalized in the following commits. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - s/featureNodes/nodes/ - drop s/supported/boolean/ change Version 2: - no change src/qemu/qemu_capabilities.c | 16 +- tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 30 +-- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 322 +++++++++++------------ 3 files changed, 184 insertions(+), 184 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 29ca3d4f9..c5643f7a0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3158,7 +3158,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, { char *str = NULL; xmlNodePtr hostCPUNode; - xmlNodePtr *featureNodes = NULL; + xmlNodePtr *nodes = NULL; xmlNodePtr oldnode = ctxt->node; qemuMonitorCPUModelInfoPtr hostCPU = NULL; int ret = -1; @@ -3182,25 +3182,25 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, ctxt->node = hostCPUNode; - if ((n = virXPathNodeSet("./feature", ctxt, &featureNodes)) > 0) { + if ((n = virXPathNodeSet("./property", ctxt, &nodes)) > 0) { if (VIR_ALLOC_N(hostCPU->props, n) < 0) goto cleanup; hostCPU->nprops = n; for (i = 0; i < n; i++) { - hostCPU->props[i].name = virXMLPropString(featureNodes[i], "name"); + hostCPU->props[i].name = virXMLPropString(nodes[i], "name"); if (!hostCPU->props[i].name) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing 'name' attribute for a host CPU" - " model feature in QEMU capabilities cache")); + " model property in QEMU capabilities cache")); goto cleanup; } - if (!(str = virXMLPropString(featureNodes[i], "supported"))) { + if (!(str = virXMLPropString(nodes[i], "supported"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing 'supported' attribute for a host CPU" - " model feature in QEMU capabilities cache")); + " model property in QEMU capabilities cache")); goto cleanup; } if (STREQ(str, "yes")) { @@ -3223,7 +3223,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, cleanup: ctxt->node = oldnode; VIR_FREE(str); - VIR_FREE(featureNodes); + VIR_FREE(nodes); qemuMonitorCPUModelInfoFree(hostCPU); return ret; } @@ -3554,7 +3554,7 @@ virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemuCaps, virBufferAdjustIndent(buf, 2); for (i = 0; i < model->nprops; i++) { - virBufferAsprintf(buf, "<feature name='%s' supported='%s'/>\n", + virBufferAsprintf(buf, "<property name='%s' supported='%s'/>\n", model->props[i].name, model->props[i].supported ? "yes" : "no"); } diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml index c4c9bf9d5..02e89c841 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -134,21 +134,21 @@ <package></package> <arch>s390x</arch> <hostCPU model='zEC12.2-base'> - <feature name='aefsi' supported='yes'/> - <feature name='msa5' supported='yes'/> - <feature name='msa4' supported='yes'/> - <feature name='msa3' supported='yes'/> - <feature name='msa2' supported='yes'/> - <feature name='msa1' supported='yes'/> - <feature name='sthyi' supported='yes'/> - <feature name='edat' supported='yes'/> - <feature name='ri' supported='yes'/> - <feature name='edat2' supported='yes'/> - <feature name='ipter' supported='yes'/> - <feature name='esop' supported='yes'/> - <feature name='cte' supported='yes'/> - <feature name='te' supported='yes'/> - <feature name='cmm' supported='yes'/> + <property name='aefsi' supported='yes'/> + <property name='msa5' supported='yes'/> + <property name='msa4' supported='yes'/> + <property name='msa3' supported='yes'/> + <property name='msa2' supported='yes'/> + <property name='msa1' supported='yes'/> + <property name='sthyi' supported='yes'/> + <property name='edat' supported='yes'/> + <property name='ri' supported='yes'/> + <property name='edat2' supported='yes'/> + <property name='ipter' supported='yes'/> + <property name='esop' supported='yes'/> + <property name='cte' supported='yes'/> + <property name='te' supported='yes'/> + <property name='cmm' supported='yes'/> </hostCPU> <cpu type='kvm' name='z10EC-base'/> <cpu type='kvm' name='z9EC-base'/> diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index 369e18ee1..0f19d5242 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -208,167 +208,167 @@ <package> (v2.8.0-1428-g1b1a68c602)</package> <arch>x86_64</arch> <hostCPU model='base'> - <feature name='cmov' supported='yes'/> - <feature name='ia64' supported='no'/> - <feature name='aes' supported='yes'/> - <feature name='mmx' supported='yes'/> - <feature name='rdpid' supported='no'/> - <feature name='arat' supported='yes'/> - <feature name='pause-filter' supported='no'/> - <feature name='xsavec' supported='yes'/> - <feature name='osxsave' supported='no'/> - <feature name='kvm-asyncpf' supported='yes'/> - <feature name='perfctr-core' supported='no'/> - <feature name='mpx' supported='yes'/> - <feature name='pbe' supported='no'/> - <feature name='avx512cd' supported='no'/> - <feature name='decodeassists' supported='no'/> - <feature name='sse4.1' supported='yes'/> - <feature name='avx512f' supported='no'/> - <feature name='msr' supported='yes'/> - <feature name='mce' supported='yes'/> - <feature name='mca' supported='yes'/> - <feature name='xcrypt' supported='no'/> - <feature name='xgetbv1' supported='yes'/> - <feature name='cid' supported='no'/> - <feature name='ds' supported='no'/> - <feature name='fxsr' supported='yes'/> - <feature name='xsaveopt' supported='yes'/> - <feature name='xtpr' supported='no'/> - <feature name='avx512vl' supported='no'/> - <feature name='avx512-vpopcntdq' supported='no'/> - <feature name='phe' supported='no'/> - <feature name='extapic' supported='no'/> - <feature name='3dnowprefetch' supported='yes'/> - <feature name='cr8legacy' supported='no'/> - <feature name='xcrypt-en' supported='no'/> - <feature name='pn' supported='no'/> - <feature name='dca' supported='no'/> - <feature name='pku' supported='no'/> - <feature name='smx' supported='no'/> - <feature name='cmp-legacy' supported='no'/> - <feature name='avx512-4fmaps' supported='no'/> - <feature name='vmcb-clean' supported='no'/> - <feature name='hle' supported='yes'/> - <feature name='3dnowext' supported='no'/> - <feature name='npt' supported='no'/> - <feature name='clwb' supported='no'/> - <feature name='lbrv' supported='no'/> - <feature name='adx' supported='yes'/> - <feature name='ss' supported='yes'/> - <feature name='pni' supported='yes'/> - <feature name='svm-lock' supported='no'/> - <feature name='smep' supported='yes'/> - <feature name='smap' supported='yes'/> - <feature name='pfthreshold' supported='no'/> - <feature name='x2apic' supported='yes'/> - <feature name='avx512vbmi' supported='no'/> - <feature name='flushbyasid' supported='no'/> - <feature name='f16c' supported='yes'/> - <feature name='ace2-en' supported='no'/> - <feature name='pae' supported='yes'/> - <feature name='pat' supported='yes'/> - <feature name='sse' supported='yes'/> - <feature name='phe-en' supported='no'/> - <feature name='kvm-nopiodelay' supported='yes'/> - <feature name='tm' supported='no'/> - <feature name='kvmclock-stable-bit' supported='yes'/> - <feature name='hypervisor' supported='yes'/> - <feature name='pcommit' supported='no'/> - <feature name='syscall' supported='yes'/> - <feature name='avx512dq' supported='no'/> - <feature name='svm' supported='no'/> - <feature name='invtsc' supported='no'/> - <feature name='sse2' supported='yes'/> - <feature name='est' supported='no'/> - <feature name='avx512ifma' supported='no'/> - <feature name='tm2' supported='no'/> - <feature name='kvm-pv-eoi' supported='yes'/> - <feature name='cx8' supported='yes'/> - <feature name='kvm-mmu' supported='no'/> - <feature name='sse4.2' supported='yes'/> - <feature name='pge' supported='yes'/> - <feature name='pdcm' supported='no'/> - <feature name='movbe' supported='yes'/> - <feature name='nrip-save' supported='no'/> - <feature name='ssse3' supported='yes'/> - <feature name='sse4a' supported='no'/> - <feature name='invpcid' supported='yes'/> - <feature name='pdpe1gb' supported='yes'/> - <feature name='tsc-deadline' supported='yes'/> - <feature name='fma' supported='yes'/> - <feature name='cx16' supported='yes'/> - <feature name='de' supported='yes'/> - <feature name='xsave' supported='yes'/> - <feature name='clflush' supported='yes'/> - <feature name='skinit' supported='no'/> - <feature name='tsc' supported='yes'/> - <feature name='tce' supported='no'/> - <feature name='fpu' supported='yes'/> - <feature name='ds-cpl' supported='no'/> - <feature name='ibs' supported='no'/> - <feature name='fma4' supported='no'/> - <feature name='la57' supported='no'/> - <feature name='osvw' supported='no'/> - <feature name='apic' supported='yes'/> - <feature name='pmm' supported='no'/> - <feature name='tsc-adjust' supported='yes'/> - <feature name='kvm-steal-time' supported='yes'/> - <feature name='kvmclock' supported='yes'/> - <feature name='lwp' supported='no'/> - <feature name='xop' supported='no'/> - <feature name='avx' supported='yes'/> - <feature name='ospke' supported='no'/> - <feature name='acpi' supported='no'/> - <feature name='avx512bw' supported='no'/> - <feature name='ace2' supported='no'/> - <feature name='fsgsbase' supported='yes'/> - <feature name='ht' supported='no'/> - <feature name='nx' supported='yes'/> - <feature name='pclmulqdq' supported='yes'/> - <feature name='mmxext' supported='no'/> - <feature name='popcnt' supported='yes'/> - <feature name='xsaves' supported='yes'/> - <feature name='lm' supported='yes'/> - <feature name='umip' supported='no'/> - <feature name='pse' supported='yes'/> - <feature name='avx2' supported='yes'/> - <feature name='sep' supported='yes'/> - <feature name='nodeid-msr' supported='no'/> - <feature name='misalignsse' supported='no'/> - <feature name='bmi1' supported='yes'/> - <feature name='bmi2' supported='yes'/> - <feature name='kvm-pv-unhalt' supported='yes'/> - <feature name='tsc-scale' supported='no'/> - <feature name='topoext' supported='no'/> - <feature name='clflushopt' supported='yes'/> - <feature name='monitor' supported='no'/> - <feature name='avx512er' supported='no'/> - <feature name='pmm-en' supported='no'/> - <feature name='pcid' supported='yes'/> - <feature name='3dnow' supported='no'/> - <feature name='erms' supported='yes'/> - <feature name='lahf-lm' supported='yes'/> - <feature name='fxsr-opt' supported='no'/> - <feature name='xstore' supported='no'/> - <feature name='rtm' supported='yes'/> - <feature name='lmce' supported='yes'/> - <feature name='perfctr-nb' supported='no'/> - <feature name='rdrand' supported='yes'/> - <feature name='rdseed' supported='yes'/> - <feature name='avx512-4vnniw' supported='no'/> - <feature name='vme' supported='yes'/> - <feature name='vmx' supported='yes'/> - <feature name='dtes64' supported='no'/> - <feature name='mtrr' supported='yes'/> - <feature name='rdtscp' supported='yes'/> - <feature name='pse36' supported='yes'/> - <feature name='tbm' supported='no'/> - <feature name='wdt' supported='no'/> - <feature name='sha-ni' supported='no'/> - <feature name='abm' supported='yes'/> - <feature name='avx512pf' supported='no'/> - <feature name='xstore-en' supported='no'/> + <property name='cmov' supported='yes'/> + <property name='ia64' supported='no'/> + <property name='aes' supported='yes'/> + <property name='mmx' supported='yes'/> + <property name='rdpid' supported='no'/> + <property name='arat' supported='yes'/> + <property name='pause-filter' supported='no'/> + <property name='xsavec' supported='yes'/> + <property name='osxsave' supported='no'/> + <property name='kvm-asyncpf' supported='yes'/> + <property name='perfctr-core' supported='no'/> + <property name='mpx' supported='yes'/> + <property name='pbe' supported='no'/> + <property name='avx512cd' supported='no'/> + <property name='decodeassists' supported='no'/> + <property name='sse4.1' supported='yes'/> + <property name='avx512f' supported='no'/> + <property name='msr' supported='yes'/> + <property name='mce' supported='yes'/> + <property name='mca' supported='yes'/> + <property name='xcrypt' supported='no'/> + <property name='xgetbv1' supported='yes'/> + <property name='cid' supported='no'/> + <property name='ds' supported='no'/> + <property name='fxsr' supported='yes'/> + <property name='xsaveopt' supported='yes'/> + <property name='xtpr' supported='no'/> + <property name='avx512vl' supported='no'/> + <property name='avx512-vpopcntdq' supported='no'/> + <property name='phe' supported='no'/> + <property name='extapic' supported='no'/> + <property name='3dnowprefetch' supported='yes'/> + <property name='cr8legacy' supported='no'/> + <property name='xcrypt-en' supported='no'/> + <property name='pn' supported='no'/> + <property name='dca' supported='no'/> + <property name='pku' supported='no'/> + <property name='smx' supported='no'/> + <property name='cmp-legacy' supported='no'/> + <property name='avx512-4fmaps' supported='no'/> + <property name='vmcb-clean' supported='no'/> + <property name='hle' supported='yes'/> + <property name='3dnowext' supported='no'/> + <property name='npt' supported='no'/> + <property name='clwb' supported='no'/> + <property name='lbrv' supported='no'/> + <property name='adx' supported='yes'/> + <property name='ss' supported='yes'/> + <property name='pni' supported='yes'/> + <property name='svm-lock' supported='no'/> + <property name='smep' supported='yes'/> + <property name='smap' supported='yes'/> + <property name='pfthreshold' supported='no'/> + <property name='x2apic' supported='yes'/> + <property name='avx512vbmi' supported='no'/> + <property name='flushbyasid' supported='no'/> + <property name='f16c' supported='yes'/> + <property name='ace2-en' supported='no'/> + <property name='pae' supported='yes'/> + <property name='pat' supported='yes'/> + <property name='sse' supported='yes'/> + <property name='phe-en' supported='no'/> + <property name='kvm-nopiodelay' supported='yes'/> + <property name='tm' supported='no'/> + <property name='kvmclock-stable-bit' supported='yes'/> + <property name='hypervisor' supported='yes'/> + <property name='pcommit' supported='no'/> + <property name='syscall' supported='yes'/> + <property name='avx512dq' supported='no'/> + <property name='svm' supported='no'/> + <property name='invtsc' supported='no'/> + <property name='sse2' supported='yes'/> + <property name='est' supported='no'/> + <property name='avx512ifma' supported='no'/> + <property name='tm2' supported='no'/> + <property name='kvm-pv-eoi' supported='yes'/> + <property name='cx8' supported='yes'/> + <property name='kvm-mmu' supported='no'/> + <property name='sse4.2' supported='yes'/> + <property name='pge' supported='yes'/> + <property name='pdcm' supported='no'/> + <property name='movbe' supported='yes'/> + <property name='nrip-save' supported='no'/> + <property name='ssse3' supported='yes'/> + <property name='sse4a' supported='no'/> + <property name='invpcid' supported='yes'/> + <property name='pdpe1gb' supported='yes'/> + <property name='tsc-deadline' supported='yes'/> + <property name='fma' supported='yes'/> + <property name='cx16' supported='yes'/> + <property name='de' supported='yes'/> + <property name='xsave' supported='yes'/> + <property name='clflush' supported='yes'/> + <property name='skinit' supported='no'/> + <property name='tsc' supported='yes'/> + <property name='tce' supported='no'/> + <property name='fpu' supported='yes'/> + <property name='ds-cpl' supported='no'/> + <property name='ibs' supported='no'/> + <property name='fma4' supported='no'/> + <property name='la57' supported='no'/> + <property name='osvw' supported='no'/> + <property name='apic' supported='yes'/> + <property name='pmm' supported='no'/> + <property name='tsc-adjust' supported='yes'/> + <property name='kvm-steal-time' supported='yes'/> + <property name='kvmclock' supported='yes'/> + <property name='lwp' supported='no'/> + <property name='xop' supported='no'/> + <property name='avx' supported='yes'/> + <property name='ospke' supported='no'/> + <property name='acpi' supported='no'/> + <property name='avx512bw' supported='no'/> + <property name='ace2' supported='no'/> + <property name='fsgsbase' supported='yes'/> + <property name='ht' supported='no'/> + <property name='nx' supported='yes'/> + <property name='pclmulqdq' supported='yes'/> + <property name='mmxext' supported='no'/> + <property name='popcnt' supported='yes'/> + <property name='xsaves' supported='yes'/> + <property name='lm' supported='yes'/> + <property name='umip' supported='no'/> + <property name='pse' supported='yes'/> + <property name='avx2' supported='yes'/> + <property name='sep' supported='yes'/> + <property name='nodeid-msr' supported='no'/> + <property name='misalignsse' supported='no'/> + <property name='bmi1' supported='yes'/> + <property name='bmi2' supported='yes'/> + <property name='kvm-pv-unhalt' supported='yes'/> + <property name='tsc-scale' supported='no'/> + <property name='topoext' supported='no'/> + <property name='clflushopt' supported='yes'/> + <property name='monitor' supported='no'/> + <property name='avx512er' supported='no'/> + <property name='pmm-en' supported='no'/> + <property name='pcid' supported='yes'/> + <property name='3dnow' supported='no'/> + <property name='erms' supported='yes'/> + <property name='lahf-lm' supported='yes'/> + <property name='fxsr-opt' supported='no'/> + <property name='xstore' supported='no'/> + <property name='rtm' supported='yes'/> + <property name='lmce' supported='yes'/> + <property name='perfctr-nb' supported='no'/> + <property name='rdrand' supported='yes'/> + <property name='rdseed' supported='yes'/> + <property name='avx512-4vnniw' supported='no'/> + <property name='vme' supported='yes'/> + <property name='vmx' supported='yes'/> + <property name='dtes64' supported='no'/> + <property name='mtrr' supported='yes'/> + <property name='rdtscp' supported='yes'/> + <property name='pse36' supported='yes'/> + <property name='tbm' supported='no'/> + <property name='wdt' supported='no'/> + <property name='sha-ni' supported='no'/> + <property name='abm' supported='yes'/> + <property name='avx512pf' supported='no'/> + <property name='xstore-en' supported='no'/> </hostCPU> <cpu type='kvm' name='max' usable='yes'/> <cpu type='kvm' name='host' usable='yes'/> -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:04PM +0100, Jiri Denemark wrote:
The element will be generalized in the following commits.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - s/featureNodes/nodes/ - drop s/supported/boolean/ change
Version 2: - no change
src/qemu/qemu_capabilities.c | 16 +- tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 30 +-- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 322 +++++++++++------------ 3 files changed, 184 insertions(+), 184 deletions(-)
ACK Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 14 +- tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 30 +-- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 322 +++++++++++------------ 3 files changed, 183 insertions(+), 183 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c5643f7a0..e037d5f95 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3197,19 +3197,19 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, goto cleanup; } - if (!(str = virXMLPropString(nodes[i], "supported"))) { + if (!(str = virXMLPropString(nodes[i], "value"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("missing 'supported' attribute for a host CPU" + _("missing 'value' attribute for a host CPU" " model property in QEMU capabilities cache")); goto cleanup; } - if (STREQ(str, "yes")) { + if (STREQ(str, "true")) { hostCPU->props[i].supported = true; - } else if (STREQ(str, "no")) { + } else if (STREQ(str, "false")) { hostCPU->props[i].supported = false; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid supported value: '%s'"), str); + _("invalid boolean value: '%s'"), str); goto cleanup; } VIR_FREE(str); @@ -3554,9 +3554,9 @@ virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemuCaps, virBufferAdjustIndent(buf, 2); for (i = 0; i < model->nprops; i++) { - virBufferAsprintf(buf, "<property name='%s' supported='%s'/>\n", + virBufferAsprintf(buf, "<property name='%s' type='boolean' value='%s'/>\n", model->props[i].name, - model->props[i].supported ? "yes" : "no"); + model->props[i].supported ? "true" : "false"); } virBufferAdjustIndent(buf, -2); diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml index 02e89c841..84c570020 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -134,21 +134,21 @@ <package></package> <arch>s390x</arch> <hostCPU model='zEC12.2-base'> - <property name='aefsi' supported='yes'/> - <property name='msa5' supported='yes'/> - <property name='msa4' supported='yes'/> - <property name='msa3' supported='yes'/> - <property name='msa2' supported='yes'/> - <property name='msa1' supported='yes'/> - <property name='sthyi' supported='yes'/> - <property name='edat' supported='yes'/> - <property name='ri' supported='yes'/> - <property name='edat2' supported='yes'/> - <property name='ipter' supported='yes'/> - <property name='esop' supported='yes'/> - <property name='cte' supported='yes'/> - <property name='te' supported='yes'/> - <property name='cmm' supported='yes'/> + <property name='aefsi' type='boolean' value='true'/> + <property name='msa5' type='boolean' value='true'/> + <property name='msa4' type='boolean' value='true'/> + <property name='msa3' type='boolean' value='true'/> + <property name='msa2' type='boolean' value='true'/> + <property name='msa1' type='boolean' value='true'/> + <property name='sthyi' type='boolean' value='true'/> + <property name='edat' type='boolean' value='true'/> + <property name='ri' type='boolean' value='true'/> + <property name='edat2' type='boolean' value='true'/> + <property name='ipter' type='boolean' value='true'/> + <property name='esop' type='boolean' value='true'/> + <property name='cte' type='boolean' value='true'/> + <property name='te' type='boolean' value='true'/> + <property name='cmm' type='boolean' value='true'/> </hostCPU> <cpu type='kvm' name='z10EC-base'/> <cpu type='kvm' name='z9EC-base'/> diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index 0f19d5242..73d1e59c8 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -208,167 +208,167 @@ <package> (v2.8.0-1428-g1b1a68c602)</package> <arch>x86_64</arch> <hostCPU model='base'> - <property name='cmov' supported='yes'/> - <property name='ia64' supported='no'/> - <property name='aes' supported='yes'/> - <property name='mmx' supported='yes'/> - <property name='rdpid' supported='no'/> - <property name='arat' supported='yes'/> - <property name='pause-filter' supported='no'/> - <property name='xsavec' supported='yes'/> - <property name='osxsave' supported='no'/> - <property name='kvm-asyncpf' supported='yes'/> - <property name='perfctr-core' supported='no'/> - <property name='mpx' supported='yes'/> - <property name='pbe' supported='no'/> - <property name='avx512cd' supported='no'/> - <property name='decodeassists' supported='no'/> - <property name='sse4.1' supported='yes'/> - <property name='avx512f' supported='no'/> - <property name='msr' supported='yes'/> - <property name='mce' supported='yes'/> - <property name='mca' supported='yes'/> - <property name='xcrypt' supported='no'/> - <property name='xgetbv1' supported='yes'/> - <property name='cid' supported='no'/> - <property name='ds' supported='no'/> - <property name='fxsr' supported='yes'/> - <property name='xsaveopt' supported='yes'/> - <property name='xtpr' supported='no'/> - <property name='avx512vl' supported='no'/> - <property name='avx512-vpopcntdq' supported='no'/> - <property name='phe' supported='no'/> - <property name='extapic' supported='no'/> - <property name='3dnowprefetch' supported='yes'/> - <property name='cr8legacy' supported='no'/> - <property name='xcrypt-en' supported='no'/> - <property name='pn' supported='no'/> - <property name='dca' supported='no'/> - <property name='pku' supported='no'/> - <property name='smx' supported='no'/> - <property name='cmp-legacy' supported='no'/> - <property name='avx512-4fmaps' supported='no'/> - <property name='vmcb-clean' supported='no'/> - <property name='hle' supported='yes'/> - <property name='3dnowext' supported='no'/> - <property name='npt' supported='no'/> - <property name='clwb' supported='no'/> - <property name='lbrv' supported='no'/> - <property name='adx' supported='yes'/> - <property name='ss' supported='yes'/> - <property name='pni' supported='yes'/> - <property name='svm-lock' supported='no'/> - <property name='smep' supported='yes'/> - <property name='smap' supported='yes'/> - <property name='pfthreshold' supported='no'/> - <property name='x2apic' supported='yes'/> - <property name='avx512vbmi' supported='no'/> - <property name='flushbyasid' supported='no'/> - <property name='f16c' supported='yes'/> - <property name='ace2-en' supported='no'/> - <property name='pae' supported='yes'/> - <property name='pat' supported='yes'/> - <property name='sse' supported='yes'/> - <property name='phe-en' supported='no'/> - <property name='kvm-nopiodelay' supported='yes'/> - <property name='tm' supported='no'/> - <property name='kvmclock-stable-bit' supported='yes'/> - <property name='hypervisor' supported='yes'/> - <property name='pcommit' supported='no'/> - <property name='syscall' supported='yes'/> - <property name='avx512dq' supported='no'/> - <property name='svm' supported='no'/> - <property name='invtsc' supported='no'/> - <property name='sse2' supported='yes'/> - <property name='est' supported='no'/> - <property name='avx512ifma' supported='no'/> - <property name='tm2' supported='no'/> - <property name='kvm-pv-eoi' supported='yes'/> - <property name='cx8' supported='yes'/> - <property name='kvm-mmu' supported='no'/> - <property name='sse4.2' supported='yes'/> - <property name='pge' supported='yes'/> - <property name='pdcm' supported='no'/> - <property name='movbe' supported='yes'/> - <property name='nrip-save' supported='no'/> - <property name='ssse3' supported='yes'/> - <property name='sse4a' supported='no'/> - <property name='invpcid' supported='yes'/> - <property name='pdpe1gb' supported='yes'/> - <property name='tsc-deadline' supported='yes'/> - <property name='fma' supported='yes'/> - <property name='cx16' supported='yes'/> - <property name='de' supported='yes'/> - <property name='xsave' supported='yes'/> - <property name='clflush' supported='yes'/> - <property name='skinit' supported='no'/> - <property name='tsc' supported='yes'/> - <property name='tce' supported='no'/> - <property name='fpu' supported='yes'/> - <property name='ds-cpl' supported='no'/> - <property name='ibs' supported='no'/> - <property name='fma4' supported='no'/> - <property name='la57' supported='no'/> - <property name='osvw' supported='no'/> - <property name='apic' supported='yes'/> - <property name='pmm' supported='no'/> - <property name='tsc-adjust' supported='yes'/> - <property name='kvm-steal-time' supported='yes'/> - <property name='kvmclock' supported='yes'/> - <property name='lwp' supported='no'/> - <property name='xop' supported='no'/> - <property name='avx' supported='yes'/> - <property name='ospke' supported='no'/> - <property name='acpi' supported='no'/> - <property name='avx512bw' supported='no'/> - <property name='ace2' supported='no'/> - <property name='fsgsbase' supported='yes'/> - <property name='ht' supported='no'/> - <property name='nx' supported='yes'/> - <property name='pclmulqdq' supported='yes'/> - <property name='mmxext' supported='no'/> - <property name='popcnt' supported='yes'/> - <property name='xsaves' supported='yes'/> - <property name='lm' supported='yes'/> - <property name='umip' supported='no'/> - <property name='pse' supported='yes'/> - <property name='avx2' supported='yes'/> - <property name='sep' supported='yes'/> - <property name='nodeid-msr' supported='no'/> - <property name='misalignsse' supported='no'/> - <property name='bmi1' supported='yes'/> - <property name='bmi2' supported='yes'/> - <property name='kvm-pv-unhalt' supported='yes'/> - <property name='tsc-scale' supported='no'/> - <property name='topoext' supported='no'/> - <property name='clflushopt' supported='yes'/> - <property name='monitor' supported='no'/> - <property name='avx512er' supported='no'/> - <property name='pmm-en' supported='no'/> - <property name='pcid' supported='yes'/> - <property name='3dnow' supported='no'/> - <property name='erms' supported='yes'/> - <property name='lahf-lm' supported='yes'/> - <property name='fxsr-opt' supported='no'/> - <property name='xstore' supported='no'/> - <property name='rtm' supported='yes'/> - <property name='lmce' supported='yes'/> - <property name='perfctr-nb' supported='no'/> - <property name='rdrand' supported='yes'/> - <property name='rdseed' supported='yes'/> - <property name='avx512-4vnniw' supported='no'/> - <property name='vme' supported='yes'/> - <property name='vmx' supported='yes'/> - <property name='dtes64' supported='no'/> - <property name='mtrr' supported='yes'/> - <property name='rdtscp' supported='yes'/> - <property name='pse36' supported='yes'/> - <property name='tbm' supported='no'/> - <property name='wdt' supported='no'/> - <property name='sha-ni' supported='no'/> - <property name='abm' supported='yes'/> - <property name='avx512pf' supported='no'/> - <property name='xstore-en' supported='no'/> + <property name='cmov' type='boolean' value='true'/> + <property name='ia64' type='boolean' value='false'/> + <property name='aes' type='boolean' value='true'/> + <property name='mmx' type='boolean' value='true'/> + <property name='rdpid' type='boolean' value='false'/> + <property name='arat' type='boolean' value='true'/> + <property name='pause-filter' type='boolean' value='false'/> + <property name='xsavec' type='boolean' value='true'/> + <property name='osxsave' type='boolean' value='false'/> + <property name='kvm-asyncpf' type='boolean' value='true'/> + <property name='perfctr-core' type='boolean' value='false'/> + <property name='mpx' type='boolean' value='true'/> + <property name='pbe' type='boolean' value='false'/> + <property name='avx512cd' type='boolean' value='false'/> + <property name='decodeassists' type='boolean' value='false'/> + <property name='sse4.1' type='boolean' value='true'/> + <property name='avx512f' type='boolean' value='false'/> + <property name='msr' type='boolean' value='true'/> + <property name='mce' type='boolean' value='true'/> + <property name='mca' type='boolean' value='true'/> + <property name='xcrypt' type='boolean' value='false'/> + <property name='xgetbv1' type='boolean' value='true'/> + <property name='cid' type='boolean' value='false'/> + <property name='ds' type='boolean' value='false'/> + <property name='fxsr' type='boolean' value='true'/> + <property name='xsaveopt' type='boolean' value='true'/> + <property name='xtpr' type='boolean' value='false'/> + <property name='avx512vl' type='boolean' value='false'/> + <property name='avx512-vpopcntdq' type='boolean' value='false'/> + <property name='phe' type='boolean' value='false'/> + <property name='extapic' type='boolean' value='false'/> + <property name='3dnowprefetch' type='boolean' value='true'/> + <property name='cr8legacy' type='boolean' value='false'/> + <property name='xcrypt-en' type='boolean' value='false'/> + <property name='pn' type='boolean' value='false'/> + <property name='dca' type='boolean' value='false'/> + <property name='pku' type='boolean' value='false'/> + <property name='smx' type='boolean' value='false'/> + <property name='cmp-legacy' type='boolean' value='false'/> + <property name='avx512-4fmaps' type='boolean' value='false'/> + <property name='vmcb-clean' type='boolean' value='false'/> + <property name='hle' type='boolean' value='true'/> + <property name='3dnowext' type='boolean' value='false'/> + <property name='npt' type='boolean' value='false'/> + <property name='clwb' type='boolean' value='false'/> + <property name='lbrv' type='boolean' value='false'/> + <property name='adx' type='boolean' value='true'/> + <property name='ss' type='boolean' value='true'/> + <property name='pni' type='boolean' value='true'/> + <property name='svm-lock' type='boolean' value='false'/> + <property name='smep' type='boolean' value='true'/> + <property name='smap' type='boolean' value='true'/> + <property name='pfthreshold' type='boolean' value='false'/> + <property name='x2apic' type='boolean' value='true'/> + <property name='avx512vbmi' type='boolean' value='false'/> + <property name='flushbyasid' type='boolean' value='false'/> + <property name='f16c' type='boolean' value='true'/> + <property name='ace2-en' type='boolean' value='false'/> + <property name='pae' type='boolean' value='true'/> + <property name='pat' type='boolean' value='true'/> + <property name='sse' type='boolean' value='true'/> + <property name='phe-en' type='boolean' value='false'/> + <property name='kvm-nopiodelay' type='boolean' value='true'/> + <property name='tm' type='boolean' value='false'/> + <property name='kvmclock-stable-bit' type='boolean' value='true'/> + <property name='hypervisor' type='boolean' value='true'/> + <property name='pcommit' type='boolean' value='false'/> + <property name='syscall' type='boolean' value='true'/> + <property name='avx512dq' type='boolean' value='false'/> + <property name='svm' type='boolean' value='false'/> + <property name='invtsc' type='boolean' value='false'/> + <property name='sse2' type='boolean' value='true'/> + <property name='est' type='boolean' value='false'/> + <property name='avx512ifma' type='boolean' value='false'/> + <property name='tm2' type='boolean' value='false'/> + <property name='kvm-pv-eoi' type='boolean' value='true'/> + <property name='cx8' type='boolean' value='true'/> + <property name='kvm-mmu' type='boolean' value='false'/> + <property name='sse4.2' type='boolean' value='true'/> + <property name='pge' type='boolean' value='true'/> + <property name='pdcm' type='boolean' value='false'/> + <property name='movbe' type='boolean' value='true'/> + <property name='nrip-save' type='boolean' value='false'/> + <property name='ssse3' type='boolean' value='true'/> + <property name='sse4a' type='boolean' value='false'/> + <property name='invpcid' type='boolean' value='true'/> + <property name='pdpe1gb' type='boolean' value='true'/> + <property name='tsc-deadline' type='boolean' value='true'/> + <property name='fma' type='boolean' value='true'/> + <property name='cx16' type='boolean' value='true'/> + <property name='de' type='boolean' value='true'/> + <property name='xsave' type='boolean' value='true'/> + <property name='clflush' type='boolean' value='true'/> + <property name='skinit' type='boolean' value='false'/> + <property name='tsc' type='boolean' value='true'/> + <property name='tce' type='boolean' value='false'/> + <property name='fpu' type='boolean' value='true'/> + <property name='ds-cpl' type='boolean' value='false'/> + <property name='ibs' type='boolean' value='false'/> + <property name='fma4' type='boolean' value='false'/> + <property name='la57' type='boolean' value='false'/> + <property name='osvw' type='boolean' value='false'/> + <property name='apic' type='boolean' value='true'/> + <property name='pmm' type='boolean' value='false'/> + <property name='tsc-adjust' type='boolean' value='true'/> + <property name='kvm-steal-time' type='boolean' value='true'/> + <property name='kvmclock' type='boolean' value='true'/> + <property name='lwp' type='boolean' value='false'/> + <property name='xop' type='boolean' value='false'/> + <property name='avx' type='boolean' value='true'/> + <property name='ospke' type='boolean' value='false'/> + <property name='acpi' type='boolean' value='false'/> + <property name='avx512bw' type='boolean' value='false'/> + <property name='ace2' type='boolean' value='false'/> + <property name='fsgsbase' type='boolean' value='true'/> + <property name='ht' type='boolean' value='false'/> + <property name='nx' type='boolean' value='true'/> + <property name='pclmulqdq' type='boolean' value='true'/> + <property name='mmxext' type='boolean' value='false'/> + <property name='popcnt' type='boolean' value='true'/> + <property name='xsaves' type='boolean' value='true'/> + <property name='lm' type='boolean' value='true'/> + <property name='umip' type='boolean' value='false'/> + <property name='pse' type='boolean' value='true'/> + <property name='avx2' type='boolean' value='true'/> + <property name='sep' type='boolean' value='true'/> + <property name='nodeid-msr' type='boolean' value='false'/> + <property name='misalignsse' type='boolean' value='false'/> + <property name='bmi1' type='boolean' value='true'/> + <property name='bmi2' type='boolean' value='true'/> + <property name='kvm-pv-unhalt' type='boolean' value='true'/> + <property name='tsc-scale' type='boolean' value='false'/> + <property name='topoext' type='boolean' value='false'/> + <property name='clflushopt' type='boolean' value='true'/> + <property name='monitor' type='boolean' value='false'/> + <property name='avx512er' type='boolean' value='false'/> + <property name='pmm-en' type='boolean' value='false'/> + <property name='pcid' type='boolean' value='true'/> + <property name='3dnow' type='boolean' value='false'/> + <property name='erms' type='boolean' value='true'/> + <property name='lahf-lm' type='boolean' value='true'/> + <property name='fxsr-opt' type='boolean' value='false'/> + <property name='xstore' type='boolean' value='false'/> + <property name='rtm' type='boolean' value='true'/> + <property name='lmce' type='boolean' value='true'/> + <property name='perfctr-nb' type='boolean' value='false'/> + <property name='rdrand' type='boolean' value='true'/> + <property name='rdseed' type='boolean' value='true'/> + <property name='avx512-4vnniw' type='boolean' value='false'/> + <property name='vme' type='boolean' value='true'/> + <property name='vmx' type='boolean' value='true'/> + <property name='dtes64' type='boolean' value='false'/> + <property name='mtrr' type='boolean' value='true'/> + <property name='rdtscp' type='boolean' value='true'/> + <property name='pse36' type='boolean' value='true'/> + <property name='tbm' type='boolean' value='false'/> + <property name='wdt' type='boolean' value='false'/> + <property name='sha-ni' type='boolean' value='false'/> + <property name='abm' type='boolean' value='true'/> + <property name='avx512pf' type='boolean' value='false'/> + <property name='xstore-en' type='boolean' value='false'/> </hostCPU> <cpu type='kvm' name='max' usable='yes'/> <cpu type='kvm' name='host' usable='yes'/> -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:05PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - new patch
src/qemu/qemu_capabilities.c | 14 +- tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 30 +-- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 322 +++++++++++------------ 3 files changed, 183 insertions(+), 183 deletions(-)
ACK Pavel

While query-cpu-model-expansion returns only boolean features on s390, but x86_64 reports some integer and string properties which we are interested in. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - change the XML element to <property name='...' type='boolean|string|number' value='...'/> Version 2: - no change src/qemu/qemu_capabilities.c | 100 +++++++++++++++++------ src/qemu/qemu_monitor.c | 25 +++++- src/qemu/qemu_monitor.h | 27 +++++- src/qemu/qemu_monitor_json.c | 42 ++++++++-- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 7 ++ 5 files changed, 163 insertions(+), 38 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e037d5f95..0b611c323 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3076,14 +3076,16 @@ virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps, cpu->nfeatures = 0; for (i = 0; i < modelInfo->nprops; i++) { - if (VIR_STRDUP(cpu->features[i].name, modelInfo->props[i].name) < 0) + virCPUFeatureDefPtr feature = cpu->features + cpu->nfeatures; + qemuMonitorCPUPropertyPtr prop = modelInfo->props + i; + + if (prop->type != QEMU_MONITOR_CPU_PROPERTY_BOOLEAN) + continue; + + if (VIR_STRDUP(feature->name, prop->name) < 0) return -1; - - if (modelInfo->props[i].supported) - cpu->features[i].policy = VIR_CPU_FEATURE_REQUIRE; - else - cpu->features[i].policy = VIR_CPU_FEATURE_DISABLE; - + feature->policy = prop->value.boolean ? VIR_CPU_FEATURE_REQUIRE + : VIR_CPU_FEATURE_DISABLE; cpu->nfeatures++; } @@ -3189,30 +3191,59 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, hostCPU->nprops = n; for (i = 0; i < n; i++) { - hostCPU->props[i].name = virXMLPropString(nodes[i], "name"); - if (!hostCPU->props[i].name) { + qemuMonitorCPUPropertyPtr prop = hostCPU->props + i; + int type; + + ctxt->node = nodes[i]; + + if (!(prop->name = virXMLPropString(ctxt->node, "name"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing 'name' attribute for a host CPU" " model property in QEMU capabilities cache")); goto cleanup; } - if (!(str = virXMLPropString(nodes[i], "value"))) { + if (!(str = virXMLPropString(ctxt->node, "type")) || + (type = qemuMonitorCPUPropertyTypeFromString(str)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("missing 'value' attribute for a host CPU" - " model property in QEMU capabilities cache")); - goto cleanup; - } - if (STREQ(str, "true")) { - hostCPU->props[i].supported = true; - } else if (STREQ(str, "false")) { - hostCPU->props[i].supported = false; - } else { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid boolean value: '%s'"), str); + _("missing CPU model property type in QEMU " + "capabilities cache")); goto cleanup; } VIR_FREE(str); + + prop->type = type; + switch (prop->type) { + case QEMU_MONITOR_CPU_PROPERTY_BOOLEAN: + if (virXPathBoolean("./@value='true'", ctxt)) + prop->value.boolean = true; + break; + + case QEMU_MONITOR_CPU_PROPERTY_STRING: + prop->value.string = virXMLPropString(ctxt->node, "value"); + if (!prop->value.string) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("invalid string value for '%s' host CPU " + "model property in QEMU capabilities cache"), + prop->name); + goto cleanup; + } + break; + + case QEMU_MONITOR_CPU_PROPERTY_NUMBER: + if (virXPathULongLong("string(./@value)", ctxt, + &prop->value.number) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("invalid number value for '%s' host CPU " + "model property in QEMU capabilities cache"), + prop->name); + goto cleanup; + } + break; + + case QEMU_MONITOR_CPU_PROPERTY_LAST: + break; + } } } @@ -3554,9 +3585,30 @@ virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemuCaps, virBufferAdjustIndent(buf, 2); for (i = 0; i < model->nprops; i++) { - virBufferAsprintf(buf, "<property name='%s' type='boolean' value='%s'/>\n", - model->props[i].name, - model->props[i].supported ? "true" : "false"); + qemuMonitorCPUPropertyPtr prop = model->props + i; + + virBufferAsprintf(buf, "<property name='%s' type='%s' ", + prop->name, + qemuMonitorCPUPropertyTypeToString(prop->type)); + + switch (prop->type) { + case QEMU_MONITOR_CPU_PROPERTY_BOOLEAN: + virBufferAsprintf(buf, "value='%s'", + prop->value.boolean ? "true" : "false"); + break; + + case QEMU_MONITOR_CPU_PROPERTY_STRING: + virBufferEscapeString(buf, "value='%s'", prop->value.string); + break; + + case QEMU_MONITOR_CPU_PROPERTY_NUMBER: + virBufferAsprintf(buf, "value='%llu'", prop->value.number); + break; + + case QEMU_MONITOR_CPU_PROPERTY_LAST: + break; + } + virBufferAddLit(buf, "/>\n"); } virBufferAdjustIndent(buf, -2); diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index b15207a69..4c3f7a20f 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3661,8 +3661,11 @@ qemuMonitorCPUModelInfoFree(qemuMonitorCPUModelInfoPtr model_info) if (!model_info) return; - for (i = 0; i < model_info->nprops; i++) + for (i = 0; i < model_info->nprops; i++) { VIR_FREE(model_info->props[i].name); + if (model_info->props[i].type == QEMU_MONITOR_CPU_PROPERTY_STRING) + VIR_FREE(model_info->props[i].value.string); + } VIR_FREE(model_info->props); VIR_FREE(model_info->name); @@ -3691,7 +3694,25 @@ qemuMonitorCPUModelInfoCopy(const qemuMonitorCPUModelInfo *orig) if (VIR_STRDUP(copy->props[i].name, orig->props[i].name) < 0) goto error; - copy->props[i].supported = orig->props[i].supported; + copy->props[i].type = orig->props[i].type; + switch (orig->props[i].type) { + case QEMU_MONITOR_CPU_PROPERTY_BOOLEAN: + copy->props[i].value.boolean = orig->props[i].value.boolean; + break; + + case QEMU_MONITOR_CPU_PROPERTY_STRING: + if (VIR_STRDUP(copy->props[i].value.string, + orig->props[i].value.string) < 0) + goto error; + break; + + case QEMU_MONITOR_CPU_PROPERTY_NUMBER: + copy->props[i].value.number = orig->props[i].value.number; + break; + + case QEMU_MONITOR_CPU_PROPERTY_LAST: + break; + } } return copy; diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 8811d8501..ff8731bdd 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -921,16 +921,35 @@ int qemuMonitorGetCPUDefinitions(qemuMonitorPtr mon, qemuMonitorCPUDefInfoPtr **cpus); void qemuMonitorCPUDefInfoFree(qemuMonitorCPUDefInfoPtr cpu); +typedef enum { + QEMU_MONITOR_CPU_PROPERTY_BOOLEAN, + QEMU_MONITOR_CPU_PROPERTY_STRING, + QEMU_MONITOR_CPU_PROPERTY_NUMBER, + + QEMU_MONITOR_CPU_PROPERTY_LAST +} qemuMonitorCPUPropertyType; + +VIR_ENUM_DECL(qemuMonitorCPUProperty) + +typedef struct _qemuMonitorCPUProperty qemuMonitorCPUProperty; +typedef qemuMonitorCPUProperty *qemuMonitorCPUPropertyPtr; +struct _qemuMonitorCPUProperty { + char *name; + qemuMonitorCPUPropertyType type; + union { + bool boolean; + char *string; + unsigned long long number; + } value; +}; + typedef struct _qemuMonitorCPUModelInfo qemuMonitorCPUModelInfo; typedef qemuMonitorCPUModelInfo *qemuMonitorCPUModelInfoPtr; struct _qemuMonitorCPUModelInfo { char *name; size_t nprops; - struct { - char *name; - bool supported; - } *props; + qemuMonitorCPUPropertyPtr props; }; int qemuMonitorGetCPUModelExpansion(qemuMonitorPtr mon, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 7aa9e314c..b6a4824d6 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4977,24 +4977,50 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon, return ret; } + +VIR_ENUM_IMPL(qemuMonitorCPUProperty, + QEMU_MONITOR_CPU_PROPERTY_LAST, + "boolean", "string", "number") + static int qemuMonitorJSONParseCPUModelProperty(const char *key, virJSONValue *value, void *opaque) { qemuMonitorCPUModelInfoPtr machine_model = opaque; - size_t n = machine_model->nprops; - bool supported; + qemuMonitorCPUPropertyPtr prop; - if (virJSONValueGetBoolean(value, &supported) < 0) + prop = machine_model->props + machine_model->nprops; + + switch ((virJSONType) value->type) { + case VIR_JSON_TYPE_STRING: + if (VIR_STRDUP(prop->value.string, virJSONValueGetString(value)) < 0) + return -1; + prop->type = QEMU_MONITOR_CPU_PROPERTY_STRING; + break; + + case VIR_JSON_TYPE_NUMBER: + /* Ignore numbers which cannot be parsed as unsigned long long */ + if (virJSONValueGetNumberUlong(value, &prop->value.number) < 0) + return 0; + prop->type = QEMU_MONITOR_CPU_PROPERTY_NUMBER; + break; + + case VIR_JSON_TYPE_BOOLEAN: + virJSONValueGetBoolean(value, &prop->value.boolean); + prop->type = QEMU_MONITOR_CPU_PROPERTY_BOOLEAN; + break; + + case VIR_JSON_TYPE_OBJECT: + case VIR_JSON_TYPE_ARRAY: + case VIR_JSON_TYPE_NULL: return 0; - - if (VIR_STRDUP(machine_model->props[n].name, key) < 0) - return -1; - - machine_model->props[n].supported = supported; + } machine_model->nprops++; + if (VIR_STRDUP(prop->name, key) < 0) + return -1; + return 0; } diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index 73d1e59c8..805fee78b 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -224,11 +224,13 @@ <property name='avx512cd' type='boolean' value='false'/> <property name='decodeassists' type='boolean' value='false'/> <property name='sse4.1' type='boolean' value='true'/> + <property name='family' type='number' value='6'/> <property name='avx512f' type='boolean' value='false'/> <property name='msr' type='boolean' value='true'/> <property name='mce' type='boolean' value='true'/> <property name='mca' type='boolean' value='true'/> <property name='xcrypt' type='boolean' value='false'/> + <property name='min-level' type='number' value='13'/> <property name='xgetbv1' type='boolean' value='true'/> <property name='cid' type='boolean' value='false'/> <property name='ds' type='boolean' value='false'/> @@ -244,6 +246,7 @@ <property name='xcrypt-en' type='boolean' value='false'/> <property name='pn' type='boolean' value='false'/> <property name='dca' type='boolean' value='false'/> + <property name='vendor' type='string' value='GenuineIntel'/> <property name='pku' type='boolean' value='false'/> <property name='smx' type='boolean' value='false'/> <property name='cmp-legacy' type='boolean' value='false'/> @@ -289,6 +292,7 @@ <property name='sse4.2' type='boolean' value='true'/> <property name='pge' type='boolean' value='true'/> <property name='pdcm' type='boolean' value='false'/> + <property name='model' type='number' value='94'/> <property name='movbe' type='boolean' value='true'/> <property name='nrip-save' type='boolean' value='false'/> <property name='ssse3' type='boolean' value='true'/> @@ -299,6 +303,7 @@ <property name='fma' type='boolean' value='true'/> <property name='cx16' type='boolean' value='true'/> <property name='de' type='boolean' value='true'/> + <property name='stepping' type='number' value='3'/> <property name='xsave' type='boolean' value='true'/> <property name='clflush' type='boolean' value='true'/> <property name='skinit' type='boolean' value='false'/> @@ -336,6 +341,7 @@ <property name='sep' type='boolean' value='true'/> <property name='nodeid-msr' type='boolean' value='false'/> <property name='misalignsse' type='boolean' value='false'/> + <property name='min-xlevel' type='number' value='2147483656'/> <property name='bmi1' type='boolean' value='true'/> <property name='bmi2' type='boolean' value='true'/> <property name='kvm-pv-unhalt' type='boolean' value='true'/> @@ -365,6 +371,7 @@ <property name='pse36' type='boolean' value='true'/> <property name='tbm' type='boolean' value='false'/> <property name='wdt' type='boolean' value='false'/> + <property name='model-id' type='string' value='Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz'/> <property name='sha-ni' type='boolean' value='false'/> <property name='abm' type='boolean' value='true'/> <property name='avx512pf' type='boolean' value='false'/> -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:06PM +0100, Jiri Denemark wrote:
While query-cpu-model-expansion returns only boolean features on s390, but x86_64 reports some integer and string properties which we are interested in.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - change the XML element to <property name='...' type='boolean|string|number' value='...'/>
Version 2: - no change
src/qemu/qemu_capabilities.c | 100 +++++++++++++++++------ src/qemu/qemu_monitor.c | 25 +++++- src/qemu/qemu_monitor.h | 27 +++++- src/qemu/qemu_monitor_json.c | 42 ++++++++-- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 7 ++ 5 files changed, 163 insertions(+), 38 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e037d5f95..0b611c323 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3076,14 +3076,16 @@ virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps, cpu->nfeatures = 0;
for (i = 0; i < modelInfo->nprops; i++) { - if (VIR_STRDUP(cpu->features[i].name, modelInfo->props[i].name) < 0) + virCPUFeatureDefPtr feature = cpu->features + cpu->nfeatures; + qemuMonitorCPUPropertyPtr prop = modelInfo->props + i; + + if (prop->type != QEMU_MONITOR_CPU_PROPERTY_BOOLEAN) + continue; + + if (VIR_STRDUP(feature->name, prop->name) < 0) return -1; - - if (modelInfo->props[i].supported) - cpu->features[i].policy = VIR_CPU_FEATURE_REQUIRE; - else - cpu->features[i].policy = VIR_CPU_FEATURE_DISABLE; - + feature->policy = prop->value.boolean ? VIR_CPU_FEATURE_REQUIRE + : VIR_CPU_FEATURE_DISABLE; cpu->nfeatures++; }
@@ -3189,30 +3191,59 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, hostCPU->nprops = n;
for (i = 0; i < n; i++) { - hostCPU->props[i].name = virXMLPropString(nodes[i], "name"); - if (!hostCPU->props[i].name) { + qemuMonitorCPUPropertyPtr prop = hostCPU->props + i; + int type; + + ctxt->node = nodes[i]; + + if (!(prop->name = virXMLPropString(ctxt->node, "name"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing 'name' attribute for a host CPU" " model property in QEMU capabilities cache")); goto cleanup; }
- if (!(str = virXMLPropString(nodes[i], "value"))) { + if (!(str = virXMLPropString(ctxt->node, "type")) || + (type = qemuMonitorCPUPropertyTypeFromString(str)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("missing 'value' attribute for a host CPU" - " model property in QEMU capabilities cache")); - goto cleanup; - } - if (STREQ(str, "true")) { - hostCPU->props[i].supported = true; - } else if (STREQ(str, "false")) { - hostCPU->props[i].supported = false; - } else { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid boolean value: '%s'"), str); + _("missing CPU model property type in QEMU " + "capabilities cache"));
There should be a different error message for the case when type is missing and when the type is unknown. Or just modify the error message to cover both cases. ACK with that fixed. Pavel

Querying "host" CPU model expansion only makes sense for KVM. QEMU 2.9.0 introduces a new "max" CPU model which can be used to ask QEMU what the best CPU it can provide to a TCG domain is. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - s/type/virtType/ in virQEMUCapsLoadHostCPUModelInfo as type variable was added in the previous patch Version 2: - no change src/qemu/qemu_capabilities.c | 151 ++++++++++++----- src/qemu/qemu_capabilities.h | 3 +- src/qemu/qemu_capspriv.h | 3 +- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_process.c | 5 +- .../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 8 + tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 2 +- .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 179 +++++++++++++++++++++ tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 172 +++++++++++++++++++- tests/qemuxml2argvtest.c | 3 +- 10 files changed, 480 insertions(+), 48 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 0b611c323..f31a9ce6e 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -401,13 +401,15 @@ struct _virQEMUCaps { size_t ngicCapabilities; virGICCapability *gicCapabilities; - qemuMonitorCPUModelInfoPtr hostCPUModelInfo; + qemuMonitorCPUModelInfoPtr kvmCPUModelInfo; + qemuMonitorCPUModelInfoPtr tcgCPUModelInfo; /* Anything below is not stored in the cache since the values are * re-computed from the other fields or external data sources every * time we probe QEMU or load the results from the cache. */ - virCPUDefPtr hostCPUModel; + virCPUDefPtr kvmCPUModel; + virCPUDefPtr tcgCPUModel; }; struct virQEMUCapsSearchData { @@ -2164,12 +2166,20 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps) goto error; } - if (qemuCaps->hostCPUModel && - !(ret->hostCPUModel = virCPUDefCopy(qemuCaps->hostCPUModel))) + if (qemuCaps->kvmCPUModel && + !(ret->kvmCPUModel = virCPUDefCopy(qemuCaps->kvmCPUModel))) goto error; - if (qemuCaps->hostCPUModelInfo && - !(ret->hostCPUModelInfo = qemuMonitorCPUModelInfoCopy(qemuCaps->hostCPUModelInfo))) + if (qemuCaps->tcgCPUModel && + !(ret->tcgCPUModel = virCPUDefCopy(qemuCaps->tcgCPUModel))) + goto error; + + if (qemuCaps->kvmCPUModelInfo && + !(ret->kvmCPUModelInfo = qemuMonitorCPUModelInfoCopy(qemuCaps->kvmCPUModelInfo))) + goto error; + + if (qemuCaps->tcgCPUModelInfo && + !(ret->tcgCPUModelInfo = qemuMonitorCPUModelInfoCopy(qemuCaps->tcgCPUModelInfo))) goto error; if (VIR_ALLOC_N(ret->machineTypes, qemuCaps->nmachineTypes) < 0) @@ -2218,8 +2228,10 @@ void virQEMUCapsDispose(void *obj) VIR_FREE(qemuCaps->gicCapabilities); - qemuMonitorCPUModelInfoFree(qemuCaps->hostCPUModelInfo); - virCPUDefFree(qemuCaps->hostCPUModel); + qemuMonitorCPUModelInfoFree(qemuCaps->kvmCPUModelInfo); + qemuMonitorCPUModelInfoFree(qemuCaps->tcgCPUModelInfo); + virCPUDefFree(qemuCaps->kvmCPUModel); + virCPUDefFree(qemuCaps->tcgCPUModel); } void @@ -2436,9 +2448,13 @@ virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps, virCPUDefPtr -virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps) +virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps, + virDomainVirtType type) { - return qemuCaps->hostCPUModel; + if (type == VIR_DOMAIN_VIRT_KVM) + return qemuCaps->kvmCPUModel; + else + return qemuCaps->tcgCPUModel; } @@ -2456,7 +2472,7 @@ virQEMUCapsIsCPUModeSupported(virQEMUCapsPtr qemuCaps, virQEMUCapsGuestIsNative(caps->host.arch, qemuCaps->arch); case VIR_CPU_MODE_HOST_MODEL: - return !!qemuCaps->hostCPUModel; + return !!virQEMUCapsGetHostModel(qemuCaps, type); case VIR_CPU_MODE_CUSTOM: if (type == VIR_DOMAIN_VIRT_KVM) @@ -2823,14 +2839,24 @@ virQEMUCapsProbeQMPCPUDefinitions(virQEMUCapsPtr qemuCaps, static int virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps, - qemuMonitorPtr mon) + qemuMonitorPtr mon, + bool tcg) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION) || - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) + qemuMonitorCPUModelInfoPtr *modelInfo; + const char *model; + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION)) return 0; - return qemuMonitorGetCPUModelExpansion(mon, "static", "host", - &qemuCaps->hostCPUModelInfo); + if (tcg || !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) { + modelInfo = &qemuCaps->tcgCPUModelInfo; + model = "max"; + } else { + modelInfo = &qemuCaps->kvmCPUModelInfo; + model = "host"; + } + + return qemuMonitorGetCPUModelExpansion(mon, "static", model, modelInfo); } struct tpmTypeToCaps { @@ -3055,12 +3081,16 @@ virQEMUCapsCPUFilterFeatures(const char *name, */ static int virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, virCPUDefPtr cpu) { - qemuMonitorCPUModelInfoPtr modelInfo = qemuCaps->hostCPUModelInfo; + qemuMonitorCPUModelInfoPtr modelInfo; size_t i; - if (!modelInfo) { + if (type != VIR_DOMAIN_VIRT_KVM) + return -1; + + if (!(modelInfo = qemuCaps->kvmCPUModelInfo)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("missing host CPU model info from QEMU capabilities " "for binary %s"), @@ -3100,12 +3130,13 @@ virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps, */ static int virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, virCPUDefPtr cpu) { int ret = 1; if (ARCH_IS_S390(qemuCaps->arch)) - ret = virQEMUCapsInitCPUModelS390(qemuCaps, cpu); + ret = virQEMUCapsInitCPUModelS390(qemuCaps, type, cpu); if (ret == 0) cpu->fallback = VIR_CPU_FALLBACK_FORBID; @@ -3116,7 +3147,8 @@ virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, void virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, - virCapsPtr caps) + virCapsPtr caps, + virDomainVirtType type) { virCPUDefPtr cpu = NULL; int rc; @@ -3132,7 +3164,7 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, cpu->match = VIR_CPU_MATCH_EXACT; cpu->fallback = VIR_CPU_FALLBACK_ALLOW; - if ((rc = virQEMUCapsInitCPUModel(qemuCaps, cpu)) < 0) { + if ((rc = virQEMUCapsInitCPUModel(qemuCaps, type, cpu)) < 0) { goto error; } else if (rc == 1) { VIR_DEBUG("No host CPU model info from QEMU; using host capabilities"); @@ -3145,7 +3177,11 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, goto error; } - qemuCaps->hostCPUModel = cpu; + if (type == VIR_DOMAIN_VIRT_KVM) + qemuCaps->kvmCPUModel = cpu; + else + qemuCaps->tcgCPUModel = cpu; + return; error: @@ -3156,7 +3192,8 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, static int virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, - xmlXPathContextPtr ctxt) + xmlXPathContextPtr ctxt, + virDomainVirtType virtType) { char *str = NULL; xmlNodePtr hostCPUNode; @@ -3167,7 +3204,12 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, size_t i; int n; - if (!(hostCPUNode = virXPathNode("./hostCPU", ctxt))) { + if (virtType == VIR_DOMAIN_VIRT_KVM) + hostCPUNode = virXPathNode("./hostCPU[@type='kvm']", ctxt); + else + hostCPUNode = virXPathNode("./hostCPU[@type='tcg']", ctxt); + + if (!hostCPUNode) { ret = 0; goto cleanup; } @@ -3247,7 +3289,10 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, } } - qemuCaps->hostCPUModelInfo = hostCPU; + if (virtType == VIR_DOMAIN_VIRT_KVM) + qemuCaps->kvmCPUModelInfo = hostCPU; + else + qemuCaps->tcgCPUModelInfo = hostCPU; hostCPU = NULL; ret = 0; @@ -3454,7 +3499,8 @@ virQEMUCapsLoadCache(virCapsPtr caps, } VIR_FREE(str); - if (virQEMUCapsLoadHostCPUModelInfo(qemuCaps, ctxt) < 0) + if (virQEMUCapsLoadHostCPUModelInfo(qemuCaps, ctxt, VIR_DOMAIN_VIRT_KVM) < 0 || + virQEMUCapsLoadHostCPUModelInfo(qemuCaps, ctxt, VIR_DOMAIN_VIRT_QEMU) < 0) goto cleanup; if (virQEMUCapsLoadCPUModels(qemuCaps, ctxt, VIR_DOMAIN_VIRT_KVM) < 0 || @@ -3562,7 +3608,8 @@ virQEMUCapsLoadCache(virCapsPtr caps, } VIR_FREE(nodes); - virQEMUCapsInitHostCPUModel(qemuCaps, caps); + virQEMUCapsInitHostCPUModel(qemuCaps, caps, VIR_DOMAIN_VIRT_KVM); + virQEMUCapsInitHostCPUModel(qemuCaps, caps, VIR_DOMAIN_VIRT_QEMU); ret = 0; cleanup: @@ -3576,12 +3623,26 @@ virQEMUCapsLoadCache(virCapsPtr caps, static void virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemuCaps, - virBufferPtr buf) + virBufferPtr buf, + virDomainVirtType type) { - qemuMonitorCPUModelInfoPtr model = qemuCaps->hostCPUModelInfo; + qemuMonitorCPUModelInfoPtr model; + const char *typeStr; size_t i; - virBufferAsprintf(buf, "<hostCPU model='%s'>\n", model->name); + if (type == VIR_DOMAIN_VIRT_KVM) { + typeStr = "kvm"; + model = qemuCaps->kvmCPUModelInfo; + } else { + typeStr = "tcg"; + model = qemuCaps->tcgCPUModelInfo; + } + + if (!model) + return; + + virBufferAsprintf(buf, "<hostCPU type='%s' model='%s'>\n", + typeStr, model->name); virBufferAdjustIndent(buf, 2); for (i = 0; i < model->nprops; i++) { @@ -3692,8 +3753,8 @@ virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps, virBufferAsprintf(&buf, "<arch>%s</arch>\n", virArchToString(qemuCaps->arch)); - if (qemuCaps->hostCPUModelInfo) - virQEMUCapsFormatHostCPUModelInfo(qemuCaps, &buf); + virQEMUCapsFormatHostCPUModelInfo(qemuCaps, &buf, VIR_DOMAIN_VIRT_KVM); + virQEMUCapsFormatHostCPUModelInfo(qemuCaps, &buf, VIR_DOMAIN_VIRT_QEMU); virQEMUCapsFormatCPUModels(qemuCaps, &buf, VIR_DOMAIN_VIRT_KVM); virQEMUCapsFormatCPUModels(qemuCaps, &buf, VIR_DOMAIN_VIRT_QEMU); @@ -3828,11 +3889,15 @@ virQEMUCapsReset(virQEMUCapsPtr qemuCaps) VIR_FREE(qemuCaps->gicCapabilities); qemuCaps->ngicCapabilities = 0; - qemuMonitorCPUModelInfoFree(qemuCaps->hostCPUModelInfo); - qemuCaps->hostCPUModelInfo = NULL; + qemuMonitorCPUModelInfoFree(qemuCaps->kvmCPUModelInfo); + qemuMonitorCPUModelInfoFree(qemuCaps->tcgCPUModelInfo); + qemuCaps->kvmCPUModelInfo = NULL; + qemuCaps->tcgCPUModelInfo = NULL; - virCPUDefFree(qemuCaps->hostCPUModel); - qemuCaps->hostCPUModel = NULL; + virCPUDefFree(qemuCaps->kvmCPUModel); + virCPUDefFree(qemuCaps->tcgCPUModel); + qemuCaps->kvmCPUModel = NULL; + qemuCaps->tcgCPUModel = NULL; } @@ -4390,7 +4455,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_QMP_SCHEMA) && virQEMUCapsProbeQMPSchemaCapabilities(qemuCaps, mon) < 0) goto cleanup; - if (virQEMUCapsProbeQMPHostCPU(qemuCaps, mon) < 0) + if (virQEMUCapsProbeQMPHostCPU(qemuCaps, mon, false) < 0) goto cleanup; /* 'intel-iommu' shows up as a device since 2.2.0, but can @@ -4432,6 +4497,9 @@ virQEMUCapsInitQMPMonitorTCG(virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED, if (virQEMUCapsProbeQMPCPUDefinitions(qemuCaps, mon, true) < 0) goto cleanup; + if (virQEMUCapsProbeQMPHostCPU(qemuCaps, mon, true) < 0) + goto cleanup; + ret = 0; cleanup: return ret; @@ -4776,7 +4844,8 @@ virQEMUCapsNewForBinaryInternal(virCapsPtr caps, virQEMUCapsRememberCached(qemuCaps, cacheDir) < 0) goto error; - virQEMUCapsInitHostCPUModel(qemuCaps, caps); + virQEMUCapsInitHostCPUModel(qemuCaps, caps, VIR_DOMAIN_VIRT_KVM); + virQEMUCapsInitHostCPUModel(qemuCaps, caps, VIR_DOMAIN_VIRT_QEMU); } cleanup: @@ -5222,8 +5291,10 @@ virQEMUCapsFillDomainCPUCaps(virCapsPtr caps, domCaps->cpu.hostPassthrough = true; if (virQEMUCapsIsCPUModeSupported(qemuCaps, caps, domCaps->virttype, - VIR_CPU_MODE_HOST_MODEL)) - domCaps->cpu.hostModel = virCPUDefCopy(qemuCaps->hostCPUModel); + VIR_CPU_MODE_HOST_MODEL)) { + virCPUDefPtr cpu = virQEMUCapsGetHostModel(qemuCaps, domCaps->virttype); + domCaps->cpu.hostModel = virCPUDefCopy(cpu); + } if (virQEMUCapsIsCPUModeSupported(qemuCaps, caps, domCaps->virttype, VIR_CPU_MODE_CUSTOM)) { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 0f998c473..eba06aa6d 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -442,7 +442,8 @@ int virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps, virDomainVirtType type, char ***names, size_t *count); -virCPUDefPtr virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps); +virCPUDefPtr virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps, + virDomainVirtType type); bool virQEMUCapsIsCPUModeSupported(virQEMUCapsPtr qemuCaps, virCapsPtr caps, virDomainVirtType type, diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 38b971e0e..75499d462 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -71,5 +71,6 @@ virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps, void virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, - virCapsPtr caps); + virCapsPtr caps, + virDomainVirtType type); #endif diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d5da533e5..cf2184969 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6665,7 +6665,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd, if (def->cpu->mode == VIR_CPU_MODE_CUSTOM) cpuDef = def->cpu; else if (def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH) - cpuDef = virQEMUCapsGetHostModel(qemuCaps); + cpuDef = virQEMUCapsGetHostModel(qemuCaps, def->virtType); if (cpuDef) { int svm = virCPUCheckFeature(def->os.arch, cpuDef, "svm"); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ea10fff45..1d7128037 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5177,13 +5177,14 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def, /* custom CPUs in TCG mode don't need to be compared to host CPU */ if (def->virtType != VIR_DOMAIN_VIRT_QEMU || def->cpu->mode != VIR_CPU_MODE_CUSTOM) { - if (virCPUCompare(caps->host.arch, virQEMUCapsGetHostModel(qemuCaps), + if (virCPUCompare(caps->host.arch, + virQEMUCapsGetHostModel(qemuCaps, def->virtType), def->cpu, true) < 0) return -1; } if (virCPUUpdate(def->os.arch, def->cpu, - virQEMUCapsGetHostModel(qemuCaps)) < 0) + virQEMUCapsGetHostModel(qemuCaps, def->virtType)) < 0) goto cleanup; if (virQEMUCapsGetCPUDefinitions(qemuCaps, def->virtType, diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.replies b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.replies index 0405d5d7b..c3cbeee0a 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.replies @@ -13378,3 +13378,11 @@ ], "id": "libvirt-2" } + +{ + "id": "libvirt-3", + "error": { + "class": "GenericError", + "desc": "The CPU definition 'max' is unknown." + } +} diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml index 84c570020..d179a8413 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -133,7 +133,7 @@ <kvmVersion>0</kvmVersion> <package></package> <arch>s390x</arch> - <hostCPU model='zEC12.2-base'> + <hostCPU type='kvm' model='zEC12.2-base'> <property name='aefsi' type='boolean' value='true'/> <property name='msa5' type='boolean' value='true'/> <property name='msa4' type='boolean' value='true'/> diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies index c000f8cf9..6cf1cdd3e 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies @@ -14889,3 +14889,182 @@ ], "id": "libvirt-2" } + +{ + "return": { + "model": { + "name": "base", + "props": { + "cmov": true, + "ia64": false, + "aes": true, + "mmx": true, + "rdpid": false, + "arat": true, + "pause-filter": false, + "xsavec": false, + "osxsave": false, + "kvm-asyncpf": false, + "perfctr-core": false, + "mpx": true, + "pbe": false, + "avx512cd": false, + "decodeassists": false, + "sse4.1": true, + "family": 6, + "avx512f": false, + "msr": true, + "mce": true, + "mca": true, + "xcrypt": false, + "min-level": 13, + "xgetbv1": true, + "cid": false, + "ds": false, + "fxsr": true, + "xsaveopt": true, + "xtpr": false, + "avx512vl": false, + "avx512-vpopcntdq": false, + "phe": false, + "extapic": false, + "3dnowprefetch": false, + "cr8legacy": true, + "xcrypt-en": false, + "pn": false, + "dca": false, + "vendor": "AuthenticAMD", + "pku": true, + "smx": false, + "cmp-legacy": false, + "avx512-4fmaps": false, + "vmcb-clean": false, + "hle": false, + "3dnowext": true, + "npt": false, + "clwb": true, + "lbrv": false, + "adx": true, + "ss": true, + "pni": true, + "svm-lock": false, + "smep": true, + "smap": true, + "pfthreshold": false, + "x2apic": false, + "avx512vbmi": false, + "flushbyasid": false, + "f16c": false, + "ace2-en": false, + "pae": true, + "pat": true, + "sse": true, + "phe-en": false, + "kvm-nopiodelay": false, + "tm": false, + "kvmclock-stable-bit": false, + "hypervisor": true, + "pcommit": true, + "syscall": true, + "avx512dq": false, + "svm": true, + "invtsc": false, + "sse2": true, + "est": false, + "avx512ifma": false, + "tm2": false, + "kvm-pv-eoi": false, + "cx8": true, + "kvm-mmu": false, + "sse4.2": true, + "pge": true, + "pdcm": false, + "model": 6, + "movbe": true, + "nrip-save": false, + "ssse3": true, + "sse4a": true, + "invpcid": false, + "pdpe1gb": true, + "tsc-deadline": false, + "fma": false, + "cx16": true, + "de": true, + "stepping": 3, + "xsave": true, + "clflush": true, + "skinit": false, + "tsc": true, + "tce": false, + "fpu": true, + "ds-cpl": false, + "ibs": false, + "fma4": false, + "la57": true, + "osvw": false, + "apic": true, + "pmm": false, + "tsc-adjust": false, + "kvm-steal-time": false, + "kvmclock": false, + "lwp": false, + "xop": false, + "avx": false, + "ospke": true, + "acpi": true, + "avx512bw": false, + "ace2": false, + "fsgsbase": true, + "ht": false, + "nx": true, + "pclmulqdq": true, + "mmxext": true, + "popcnt": true, + "xsaves": false, + "lm": true, + "umip": false, + "pse": true, + "avx2": false, + "sep": true, + "nodeid-msr": false, + "misalignsse": false, + "min-xlevel": 2147483658, + "bmi1": true, + "bmi2": true, + "kvm-pv-unhalt": false, + "tsc-scale": false, + "topoext": false, + "clflushopt": true, + "monitor": true, + "avx512er": false, + "pmm-en": false, + "pcid": false, + "3dnow": true, + "erms": true, + "lahf-lm": true, + "fxsr-opt": false, + "xstore": false, + "rtm": false, + "lmce": false, + "perfctr-nb": false, + "rdrand": false, + "rdseed": false, + "avx512-4vnniw": false, + "vme": false, + "vmx": false, + "dtes64": false, + "mtrr": true, + "rdtscp": true, + "pse36": true, + "tbm": false, + "wdt": false, + "model-id": "QEMU TCG CPU version 2.5+", + "sha-ni": false, + "abm": true, + "avx512pf": false, + "xstore-en": false + } + } + }, + "id": "libvirt-3" +} diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index 805fee78b..2afd78a98 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -207,7 +207,7 @@ <kvmVersion>0</kvmVersion> <package> (v2.8.0-1428-g1b1a68c602)</package> <arch>x86_64</arch> - <hostCPU model='base'> + <hostCPU type='kvm' model='base'> <property name='cmov' type='boolean' value='true'/> <property name='ia64' type='boolean' value='false'/> <property name='aes' type='boolean' value='true'/> @@ -377,6 +377,176 @@ <property name='avx512pf' type='boolean' value='false'/> <property name='xstore-en' type='boolean' value='false'/> </hostCPU> + <hostCPU type='tcg' model='base'> + <property name='cmov' type='boolean' value='true'/> + <property name='ia64' type='boolean' value='false'/> + <property name='aes' type='boolean' value='true'/> + <property name='mmx' type='boolean' value='true'/> + <property name='rdpid' type='boolean' value='false'/> + <property name='arat' type='boolean' value='true'/> + <property name='pause-filter' type='boolean' value='false'/> + <property name='xsavec' type='boolean' value='false'/> + <property name='osxsave' type='boolean' value='false'/> + <property name='kvm-asyncpf' type='boolean' value='false'/> + <property name='perfctr-core' type='boolean' value='false'/> + <property name='mpx' type='boolean' value='true'/> + <property name='pbe' type='boolean' value='false'/> + <property name='avx512cd' type='boolean' value='false'/> + <property name='decodeassists' type='boolean' value='false'/> + <property name='sse4.1' type='boolean' value='true'/> + <property name='family' type='number' value='6'/> + <property name='avx512f' type='boolean' value='false'/> + <property name='msr' type='boolean' value='true'/> + <property name='mce' type='boolean' value='true'/> + <property name='mca' type='boolean' value='true'/> + <property name='xcrypt' type='boolean' value='false'/> + <property name='min-level' type='number' value='13'/> + <property name='xgetbv1' type='boolean' value='true'/> + <property name='cid' type='boolean' value='false'/> + <property name='ds' type='boolean' value='false'/> + <property name='fxsr' type='boolean' value='true'/> + <property name='xsaveopt' type='boolean' value='true'/> + <property name='xtpr' type='boolean' value='false'/> + <property name='avx512vl' type='boolean' value='false'/> + <property name='avx512-vpopcntdq' type='boolean' value='false'/> + <property name='phe' type='boolean' value='false'/> + <property name='extapic' type='boolean' value='false'/> + <property name='3dnowprefetch' type='boolean' value='false'/> + <property name='cr8legacy' type='boolean' value='true'/> + <property name='xcrypt-en' type='boolean' value='false'/> + <property name='pn' type='boolean' value='false'/> + <property name='dca' type='boolean' value='false'/> + <property name='vendor' type='string' value='AuthenticAMD'/> + <property name='pku' type='boolean' value='true'/> + <property name='smx' type='boolean' value='false'/> + <property name='cmp-legacy' type='boolean' value='false'/> + <property name='avx512-4fmaps' type='boolean' value='false'/> + <property name='vmcb-clean' type='boolean' value='false'/> + <property name='hle' type='boolean' value='false'/> + <property name='3dnowext' type='boolean' value='true'/> + <property name='npt' type='boolean' value='false'/> + <property name='clwb' type='boolean' value='true'/> + <property name='lbrv' type='boolean' value='false'/> + <property name='adx' type='boolean' value='true'/> + <property name='ss' type='boolean' value='true'/> + <property name='pni' type='boolean' value='true'/> + <property name='svm-lock' type='boolean' value='false'/> + <property name='smep' type='boolean' value='true'/> + <property name='smap' type='boolean' value='true'/> + <property name='pfthreshold' type='boolean' value='false'/> + <property name='x2apic' type='boolean' value='false'/> + <property name='avx512vbmi' type='boolean' value='false'/> + <property name='flushbyasid' type='boolean' value='false'/> + <property name='f16c' type='boolean' value='false'/> + <property name='ace2-en' type='boolean' value='false'/> + <property name='pae' type='boolean' value='true'/> + <property name='pat' type='boolean' value='true'/> + <property name='sse' type='boolean' value='true'/> + <property name='phe-en' type='boolean' value='false'/> + <property name='kvm-nopiodelay' type='boolean' value='false'/> + <property name='tm' type='boolean' value='false'/> + <property name='kvmclock-stable-bit' type='boolean' value='false'/> + <property name='hypervisor' type='boolean' value='true'/> + <property name='pcommit' type='boolean' value='true'/> + <property name='syscall' type='boolean' value='true'/> + <property name='avx512dq' type='boolean' value='false'/> + <property name='svm' type='boolean' value='true'/> + <property name='invtsc' type='boolean' value='false'/> + <property name='sse2' type='boolean' value='true'/> + <property name='est' type='boolean' value='false'/> + <property name='avx512ifma' type='boolean' value='false'/> + <property name='tm2' type='boolean' value='false'/> + <property name='kvm-pv-eoi' type='boolean' value='false'/> + <property name='cx8' type='boolean' value='true'/> + <property name='kvm-mmu' type='boolean' value='false'/> + <property name='sse4.2' type='boolean' value='true'/> + <property name='pge' type='boolean' value='true'/> + <property name='pdcm' type='boolean' value='false'/> + <property name='model' type='number' value='6'/> + <property name='movbe' type='boolean' value='true'/> + <property name='nrip-save' type='boolean' value='false'/> + <property name='ssse3' type='boolean' value='true'/> + <property name='sse4a' type='boolean' value='true'/> + <property name='invpcid' type='boolean' value='false'/> + <property name='pdpe1gb' type='boolean' value='true'/> + <property name='tsc-deadline' type='boolean' value='false'/> + <property name='fma' type='boolean' value='false'/> + <property name='cx16' type='boolean' value='true'/> + <property name='de' type='boolean' value='true'/> + <property name='stepping' type='number' value='3'/> + <property name='xsave' type='boolean' value='true'/> + <property name='clflush' type='boolean' value='true'/> + <property name='skinit' type='boolean' value='false'/> + <property name='tsc' type='boolean' value='true'/> + <property name='tce' type='boolean' value='false'/> + <property name='fpu' type='boolean' value='true'/> + <property name='ds-cpl' type='boolean' value='false'/> + <property name='ibs' type='boolean' value='false'/> + <property name='fma4' type='boolean' value='false'/> + <property name='la57' type='boolean' value='true'/> + <property name='osvw' type='boolean' value='false'/> + <property name='apic' type='boolean' value='true'/> + <property name='pmm' type='boolean' value='false'/> + <property name='tsc-adjust' type='boolean' value='false'/> + <property name='kvm-steal-time' type='boolean' value='false'/> + <property name='kvmclock' type='boolean' value='false'/> + <property name='lwp' type='boolean' value='false'/> + <property name='xop' type='boolean' value='false'/> + <property name='avx' type='boolean' value='false'/> + <property name='ospke' type='boolean' value='true'/> + <property name='acpi' type='boolean' value='true'/> + <property name='avx512bw' type='boolean' value='false'/> + <property name='ace2' type='boolean' value='false'/> + <property name='fsgsbase' type='boolean' value='true'/> + <property name='ht' type='boolean' value='false'/> + <property name='nx' type='boolean' value='true'/> + <property name='pclmulqdq' type='boolean' value='true'/> + <property name='mmxext' type='boolean' value='true'/> + <property name='popcnt' type='boolean' value='true'/> + <property name='xsaves' type='boolean' value='false'/> + <property name='lm' type='boolean' value='true'/> + <property name='umip' type='boolean' value='false'/> + <property name='pse' type='boolean' value='true'/> + <property name='avx2' type='boolean' value='false'/> + <property name='sep' type='boolean' value='true'/> + <property name='nodeid-msr' type='boolean' value='false'/> + <property name='misalignsse' type='boolean' value='false'/> + <property name='min-xlevel' type='number' value='2147483658'/> + <property name='bmi1' type='boolean' value='true'/> + <property name='bmi2' type='boolean' value='true'/> + <property name='kvm-pv-unhalt' type='boolean' value='false'/> + <property name='tsc-scale' type='boolean' value='false'/> + <property name='topoext' type='boolean' value='false'/> + <property name='clflushopt' type='boolean' value='true'/> + <property name='monitor' type='boolean' value='true'/> + <property name='avx512er' type='boolean' value='false'/> + <property name='pmm-en' type='boolean' value='false'/> + <property name='pcid' type='boolean' value='false'/> + <property name='3dnow' type='boolean' value='true'/> + <property name='erms' type='boolean' value='true'/> + <property name='lahf-lm' type='boolean' value='true'/> + <property name='fxsr-opt' type='boolean' value='false'/> + <property name='xstore' type='boolean' value='false'/> + <property name='rtm' type='boolean' value='false'/> + <property name='lmce' type='boolean' value='false'/> + <property name='perfctr-nb' type='boolean' value='false'/> + <property name='rdrand' type='boolean' value='false'/> + <property name='rdseed' type='boolean' value='false'/> + <property name='avx512-4vnniw' type='boolean' value='false'/> + <property name='vme' type='boolean' value='false'/> + <property name='vmx' type='boolean' value='false'/> + <property name='dtes64' type='boolean' value='false'/> + <property name='mtrr' type='boolean' value='true'/> + <property name='rdtscp' type='boolean' value='true'/> + <property name='pse36' type='boolean' value='true'/> + <property name='tbm' type='boolean' value='false'/> + <property name='wdt' type='boolean' value='false'/> + <property name='model-id' type='string' value='QEMU TCG CPU version 2.5+'/> + <property name='sha-ni' type='boolean' value='false'/> + <property name='abm' type='boolean' value='true'/> + <property name='avx512pf' type='boolean' value='false'/> + <property name='xstore-en' type='boolean' value='false'/> + </hostCPU> <cpu type='kvm' name='max' usable='yes'/> <cpu type='kvm' name='host' usable='yes'/> <cpu type='kvm' name='base' usable='yes'/> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f55b04b05..3590920d4 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -384,7 +384,8 @@ testUpdateQEMUCaps(const struct testInfo *info, if (testAddCPUModels(info->qemuCaps, info->skipLegacyCPUs) < 0) goto cleanup; - virQEMUCapsInitHostCPUModel(info->qemuCaps, caps); + virQEMUCapsInitHostCPUModel(info->qemuCaps, caps, VIR_DOMAIN_VIRT_KVM); + virQEMUCapsInitHostCPUModel(info->qemuCaps, caps, VIR_DOMAIN_VIRT_QEMU); virQEMUCapsFilterByMachineType(info->qemuCaps, vm->def->os.machine); -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:07PM +0100, Jiri Denemark wrote:
Querying "host" CPU model expansion only makes sense for KVM. QEMU 2.9.0 introduces a new "max" CPU model which can be used to ask QEMU what the best CPU it can provide to a TCG domain is.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - s/type/virtType/ in virQEMUCapsLoadHostCPUModelInfo as type variable was added in the previous patch
Version 2: - no change
src/qemu/qemu_capabilities.c | 151 ++++++++++++----- src/qemu/qemu_capabilities.h | 3 +- src/qemu/qemu_capspriv.h | 3 +- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_process.c | 5 +- .../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 8 + tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 2 +- .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 179 +++++++++++++++++++++ tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 172 +++++++++++++++++++- tests/qemuxml2argvtest.c | 3 +- 10 files changed, 480 insertions(+), 48 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 0b611c323..f31a9ce6e 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -401,13 +401,15 @@ struct _virQEMUCaps { size_t ngicCapabilities; virGICCapability *gicCapabilities;
- qemuMonitorCPUModelInfoPtr hostCPUModelInfo; + qemuMonitorCPUModelInfoPtr kvmCPUModelInfo; + qemuMonitorCPUModelInfoPtr tcgCPUModelInfo;
/* Anything below is not stored in the cache since the values are * re-computed from the other fields or external data sources every * time we probe QEMU or load the results from the cache. */ - virCPUDefPtr hostCPUModel; + virCPUDefPtr kvmCPUModel; + virCPUDefPtr tcgCPUModel; };
struct virQEMUCapsSearchData { @@ -2164,12 +2166,20 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps) goto error; }
- if (qemuCaps->hostCPUModel && - !(ret->hostCPUModel = virCPUDefCopy(qemuCaps->hostCPUModel))) + if (qemuCaps->kvmCPUModel && + !(ret->kvmCPUModel = virCPUDefCopy(qemuCaps->kvmCPUModel))) goto error;
- if (qemuCaps->hostCPUModelInfo && - !(ret->hostCPUModelInfo = qemuMonitorCPUModelInfoCopy(qemuCaps->hostCPUModelInfo))) + if (qemuCaps->tcgCPUModel && + !(ret->tcgCPUModel = virCPUDefCopy(qemuCaps->tcgCPUModel))) + goto error; + + if (qemuCaps->kvmCPUModelInfo && + !(ret->kvmCPUModelInfo = qemuMonitorCPUModelInfoCopy(qemuCaps->kvmCPUModelInfo))) + goto error; + + if (qemuCaps->tcgCPUModelInfo && + !(ret->tcgCPUModelInfo = qemuMonitorCPUModelInfoCopy(qemuCaps->tcgCPUModelInfo))) goto error;
if (VIR_ALLOC_N(ret->machineTypes, qemuCaps->nmachineTypes) < 0) @@ -2218,8 +2228,10 @@ void virQEMUCapsDispose(void *obj)
VIR_FREE(qemuCaps->gicCapabilities);
- qemuMonitorCPUModelInfoFree(qemuCaps->hostCPUModelInfo); - virCPUDefFree(qemuCaps->hostCPUModel); + qemuMonitorCPUModelInfoFree(qemuCaps->kvmCPUModelInfo); + qemuMonitorCPUModelInfoFree(qemuCaps->tcgCPUModelInfo); + virCPUDefFree(qemuCaps->kvmCPUModel); + virCPUDefFree(qemuCaps->tcgCPUModel); }
void @@ -2436,9 +2448,13 @@ virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps,
virCPUDefPtr -virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps) +virQEMUCapsGetHostModel(virQEMUCapsPtr qemuCaps, + virDomainVirtType type) { - return qemuCaps->hostCPUModel; + if (type == VIR_DOMAIN_VIRT_KVM) + return qemuCaps->kvmCPUModel; + else + return qemuCaps->tcgCPUModel; }
@@ -2456,7 +2472,7 @@ virQEMUCapsIsCPUModeSupported(virQEMUCapsPtr qemuCaps, virQEMUCapsGuestIsNative(caps->host.arch, qemuCaps->arch);
case VIR_CPU_MODE_HOST_MODEL: - return !!qemuCaps->hostCPUModel; + return !!virQEMUCapsGetHostModel(qemuCaps, type);
case VIR_CPU_MODE_CUSTOM: if (type == VIR_DOMAIN_VIRT_KVM) @@ -2823,14 +2839,24 @@ virQEMUCapsProbeQMPCPUDefinitions(virQEMUCapsPtr qemuCaps,
static int virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps, - qemuMonitorPtr mon) + qemuMonitorPtr mon, + bool tcg) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION) || - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) + qemuMonitorCPUModelInfoPtr *modelInfo; + const char *model; + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION)) return 0;
- return qemuMonitorGetCPUModelExpansion(mon, "static", "host", - &qemuCaps->hostCPUModelInfo); + if (tcg || !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) { + modelInfo = &qemuCaps->tcgCPUModelInfo; + model = "max"; + } else { + modelInfo = &qemuCaps->kvmCPUModelInfo; + model = "host"; + } + + return qemuMonitorGetCPUModelExpansion(mon, "static", model, modelInfo); }
struct tpmTypeToCaps { @@ -3055,12 +3081,16 @@ virQEMUCapsCPUFilterFeatures(const char *name, */ static int virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, virCPUDefPtr cpu) { - qemuMonitorCPUModelInfoPtr modelInfo = qemuCaps->hostCPUModelInfo; + qemuMonitorCPUModelInfoPtr modelInfo; size_t i;
- if (!modelInfo) { + if (type != VIR_DOMAIN_VIRT_KVM) + return -1;
It would be nice to have some error message in this case as well. Before this patch the following error would be used because the "hostCPUModelInfo" would be empty for TCG. ACK with that fixed Pavel
+ + if (!(modelInfo = qemuCaps->kvmCPUModelInfo)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("missing host CPU model info from QEMU capabilities " "for binary %s"),

On Thu, Feb 23, 2017 at 20:07:00 +0100, Pavel Hrdina wrote:
On Thu, Feb 23, 2017 at 03:15:07PM +0100, Jiri Denemark wrote:
Querying "host" CPU model expansion only makes sense for KVM. QEMU 2.9.0 introduces a new "max" CPU model which can be used to ask QEMU what the best CPU it can provide to a TCG domain is. ... static int virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, virCPUDefPtr cpu) { - qemuMonitorCPUModelInfoPtr modelInfo = qemuCaps->hostCPUModelInfo; + qemuMonitorCPUModelInfoPtr modelInfo; size_t i;
- if (!modelInfo) { + if (type != VIR_DOMAIN_VIRT_KVM) + return -1;
It would be nice to have some error message in this case as well. Before this patch the following error would be used because the "hostCPUModelInfo" would be empty for TCG.
ACK with that fixed
Pavel
+ + if (!(modelInfo = qemuCaps->kvmCPUModelInfo)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("missing host CPU model info from QEMU capabilities " "for binary %s"),
Hmm, the code should be a bit different: if (type == VIR_DOMAIN_VIRT_KVM) modelInfo = qemuCaps->kvmCPUModelInfo; else modelInfo = qemuCaps->tcgCPUModelInfo; if (!modelInfo) { virReportError(VIR_ERR_INTERNAL_ERROR, _("missing host CPU model info from QEMU capabilities " "for binary %s"), qemuCaps->binary); return -1; } There's no reason to ignore tcgCPUModelInfo in case QEMU implements support for "max" CPU model for TCG. Jirka

On Fri, Feb 24, 2017 at 01:04:35PM +0100, Jiri Denemark wrote:
On Thu, Feb 23, 2017 at 20:07:00 +0100, Pavel Hrdina wrote:
On Thu, Feb 23, 2017 at 03:15:07PM +0100, Jiri Denemark wrote:
Querying "host" CPU model expansion only makes sense for KVM. QEMU 2.9.0 introduces a new "max" CPU model which can be used to ask QEMU what the best CPU it can provide to a TCG domain is. ... static int virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, virCPUDefPtr cpu) { - qemuMonitorCPUModelInfoPtr modelInfo = qemuCaps->hostCPUModelInfo; + qemuMonitorCPUModelInfoPtr modelInfo; size_t i;
- if (!modelInfo) { + if (type != VIR_DOMAIN_VIRT_KVM) + return -1;
It would be nice to have some error message in this case as well. Before this patch the following error would be used because the "hostCPUModelInfo" would be empty for TCG.
ACK with that fixed
Pavel
+ + if (!(modelInfo = qemuCaps->kvmCPUModelInfo)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("missing host CPU model info from QEMU capabilities " "for binary %s"),
Hmm, the code should be a bit different:
if (type == VIR_DOMAIN_VIRT_KVM) modelInfo = qemuCaps->kvmCPUModelInfo; else modelInfo = qemuCaps->tcgCPUModelInfo;
if (!modelInfo) { virReportError(VIR_ERR_INTERNAL_ERROR, _("missing host CPU model info from QEMU capabilities " "for binary %s"), qemuCaps->binary); return -1; }
There's no reason to ignore tcgCPUModelInfo in case QEMU implements support for "max" CPU model for TCG.
Right, this is even better, ACK with that. Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - no change src/cpu/cpu_x86.c | 147 ++++++++++++++++++----------------------- src/cpu/cpu_x86.h | 3 - src/libvirt_private.syms | 1 - src/libxl/libxl_capabilities.c | 18 ++--- src/qemu/qemu_monitor_json.c | 33 ++++----- 5 files changed, 92 insertions(+), 110 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index d9764a260..ccd68b681 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -303,22 +303,6 @@ virCPUx86DataClear(virCPUx86Data *data) } -virCPUDataPtr -virCPUx86MakeData(virArch arch, virCPUx86Data *data) -{ - virCPUDataPtr cpuData; - - if (VIR_ALLOC(cpuData) < 0) - return NULL; - - cpuData->arch = arch; - cpuData->data.x86 = *data; - data->len = 0; - data->data = NULL; - - return cpuData; -} - static void x86FreeCPUData(virCPUDataPtr data) { @@ -1441,7 +1425,6 @@ virCPUx86DataParse(xmlXPathContextPtr ctxt) { xmlNodePtr *nodes = NULL; virCPUDataPtr cpuData = NULL; - virCPUx86Data data = VIR_CPU_X86_DATA_INIT; virCPUx86CPUID cpuid; size_t i; int n; @@ -1450,26 +1433,31 @@ virCPUx86DataParse(xmlXPathContextPtr ctxt) if (n <= 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no x86 CPU data found")); - goto cleanup; + goto error; } + if (!(cpuData = virCPUDataNew(VIR_ARCH_X86_64))) + goto error; + for (i = 0; i < n; i++) { ctxt->node = nodes[i]; if (x86ParseCPUID(ctxt, &cpuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("failed to parse cpuid[%zu]"), i); - goto cleanup; + goto error; } - if (virCPUx86DataAddCPUID(&data, &cpuid) < 0) - goto cleanup; + if (virCPUx86DataAddCPUID(&cpuData->data.x86, &cpuid) < 0) + goto error; } - cpuData = virCPUx86MakeData(VIR_ARCH_X86_64, &data); - cleanup: VIR_FREE(nodes); - virCPUx86DataClear(&data); return cpuData; + + error: + x86FreeCPUData(cpuData); + cpuData = NULL; + goto cleanup; } @@ -1514,7 +1502,7 @@ x86Compute(virCPUDefPtr host, virCPUx86ModelPtr cpu_forbid = NULL; virCPUx86ModelPtr diff = NULL; virCPUx86ModelPtr guest_model = NULL; - virCPUx86Data guestData = VIR_CPU_X86_DATA_INIT; + virCPUDataPtr guestData = NULL; virCPUCompareResult ret; virCPUx86CompareResult result; virArch arch; @@ -1633,9 +1621,11 @@ x86Compute(virCPUDefPtr host, x86DataSubtract(&guest_model->data, &cpu_disable->data); - if (x86DataCopy(&guestData, &guest_model->data) < 0 || - !(*guest = virCPUx86MakeData(arch, &guestData))) + if (!(guestData = virCPUDataNew(arch)) || + x86DataCopy(&guestData->data.x86, &guest_model->data) < 0) goto error; + + *guest = guestData; } cleanup: @@ -1647,11 +1637,11 @@ x86Compute(virCPUDefPtr host, x86ModelFree(cpu_disable); x86ModelFree(cpu_forbid); x86ModelFree(guest_model); - virCPUx86DataClear(&guestData); return ret; error: + x86FreeCPUData(guestData); ret = VIR_CPU_COMPARE_ERROR; goto cleanup; } @@ -1958,12 +1948,12 @@ x86Encode(virArch arch, virCPUDataPtr *vendor) { virCPUx86MapPtr map = NULL; - virCPUx86Data data_forced = VIR_CPU_X86_DATA_INIT; - virCPUx86Data data_required = VIR_CPU_X86_DATA_INIT; - virCPUx86Data data_optional = VIR_CPU_X86_DATA_INIT; - virCPUx86Data data_disabled = VIR_CPU_X86_DATA_INIT; - virCPUx86Data data_forbidden = VIR_CPU_X86_DATA_INIT; - virCPUx86Data data_vendor = VIR_CPU_X86_DATA_INIT; + virCPUDataPtr data_forced = NULL; + virCPUDataPtr data_required = NULL; + virCPUDataPtr data_optional = NULL; + virCPUDataPtr data_disabled = NULL; + virCPUDataPtr data_forbidden = NULL; + virCPUDataPtr data_vendor = NULL; if (forced) *forced = NULL; @@ -1982,23 +1972,33 @@ x86Encode(virArch arch, goto error; if (forced && - x86EncodePolicy(&data_forced, cpu, map, VIR_CPU_FEATURE_FORCE) < 0) + (!(data_forced = virCPUDataNew(arch)) || + x86EncodePolicy(&data_forced->data.x86, cpu, map, + VIR_CPU_FEATURE_FORCE) < 0)) goto error; if (required && - x86EncodePolicy(&data_required, cpu, map, VIR_CPU_FEATURE_REQUIRE) < 0) + (!(data_required = virCPUDataNew(arch)) || + x86EncodePolicy(&data_required->data.x86, cpu, map, + VIR_CPU_FEATURE_REQUIRE) < 0)) goto error; if (optional && - x86EncodePolicy(&data_optional, cpu, map, VIR_CPU_FEATURE_OPTIONAL) < 0) + (!(data_optional = virCPUDataNew(arch)) || + x86EncodePolicy(&data_optional->data.x86, cpu, map, + VIR_CPU_FEATURE_OPTIONAL) < 0)) goto error; if (disabled && - x86EncodePolicy(&data_disabled, cpu, map, VIR_CPU_FEATURE_DISABLE) < 0) + (!(data_disabled = virCPUDataNew(arch)) || + x86EncodePolicy(&data_disabled->data.x86, cpu, map, + VIR_CPU_FEATURE_DISABLE) < 0)) goto error; if (forbidden && - x86EncodePolicy(&data_forbidden, cpu, map, VIR_CPU_FEATURE_FORBID) < 0) + (!(data_forbidden = virCPUDataNew(arch)) || + x86EncodePolicy(&data_forbidden->data.x86, cpu, map, + VIR_CPU_FEATURE_FORBID) < 0)) goto error; if (vendor) { @@ -2010,50 +2010,35 @@ x86Encode(virArch arch, goto error; } - if (v && virCPUx86DataAddCPUID(&data_vendor, &v->cpuid) < 0) + if (!(data_vendor = virCPUDataNew(arch))) + goto error; + + if (v && virCPUx86DataAddCPUID(&data_vendor->data.x86, &v->cpuid) < 0) goto error; } - if (forced && - !(*forced = virCPUx86MakeData(arch, &data_forced))) - goto error; - if (required && - !(*required = virCPUx86MakeData(arch, &data_required))) - goto error; - if (optional && - !(*optional = virCPUx86MakeData(arch, &data_optional))) - goto error; - if (disabled && - !(*disabled = virCPUx86MakeData(arch, &data_disabled))) - goto error; - if (forbidden && - !(*forbidden = virCPUx86MakeData(arch, &data_forbidden))) - goto error; - if (vendor && - !(*vendor = virCPUx86MakeData(arch, &data_vendor))) - goto error; + if (forced) + *forced = data_forced; + if (required) + *required = data_required; + if (optional) + *optional = data_optional; + if (disabled) + *disabled = data_disabled; + if (forbidden) + *forbidden = data_forbidden; + if (vendor) + *vendor = data_vendor; return 0; error: - virCPUx86DataClear(&data_forced); - virCPUx86DataClear(&data_required); - virCPUx86DataClear(&data_optional); - virCPUx86DataClear(&data_disabled); - virCPUx86DataClear(&data_forbidden); - virCPUx86DataClear(&data_vendor); - if (forced) - x86FreeCPUData(*forced); - if (required) - x86FreeCPUData(*required); - if (optional) - x86FreeCPUData(*optional); - if (disabled) - x86FreeCPUData(*disabled); - if (forbidden) - x86FreeCPUData(*forbidden); - if (vendor) - x86FreeCPUData(*vendor); + x86FreeCPUData(data_forced); + x86FreeCPUData(data_required); + x86FreeCPUData(data_optional); + x86FreeCPUData(data_disabled); + x86FreeCPUData(data_forbidden); + x86FreeCPUData(data_vendor); return -1; } @@ -2382,22 +2367,20 @@ static virCPUDataPtr x86NodeData(virArch arch) { virCPUDataPtr cpuData = NULL; - virCPUx86Data data = VIR_CPU_X86_DATA_INIT; - if (cpuidSet(CPUX86_BASIC, &data) < 0) + if (!(cpuData = virCPUDataNew(arch))) goto error; - if (cpuidSet(CPUX86_EXTENDED, &data) < 0) + if (cpuidSet(CPUX86_BASIC, &cpuData->data.x86) < 0) goto error; - if (!(cpuData = virCPUx86MakeData(arch, &data))) + if (cpuidSet(CPUX86_EXTENDED, &cpuData->data.x86) < 0) goto error; return cpuData; error: - virCPUx86DataClear(&data); - + x86FreeCPUData(cpuData); return NULL; } #endif diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h index 09b95a5a2..8c8c6ed4f 100644 --- a/src/cpu/cpu_x86.h +++ b/src/cpu/cpu_x86.h @@ -34,7 +34,4 @@ int virCPUx86DataAddCPUID(virCPUx86Data *data, void virCPUx86DataClear(virCPUx86Data *data); -virCPUDataPtr virCPUx86MakeData(virArch arch, - virCPUx86Data *data); - #endif /* __VIR_CPU_X86_H__ */ diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 07a35333b..2005569aa 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1004,7 +1004,6 @@ virCPUUpdate; # cpu/cpu_x86.h virCPUx86DataAddCPUID; virCPUx86DataClear; -virCPUx86MakeData; # datatypes.h diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index 2bbd2d1b4..622e9f6bb 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -65,14 +65,14 @@ struct guest_arch { #define XEN_CAP_REGEX "(xen|hvm)-[[:digit:]]+\\.[[:digit:]]+-(aarch64|armv7l|x86_32|x86_64|ia64|powerpc64)(p|be)?" static int -libxlCapsAddCPUID(virCPUx86Data *data, virCPUx86CPUID *cpuid, ssize_t ncaps) +libxlCapsAddCPUID(virCPUDataPtr data, virCPUx86CPUID *cpuid, ssize_t ncaps) { size_t i; for (i = 0; i < ncaps; i++) { virCPUx86CPUID *c = &cpuid[i]; - if (virCPUx86DataAddCPUID(data, c) < 0) { + if (virCPUx86DataAddCPUID(&data->data.x86, c) < 0) { VIR_DEBUG("Failed to add CPUID(%x,%x)", c->eax_in, c->ecx_in); return -1; } @@ -112,7 +112,6 @@ libxlCapsNodeData(virCPUDefPtr cpu, libxl_hwcap hwcap, { ssize_t ncaps; virCPUDataPtr cpudata = NULL; - virCPUx86Data data = VIR_CPU_X86_DATA_INIT; virCPUx86CPUID cpuid[] = { { .eax_in = 0x00000001, .edx = hwcap[0] }, @@ -131,20 +130,23 @@ libxlCapsNodeData(virCPUDefPtr cpu, libxl_hwcap hwcap, { .eax_in = 0x80000007, .ecx_in = 0U, .edx = hwcap[7] }, }; + if (!(cpudata = virCPUDataNew(cpu->arch))) + goto error; + ncaps = ARRAY_CARDINALITY(cpuid); - if (libxlCapsAddCPUID(&data, cpuid, ncaps) < 0) + if (libxlCapsAddCPUID(cpudata, cpuid, ncaps) < 0) goto error; ncaps = ARRAY_CARDINALITY(cpuid_ver1); if (version > LIBXL_HWCAP_V0 && - libxlCapsAddCPUID(&data, cpuid_ver1, ncaps) < 0) + libxlCapsAddCPUID(cpudata, cpuid_ver1, ncaps) < 0) goto error; - cpudata = virCPUx86MakeData(cpu->arch, &data); + return cpudata; error: - virCPUx86DataClear(&data); - return cpudata; + cpuDataFree(cpudata); + return NULL; } /* hw_caps is an array of 32-bit words whose meaning is listed in diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index b6a4824d6..24c1e600a 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -6570,37 +6570,35 @@ qemuMonitorJSONParseCPUx86FeatureWord(virJSONValuePtr data, } -static int -qemuMonitorJSONParseCPUx86Features(virJSONValuePtr data, - virCPUDataPtr *cpudata) +static virCPUDataPtr +qemuMonitorJSONParseCPUx86Features(virJSONValuePtr data) { - virCPUx86Data x86Data = VIR_CPU_X86_DATA_INIT; + virCPUDataPtr cpudata = NULL; virCPUx86CPUID cpuid; size_t i; ssize_t n; - int ret = -1; if (!data || (n = virJSONValueArraySize(data)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("invalid array of CPUID features")); - return -1; + goto error; } + if (!(cpudata = virCPUDataNew(VIR_ARCH_X86_64))) + goto error; + for (i = 0; i < n; i++) { if (qemuMonitorJSONParseCPUx86FeatureWord(virJSONValueArrayGet(data, i), &cpuid) < 0 || - virCPUx86DataAddCPUID(&x86Data, &cpuid) < 0) - goto cleanup; + virCPUx86DataAddCPUID(&cpudata->data.x86, &cpuid) < 0) + goto error; } - if (!(*cpudata = virCPUx86MakeData(VIR_ARCH_X86_64, &x86Data))) - goto cleanup; + return cpudata; - ret = 0; - - cleanup: - virCPUx86DataClear(&x86Data); - return ret; + error: + cpuDataFree(cpudata); + return NULL; } @@ -6627,7 +6625,10 @@ qemuMonitorJSONGetCPUx86Data(qemuMonitorPtr mon, goto cleanup; data = virJSONValueObjectGetArray(reply, "return"); - ret = qemuMonitorJSONParseCPUx86Features(data, cpudata); + if (!(*cpudata = qemuMonitorJSONParseCPUx86Features(data))) + goto cleanup; + + ret = 0; cleanup: virJSONValueFree(cmd); -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:08PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - no change
src/cpu/cpu_x86.c | 147 ++++++++++++++++++----------------------- src/cpu/cpu_x86.h | 3 - src/libvirt_private.syms | 1 - src/libxl/libxl_capabilities.c | 18 ++--- src/qemu/qemu_monitor_json.c | 33 ++++----- 5 files changed, 92 insertions(+), 110 deletions(-)
ACK Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - ACKed in v2 - no change Version 2: - no change src/cpu/cpu_x86.c | 2 +- src/cpu/cpu_x86.h | 2 -- src/libvirt_private.syms | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index ccd68b681..0058abef7 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -293,7 +293,7 @@ x86DataCpuid(const virCPUx86Data *data, return NULL; } -void +static void virCPUx86DataClear(virCPUx86Data *data) { if (!data) diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h index 8c8c6ed4f..bcda0da95 100644 --- a/src/cpu/cpu_x86.h +++ b/src/cpu/cpu_x86.h @@ -32,6 +32,4 @@ extern struct cpuArchDriver cpuDriverX86; int virCPUx86DataAddCPUID(virCPUx86Data *data, const virCPUx86CPUID *cpuid); -void virCPUx86DataClear(virCPUx86Data *data); - #endif /* __VIR_CPU_X86_H__ */ diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 2005569aa..67a17c35f 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1003,7 +1003,6 @@ virCPUUpdate; # cpu/cpu_x86.h virCPUx86DataAddCPUID; -virCPUx86DataClear; # datatypes.h -- 2.11.1

The new API is called virCPUDataFree. Individual CPU drivers are no longer required to implement their own freeing function unless they need to free architecture specific data from virCPUData. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - ACKed in v2 - no change Version 2: - no change src/bhyve/bhyve_capabilities.c | 2 +- src/cpu/cpu.c | 21 +++++++-------------- src/cpu/cpu.h | 4 ++-- src/cpu/cpu_arm.c | 7 ------- src/cpu/cpu_ppc64.c | 6 +++--- src/cpu/cpu_s390.c | 7 ------- src/cpu/cpu_x86.c | 22 +++++++++++----------- src/libvirt_private.syms | 2 +- src/libxl/libxl_capabilities.c | 4 ++-- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_monitor_json.c | 2 +- src/qemu/qemu_parse_command.c | 2 +- src/qemu/qemu_process.c | 2 +- src/vmware/vmware_conf.c | 2 +- src/vz/vz_driver.c | 2 +- tests/cputest.c | 6 +++--- tests/qemumonitorjsontest.c | 4 ++-- 17 files changed, 38 insertions(+), 59 deletions(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index 1dc0593af..52d6ca782 100644 --- a/src/bhyve/bhyve_capabilities.c +++ b/src/bhyve/bhyve_capabilities.c @@ -68,7 +68,7 @@ virBhyveCapsInitCPU(virCapsPtr caps, ret = 0; cleanup: - cpuDataFree(data); + virCPUDataFree(data); return ret; diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 6a808a0c1..051a58040 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -331,7 +331,7 @@ virCPUDataNew(virArch arch) /** - * cpuDataFree: + * virCPUDataFree: * * @data: CPU data structure to be freed * @@ -340,26 +340,19 @@ virCPUDataNew(virArch arch) * Returns nothing. */ void -cpuDataFree(virCPUDataPtr data) +virCPUDataFree(virCPUDataPtr data) { struct cpuArchDriver *driver; VIR_DEBUG("data=%p", data); - if (data == NULL) + if (!data) return; - if ((driver = cpuGetSubDriver(data->arch)) == NULL) - return; - - if (driver->free == NULL) { - virReportError(VIR_ERR_NO_SUPPORT, - _("cannot free CPU data for %s architecture"), - virArchToString(data->arch)); - return; - } - - (driver->free)(data); + if ((driver = cpuGetSubDriver(data->arch)) && driver->dataFree) + driver->dataFree(data); + else + VIR_FREE(data); } diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index ceb1e7256..0324284b9 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -116,7 +116,7 @@ struct cpuArchDriver { virCPUArchCompare compare; cpuArchDecode decode; cpuArchEncode encode; - cpuArchDataFree free; + cpuArchDataFree dataFree; cpuArchNodeData nodeData; cpuArchBaseline baseline; virCPUArchUpdate update; @@ -166,7 +166,7 @@ virCPUDataPtr virCPUDataNew(virArch arch); void -cpuDataFree (virCPUDataPtr data); +virCPUDataFree(virCPUDataPtr data); virCPUDataPtr cpuNodeData (virArch arch); diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c index 653b06b2f..3a0ee2b14 100644 --- a/src/cpu/cpu_arm.c +++ b/src/cpu/cpu_arm.c @@ -37,12 +37,6 @@ static const virArch archs[] = { VIR_ARCH_AARCH64, }; -static void -armDataFree(virCPUDataPtr data) -{ - VIR_FREE(data); -} - static int virCPUarmUpdate(virCPUDefPtr guest, @@ -117,7 +111,6 @@ struct cpuArchDriver cpuDriverArm = { .compare = virCPUarmCompare, .decode = NULL, .encode = NULL, - .free = armDataFree, .nodeData = NULL, .baseline = armBaseline, .update = virCPUarmUpdate, diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 180ad87d1..a7c8545db 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -705,7 +705,7 @@ ppc64DriverDecode(virCPUDefPtr cpu, } static void -ppc64DriverFree(virCPUDataPtr data) +virCPUppc64DataFree(virCPUDataPtr data) { if (!data) return; @@ -741,7 +741,7 @@ ppc64DriverNodeData(virArch arch) return nodeData; error: - ppc64DriverFree(nodeData); + virCPUppc64DataFree(nodeData); return NULL; } @@ -901,7 +901,7 @@ struct cpuArchDriver cpuDriverPPC64 = { .compare = virCPUppc64Compare, .decode = ppc64DriverDecode, .encode = NULL, - .free = ppc64DriverFree, + .dataFree = virCPUppc64DataFree, .nodeData = ppc64DriverNodeData, .baseline = ppc64DriverBaseline, .update = virCPUppc64Update, diff --git a/src/cpu/cpu_s390.c b/src/cpu/cpu_s390.c index 0248328db..9503e8e2b 100644 --- a/src/cpu/cpu_s390.c +++ b/src/cpu/cpu_s390.c @@ -33,12 +33,6 @@ static const virArch archs[] = { VIR_ARCH_S390, VIR_ARCH_S390X }; -static void -s390DataFree(virCPUDataPtr data) -{ - VIR_FREE(data); -} - static virCPUCompareResult virCPUs390Compare(virCPUDefPtr host ATTRIBUTE_UNUSED, virCPUDefPtr cpu ATTRIBUTE_UNUSED, @@ -115,7 +109,6 @@ struct cpuArchDriver cpuDriverS390 = { .compare = virCPUs390Compare, .decode = NULL, .encode = NULL, - .free = s390DataFree, .nodeData = NULL, .baseline = NULL, .update = virCPUs390Update, diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 0058abef7..3b540f99c 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -304,7 +304,7 @@ virCPUx86DataClear(virCPUx86Data *data) static void -x86FreeCPUData(virCPUDataPtr data) +virCPUx86DataFree(virCPUDataPtr data) { if (!data) return; @@ -1455,7 +1455,7 @@ virCPUx86DataParse(xmlXPathContextPtr ctxt) return cpuData; error: - x86FreeCPUData(cpuData); + virCPUx86DataFree(cpuData); cpuData = NULL; goto cleanup; } @@ -1641,7 +1641,7 @@ x86Compute(virCPUDefPtr host, return ret; error: - x86FreeCPUData(guestData); + virCPUx86DataFree(guestData); ret = VIR_CPU_COMPARE_ERROR; goto cleanup; } @@ -2033,12 +2033,12 @@ x86Encode(virArch arch, return 0; error: - x86FreeCPUData(data_forced); - x86FreeCPUData(data_required); - x86FreeCPUData(data_optional); - x86FreeCPUData(data_disabled); - x86FreeCPUData(data_forbidden); - x86FreeCPUData(data_vendor); + virCPUx86DataFree(data_forced); + virCPUx86DataFree(data_required); + virCPUx86DataFree(data_optional); + virCPUx86DataFree(data_disabled); + virCPUx86DataFree(data_forbidden); + virCPUx86DataFree(data_vendor); return -1; } @@ -2380,7 +2380,7 @@ x86NodeData(virArch arch) return cpuData; error: - x86FreeCPUData(cpuData); + virCPUx86DataFree(cpuData); return NULL; } #endif @@ -2718,7 +2718,7 @@ struct cpuArchDriver cpuDriverX86 = { .compare = virCPUx86Compare, .decode = x86DecodeCPUData, .encode = x86Encode, - .free = x86FreeCPUData, + .dataFree = virCPUx86DataFree, #if defined(__i386__) || defined(__x86_64__) .nodeData = x86NodeData, #else diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 67a17c35f..145e23bd8 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -984,7 +984,6 @@ virSecretObjSetValueSize; # cpu/cpu.h cpuBaseline; cpuBaselineXML; -cpuDataFree; cpuDecode; cpuEncode; cpuNodeData; @@ -994,6 +993,7 @@ virCPUCompareXML; virCPUConvertLegacy; virCPUDataCheckFeature; virCPUDataFormat; +virCPUDataFree; virCPUDataNew; virCPUDataParse; virCPUGetModels; diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index 622e9f6bb..117055cf2 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -145,7 +145,7 @@ libxlCapsNodeData(virCPUDefPtr cpu, libxl_hwcap hwcap, return cpudata; error: - cpuDataFree(cpudata); + virCPUDataFree(cpudata); return NULL; } @@ -198,7 +198,7 @@ libxlCapsInitCPU(virCapsPtr caps, libxl_physinfo *phy_info, } cleanup: - cpuDataFree(data); + virCPUDataFree(data); return ret; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f31a9ce6e..5c0353159 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1092,7 +1092,7 @@ virQEMUCapsInitCPU(virCapsPtr caps, ret = 0; cleanup: - cpuDataFree(data); + virCPUDataFree(data); return ret; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 24c1e600a..c8e1764f8 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -6597,7 +6597,7 @@ qemuMonitorJSONParseCPUx86Features(virJSONValuePtr data) return cpudata; error: - cpuDataFree(cpudata); + virCPUDataFree(cpudata); return NULL; } diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index 405e65549..a215027c1 100644 --- a/src/qemu/qemu_parse_command.c +++ b/src/qemu/qemu_parse_command.c @@ -1606,7 +1606,7 @@ qemuParseCommandLineCPU(virDomainDefPtr dom, goto cleanup; is_32bit = (virCPUDataCheckFeature(cpuData, "lm") != 1); - cpuDataFree(cpuData); + virCPUDataFree(cpuData); } else if (model) { is_32bit = STREQ(model, "qemu32"); } diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1d7128037..82ff95d20 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3816,7 +3816,7 @@ qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver, ret = true; cleanup: - cpuDataFree(guestcpu); + virCPUDataFree(guestcpu); return ret; } diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 4222f4e38..5b1b5f5fd 100644 --- a/src/vmware/vmware_conf.c +++ b/src/vmware/vmware_conf.c @@ -118,7 +118,7 @@ vmwareCapsInit(void) cleanup: virCPUDefFree(cpu); - cpuDataFree(data); + virCPUDataFree(data); return caps; diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 440859117..1ca9fd726 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -151,7 +151,7 @@ vzBuildCapabilities(void) } cleanup: - cpuDataFree(data); + virCPUDataFree(data); return caps; error: diff --git a/tests/cputest.c b/tests/cputest.c index 8612e920e..8d761af61 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -439,7 +439,7 @@ cpuTestHasFeature(const void *arg) ret = 0; cleanup: - cpuDataFree(hostData); + virCPUDataFree(hostData); virCPUDefFree(host); return ret; } @@ -489,7 +489,7 @@ cpuTestCPUID(bool guest, const void *arg) cleanup: VIR_FREE(hostFile); VIR_FREE(host); - cpuDataFree(hostData); + virCPUDataFree(hostData); virCPUDefFree(cpu); VIR_FREE(result); return ret; @@ -549,7 +549,7 @@ cpuTestJSONCPUID(const void *arg) cleanup: qemuMonitorTestFree(testMon); - cpuDataFree(cpuData); + virCPUDataFree(cpuData); virCPUDefFree(cpu); VIR_FREE(result); VIR_FREE(json); diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 5b2d6bb34..402c87d45 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2410,7 +2410,7 @@ testQemuMonitorJSONGetCPUData(const void *opaque) VIR_FREE(dataFile); VIR_FREE(jsonStr); VIR_FREE(actual); - cpuDataFree(cpuData); + virCPUDataFree(cpuData); qemuMonitorTestFree(test); return ret; } @@ -2455,7 +2455,7 @@ testQemuMonitorJSONGetNonExistingCPUData(const void *opaque) ret = 0; cleanup: qemuMonitorTestFree(test); - cpuDataFree(cpuData); + virCPUDataFree(cpuData); return ret; } -- 2.11.1

The CPU driver provides APIs to create and free virCPUDataPtr. Thus all APIs exported from the driver should work with that rather than requiring the caller to pass a pointer to an internal part of the structure. In other words virCPUx86DataAddCPUID(cpudata, &cpuid) is much better than the original virCPUx86DataAddCPUID(&cpudata->data.x86, &cpuid) Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - ACKed in v2 - better commit message Version 2: - no change src/cpu/cpu_x86.c | 57 ++++++++++++++++++++++++------------------ src/cpu/cpu_x86.h | 2 +- src/libxl/libxl_capabilities.c | 2 +- src/qemu/qemu_monitor_json.c | 2 +- 4 files changed, 36 insertions(+), 27 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 3b540f99c..029a7d475 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -330,9 +330,9 @@ x86DataCopy(virCPUx86Data *dst, const virCPUx86Data *src) } -int -virCPUx86DataAddCPUID(virCPUx86Data *data, - const virCPUx86CPUID *cpuid) +static int +virCPUx86DataAddCPUIDInt(virCPUx86Data *data, + const virCPUx86CPUID *cpuid) { virCPUx86CPUID *existing; @@ -365,7 +365,7 @@ x86DataAdd(virCPUx86Data *data1, if (cpuid1) { x86cpuidSetBits(cpuid1, cpuid2); } else { - if (virCPUx86DataAddCPUID(data1, cpuid2) < 0) + if (virCPUx86DataAddCPUIDInt(data1, cpuid2) < 0) return -1; } } @@ -549,7 +549,7 @@ x86DataAddSignature(virCPUx86Data *data, { virCPUx86CPUID cpuid = { .eax_in = 0x1, .eax = signature }; - return virCPUx86DataAddCPUID(data, &cpuid); + return virCPUx86DataAddCPUIDInt(data, &cpuid); } @@ -892,7 +892,7 @@ x86FeatureParse(xmlXPathContextPtr ctxt, i, feature->name); goto error; } - if (virCPUx86DataAddCPUID(&feature->data, &cpuid)) + if (virCPUx86DataAddCPUIDInt(&feature->data, &cpuid)) goto error; } @@ -1446,7 +1446,7 @@ virCPUx86DataParse(xmlXPathContextPtr ctxt) _("failed to parse cpuid[%zu]"), i); goto error; } - if (virCPUx86DataAddCPUID(&cpuData->data.x86, &cpuid) < 0) + if (virCPUx86DataAddCPUID(cpuData, &cpuid) < 0) goto error; } @@ -1605,8 +1605,8 @@ x86Compute(virCPUDefPtr host, goto error; if (cpu->vendor && host_model->vendor && - virCPUx86DataAddCPUID(&guest_model->data, - &host_model->vendor->cpuid) < 0) + virCPUx86DataAddCPUIDInt(&guest_model->data, + &host_model->vendor->cpuid) < 0) goto error; if (x86DataAddSignature(&guest_model->data, host_model->signature) < 0) @@ -2013,7 +2013,7 @@ x86Encode(virArch arch, if (!(data_vendor = virCPUDataNew(arch))) goto error; - if (v && virCPUx86DataAddCPUID(&data_vendor->data.x86, &v->cpuid) < 0) + if (v && virCPUx86DataAddCPUID(data_vendor, &v->cpuid) < 0) goto error; } @@ -2083,7 +2083,7 @@ cpuidCall(virCPUx86CPUID *cpuid) * Sub leaf n+1 is invalid if eax[4:0] in sub leaf n equals 0. */ static int -cpuidSetLeaf4(virCPUx86Data *data, +cpuidSetLeaf4(virCPUDataPtr data, virCPUx86CPUID *subLeaf0) { virCPUx86CPUID cpuid = *subLeaf0; @@ -2106,7 +2106,7 @@ cpuidSetLeaf4(virCPUx86Data *data, * Sub leaf n is invalid if n > eax in sub leaf 0. */ static int -cpuidSetLeaf7(virCPUx86Data *data, +cpuidSetLeaf7(virCPUDataPtr data, virCPUx86CPUID *subLeaf0) { virCPUx86CPUID cpuid = { .eax_in = 0x7 }; @@ -2133,7 +2133,7 @@ cpuidSetLeaf7(virCPUx86Data *data, * meaningful data even if it was (theoretically) considered invalid. */ static int -cpuidSetLeafB(virCPUx86Data *data, +cpuidSetLeafB(virCPUDataPtr data, virCPUx86CPUID *subLeaf0) { virCPUx86CPUID cpuid = *subLeaf0; @@ -2157,7 +2157,7 @@ cpuidSetLeafB(virCPUx86Data *data, * and edx[n-32] from sub leaf 1 is not set. */ static int -cpuidSetLeafD(virCPUx86Data *data, +cpuidSetLeafD(virCPUDataPtr data, virCPUx86CPUID *subLeaf0) { virCPUx86CPUID cpuid = { .eax_in = 0xd }; @@ -2204,7 +2204,7 @@ cpuidSetLeafD(virCPUx86Data *data, * 0x10: Sub leaf n is valid if ebx[n] (= res[ResID]) from sub leaf 0 is set. */ static int -cpuidSetLeafResID(virCPUx86Data *data, +cpuidSetLeafResID(virCPUDataPtr data, virCPUx86CPUID *subLeaf0, uint32_t res) { @@ -2232,13 +2232,13 @@ cpuidSetLeafResID(virCPUx86Data *data, * Sub leaves n >= 2 are valid as long as eax[3:0] != 0. */ static int -cpuidSetLeaf12(virCPUx86Data *data, +cpuidSetLeaf12(virCPUDataPtr data, virCPUx86CPUID *subLeaf0) { virCPUx86CPUID cpuid = { .eax_in = 0x7 }; virCPUx86CPUID *cpuid7; - if (!(cpuid7 = x86DataCpuid(data, &cpuid)) || + if (!(cpuid7 = x86DataCpuid(&data->data.x86, &cpuid)) || !(cpuid7->ebx & (1 << 2))) return 0; @@ -2268,7 +2268,7 @@ cpuidSetLeaf12(virCPUx86Data *data, * Sub leaf 0 reports the maximum supported sub leaf in eax. */ static int -cpuidSetLeaf14(virCPUx86Data *data, +cpuidSetLeaf14(virCPUDataPtr data, virCPUx86CPUID *subLeaf0) { virCPUx86CPUID cpuid = { .eax_in = 0x14 }; @@ -2293,7 +2293,7 @@ cpuidSetLeaf14(virCPUx86Data *data, * Sub leaf 0 reports the maximum supported sub leaf in eax. */ static int -cpuidSetLeaf17(virCPUx86Data *data, +cpuidSetLeaf17(virCPUDataPtr data, virCPUx86CPUID *subLeaf0) { virCPUx86CPUID cpuid = { .eax_in = 0x17 }; @@ -2316,7 +2316,7 @@ cpuidSetLeaf17(virCPUx86Data *data, static int -cpuidSet(uint32_t base, virCPUx86Data *data) +cpuidSet(uint32_t base, virCPUDataPtr data) { int rc; uint32_t max; @@ -2371,10 +2371,10 @@ x86NodeData(virArch arch) if (!(cpuData = virCPUDataNew(arch))) goto error; - if (cpuidSet(CPUX86_BASIC, &cpuData->data.x86) < 0) + if (cpuidSet(CPUX86_BASIC, cpuData) < 0) goto error; - if (cpuidSet(CPUX86_EXTENDED, &cpuData->data.x86) < 0) + if (cpuidSet(CPUX86_EXTENDED, cpuData) < 0) goto error; return cpuData; @@ -2484,7 +2484,8 @@ x86Baseline(virCPUDefPtr *cpus, goto error; } - if (vendor && virCPUx86DataAddCPUID(&base_model->data, &vendor->cpuid) < 0) + if (vendor && + virCPUx86DataAddCPUIDInt(&base_model->data, &vendor->cpuid) < 0) goto error; if (x86Decode(cpu, &base_model->data, models, nmodels, modelName, flags) < 0) @@ -2683,7 +2684,7 @@ virCPUx86Translate(virCPUDefPtr cpu, goto cleanup; if (model->vendor && - virCPUx86DataAddCPUID(&model->data, &model->vendor->cpuid) < 0) + virCPUx86DataAddCPUIDInt(&model->data, &model->vendor->cpuid) < 0) goto cleanup; if (x86DataAddSignature(&model->data, model->signature) < 0) @@ -2711,6 +2712,14 @@ virCPUx86Translate(virCPUDefPtr cpu, } +int +virCPUx86DataAddCPUID(virCPUDataPtr cpuData, + const virCPUx86CPUID *cpuid) +{ + return virCPUx86DataAddCPUIDInt(&cpuData->data.x86, cpuid); +} + + struct cpuArchDriver cpuDriverX86 = { .name = "x86", .arch = archs, diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h index bcda0da95..79e78a007 100644 --- a/src/cpu/cpu_x86.h +++ b/src/cpu/cpu_x86.h @@ -29,7 +29,7 @@ extern struct cpuArchDriver cpuDriverX86; -int virCPUx86DataAddCPUID(virCPUx86Data *data, +int virCPUx86DataAddCPUID(virCPUDataPtr cpuData, const virCPUx86CPUID *cpuid); #endif /* __VIR_CPU_X86_H__ */ diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index 117055cf2..839a2ee81 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -72,7 +72,7 @@ libxlCapsAddCPUID(virCPUDataPtr data, virCPUx86CPUID *cpuid, ssize_t ncaps) for (i = 0; i < ncaps; i++) { virCPUx86CPUID *c = &cpuid[i]; - if (virCPUx86DataAddCPUID(&data->data.x86, c) < 0) { + if (virCPUx86DataAddCPUID(data, c) < 0) { VIR_DEBUG("Failed to add CPUID(%x,%x)", c->eax_in, c->ecx_in); return -1; } diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index c8e1764f8..56635979a 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -6590,7 +6590,7 @@ qemuMonitorJSONParseCPUx86Features(virJSONValuePtr data) for (i = 0; i < n; i++) { if (qemuMonitorJSONParseCPUx86FeatureWord(virJSONValueArrayGet(data, i), &cpuid) < 0 || - virCPUx86DataAddCPUID(&cpudata->data.x86, &cpuid) < 0) + virCPUx86DataAddCPUID(cpudata, &cpuid) < 0) goto error; } -- 2.11.1

The API is useful for creating virCPUData in a hypervisor driver from data we got by querying the hypervisor. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - ACKed in v2 - better commit message - #include "cpu/cpu_x86.h" in qemu_capabilities.c moved to the patch which makes use of the API Version 2: - no change src/cpu/cpu_x86.c | 11 +++++++++++ src/cpu/cpu_x86.h | 4 ++++ src/libvirt_private.syms | 1 + 3 files changed, 16 insertions(+) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 029a7d475..e3f860bc6 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -2720,6 +2720,17 @@ virCPUx86DataAddCPUID(virCPUDataPtr cpuData, } +int +virCPUx86DataSetSignature(virCPUDataPtr cpuData, + unsigned int family, + unsigned int model) +{ + uint32_t signature = x86MakeSignature(family, model); + + return x86DataAddSignature(&cpuData->data.x86, signature); +} + + struct cpuArchDriver cpuDriverX86 = { .name = "x86", .arch = archs, diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h index 79e78a007..ffbd064b4 100644 --- a/src/cpu/cpu_x86.h +++ b/src/cpu/cpu_x86.h @@ -32,4 +32,8 @@ extern struct cpuArchDriver cpuDriverX86; int virCPUx86DataAddCPUID(virCPUDataPtr cpuData, const virCPUx86CPUID *cpuid); +int virCPUx86DataSetSignature(virCPUDataPtr cpuData, + unsigned int family, + unsigned int model); + #endif /* __VIR_CPU_X86_H__ */ diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 145e23bd8..71eb97f01 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1003,6 +1003,7 @@ virCPUUpdate; # cpu/cpu_x86.h virCPUx86DataAddCPUID; +virCPUx86DataSetSignature; # datatypes.h -- 2.11.1

The API is useful for creating virCPUData in a hypervisor driver from data we got by querying the hypervisor. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - ACKed in v2 - better commit message Version 2: - no change src/cpu/cpu_x86.c | 45 +++++++++++++++++++++++++++++++++++---------- src/cpu/cpu_x86.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index e3f860bc6..ab5e5257d 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -478,6 +478,26 @@ x86DataToVendor(const virCPUx86Data *data, } +static int +virCPUx86VendorToCPUID(const char *vendor, + virCPUx86CPUID *cpuid) +{ + if (strlen(vendor) != VENDOR_STRING_LENGTH) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Invalid CPU vendor string '%s'"), vendor); + return -1; + } + + cpuid->eax_in = 0; + cpuid->ecx_in = 0; + cpuid->ebx = virReadBufInt32LE(vendor); + cpuid->edx = virReadBufInt32LE(vendor + 4); + cpuid->ecx = virReadBufInt32LE(vendor + 8); + + return 0; +} + + static uint32_t x86MakeSignature(unsigned int family, unsigned int model) @@ -651,17 +671,9 @@ x86VendorParse(xmlXPathContextPtr ctxt, vendor->name); goto error; } - if (strlen(string) != VENDOR_STRING_LENGTH) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid CPU vendor string '%s'"), string); - goto error; - } - vendor->cpuid.eax_in = 0; - vendor->cpuid.ecx_in = 0; - vendor->cpuid.ebx = virReadBufInt32LE(string); - vendor->cpuid.edx = virReadBufInt32LE(string + 4); - vendor->cpuid.ecx = virReadBufInt32LE(string + 8); + if (virCPUx86VendorToCPUID(string, &vendor->cpuid) < 0) + goto error; cleanup: VIR_FREE(string); @@ -2731,6 +2743,19 @@ virCPUx86DataSetSignature(virCPUDataPtr cpuData, } +int +virCPUx86DataSetVendor(virCPUDataPtr cpuData, + const char *vendor) +{ + virCPUx86CPUID cpuid = { 0 }; + + if (virCPUx86VendorToCPUID(vendor, &cpuid) < 0) + return -1; + + return virCPUx86DataAddCPUID(cpuData, &cpuid); +} + + struct cpuArchDriver cpuDriverX86 = { .name = "x86", .arch = archs, diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h index ffbd064b4..ab5394914 100644 --- a/src/cpu/cpu_x86.h +++ b/src/cpu/cpu_x86.h @@ -36,4 +36,7 @@ int virCPUx86DataSetSignature(virCPUDataPtr cpuData, unsigned int family, unsigned int model); +int virCPUx86DataSetVendor(virCPUDataPtr cpuData, + const char *vendor); + #endif /* __VIR_CPU_X86_H__ */ diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 71eb97f01..e39c89f0e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1004,6 +1004,7 @@ virCPUUpdate; # cpu/cpu_x86.h virCPUx86DataAddCPUID; virCPUx86DataSetSignature; +virCPUx86DataSetVendor; # datatypes.h -- 2.11.1

The API is useful for creating virCPUData in a hypervisor driver from data we got by querying the hypervisor. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - ACKed in v2 - better commit message Version 2: - no change src/cpu/cpu_x86.c | 22 ++++++++++++++++++++++ src/cpu/cpu_x86.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 26 insertions(+) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index ab5e5257d..b3bccd176 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -2756,6 +2756,28 @@ virCPUx86DataSetVendor(virCPUDataPtr cpuData, } +int +virCPUx86DataAddFeature(virCPUDataPtr cpuData, + const char *name) +{ + virCPUx86FeaturePtr feature; + virCPUx86MapPtr map; + + if (!(map = virCPUx86GetMap())) + return -1; + + /* ignore unknown features */ + if (!(feature = x86FeatureFind(map, name)) && + !(feature = x86FeatureFindInternal(name))) + return 0; + + if (x86DataAdd(&cpuData->data.x86, &feature->data) < 0) + return -1; + + return 0; +} + + struct cpuArchDriver cpuDriverX86 = { .name = "x86", .arch = archs, diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h index ab5394914..91ec43fea 100644 --- a/src/cpu/cpu_x86.h +++ b/src/cpu/cpu_x86.h @@ -39,4 +39,7 @@ int virCPUx86DataSetSignature(virCPUDataPtr cpuData, int virCPUx86DataSetVendor(virCPUDataPtr cpuData, const char *vendor); +int virCPUx86DataAddFeature(virCPUDataPtr cpuData, + const char *name); + #endif /* __VIR_CPU_X86_H__ */ diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index e39c89f0e..30679107e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1003,6 +1003,7 @@ virCPUUpdate; # cpu/cpu_x86.h virCPUx86DataAddCPUID; +virCPUx86DataAddFeature; virCPUx86DataSetSignature; virCPUx86DataSetVendor; -- 2.11.1

Until now host-model CPU mode tried to enable all CPU features supported by the host CPU even if QEMU/KVM did not support them. This caused a number of issues and made host-model quite unreliable. Asking QEMU for the CPU it can provide and the current host makes host-model much more robust. This commit fixes the following bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1018251 https://bugzilla.redhat.com/show_bug.cgi?id=1371617 https://bugzilla.redhat.com/show_bug.cgi?id=1372581 https://bugzilla.redhat.com/show_bug.cgi?id=1404627 https://bugzilla.redhat.com/show_bug.cgi?id=870071 In addition to that, the following bug should be mostly limited to cases when an unsupported feature is explicitly requested: https://bugzilla.redhat.com/show_bug.cgi?id=1335534 Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - added #include "cpu/cpu_x86.h" removed in an earlier patch - adapted to changes to qemuMonitorCPUModelProperty Version 2: - no change src/qemu/qemu_capabilities.c | 77 ++++++++++++++++++++++ .../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 33 +++++++++- tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 11 +++- 3 files changed, 119 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 5c0353159..adfe84bff 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -33,6 +33,7 @@ #include "virprocess.h" #include "nodeinfo.h" #include "cpu/cpu.h" +#include "cpu/cpu_x86.h" #include "domain_conf.h" #include "vircommand.h" #include "virbitmap.h" @@ -3129,6 +3130,80 @@ virQEMUCapsInitCPUModelS390(virQEMUCapsPtr qemuCaps, * -1 on error. */ static int +virQEMUCapsInitCPUModelX86(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, + virCPUDefPtr cpu) +{ + qemuMonitorCPUModelInfoPtr model; + virCPUDataPtr data = NULL; + unsigned long long sigFamily = 0; + unsigned long long sigModel = 0; + size_t nmodels = 0; + char **models = NULL; + int ret = -1; + size_t i; + + if (type == VIR_DOMAIN_VIRT_KVM) + model = qemuCaps->kvmCPUModelInfo; + else + model = qemuCaps->tcgCPUModelInfo; + + if (!model) + return 1; + + if (!(data = virCPUDataNew(VIR_ARCH_X86_64))) + goto cleanup; + + for (i = 0; i < model->nprops; i++) { + qemuMonitorCPUPropertyPtr prop = model->props + i; + + switch (prop->type) { + case QEMU_MONITOR_CPU_PROPERTY_BOOLEAN: + if (prop->value.boolean && + virCPUx86DataAddFeature(data, prop->name) < 0) + goto cleanup; + break; + + case QEMU_MONITOR_CPU_PROPERTY_STRING: + if (STREQ(prop->name, "vendor") && + virCPUx86DataSetVendor(data, prop->value.string) < 0) + goto cleanup; + break; + + case QEMU_MONITOR_CPU_PROPERTY_NUMBER: + if (STREQ(prop->name, "family")) + sigFamily = prop->value.number; + else if (STREQ(prop->name, "model")) + sigModel = prop->value.number; + break; + + case QEMU_MONITOR_CPU_PROPERTY_LAST: + break; + } + } + + if (virCPUx86DataSetSignature(data, sigFamily, sigModel) < 0) + goto cleanup; + + if (virQEMUCapsGetCPUDefinitions(qemuCaps, type, &models, &nmodels) < 0 || + cpuDecode(cpu, data, (const char **) models, nmodels, NULL) < 0) + goto cleanup; + + ret = 0; + + cleanup: + virCPUDataFree(data); + virStringListFreeCount(models, nmodels); + return ret; +} + + +/** + * Returns 0 when host CPU model provided by QEMU was filled in qemuCaps, + * 1 when the caller should fall back to using virCapsPtr->host.cpu, + * -1 on error. + */ +static int virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, virDomainVirtType type, virCPUDefPtr cpu) @@ -3137,6 +3212,8 @@ virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, if (ARCH_IS_S390(qemuCaps->arch)) ret = virQEMUCapsInitCPUModelS390(qemuCaps, type, cpu); + else if (ARCH_IS_X86(qemuCaps->arch)) + ret = virQEMUCapsInitCPUModelX86(qemuCaps, type, cpu); if (ret == 0) cpu->fallback = VIR_CPU_FALLBACK_FORBID; diff --git a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml index 9b9dfec09..1827b1d6f 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml @@ -21,7 +21,38 @@ <cpu> <mode name='host-passthrough' supported='no'/> <mode name='host-model' supported='yes'> - <model fallback='allow'>Broadwell</model> + <model fallback='forbid'>Opteron_G4</model> + <vendor>AMD</vendor> + <feature policy='require' name='acpi'/> + <feature policy='require' name='ss'/> + <feature policy='require' name='monitor'/> + <feature policy='require' name='movbe'/> + <feature policy='require' name='hypervisor'/> + <feature policy='require' name='arat'/> + <feature policy='require' name='fsgsbase'/> + <feature policy='require' name='bmi1'/> + <feature policy='require' name='smep'/> + <feature policy='require' name='bmi2'/> + <feature policy='require' name='erms'/> + <feature policy='require' name='mpx'/> + <feature policy='require' name='adx'/> + <feature policy='require' name='smap'/> + <feature policy='require' name='clflushopt'/> + <feature policy='require' name='pku'/> + <feature policy='require' name='ospke'/> + <feature policy='require' name='xsaveopt'/> + <feature policy='require' name='xgetbv1'/> + <feature policy='require' name='mmxext'/> + <feature policy='require' name='3dnowext'/> + <feature policy='require' name='3dnow'/> + <feature policy='require' name='cr8legacy'/> + <feature policy='disable' name='pclmuldq'/> + <feature policy='disable' name='avx'/> + <feature policy='disable' name='lahf_lm'/> + <feature policy='disable' name='misalignsse'/> + <feature policy='disable' name='3dnowprefetch'/> + <feature policy='disable' name='xop'/> + <feature policy='disable' name='fma4'/> </mode> <mode name='custom' supported='yes'> <model usable='yes'>qemu64</model> diff --git a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml index 49722f91f..a7a2ecdea 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml @@ -21,7 +21,16 @@ <cpu> <mode name='host-passthrough' supported='yes'/> <mode name='host-model' supported='yes'> - <model fallback='allow'>Broadwell</model> + <model fallback='forbid'>Skylake-Client</model> + <vendor>Intel</vendor> + <feature policy='require' name='ss'/> + <feature policy='require' name='vmx'/> + <feature policy='require' name='hypervisor'/> + <feature policy='require' name='clflushopt'/> + <feature policy='require' name='xsaves'/> + <feature policy='require' name='pdpe1gb'/> + <feature policy='disable' name='pclmuldq'/> + <feature policy='disable' name='lahf_lm'/> </mode> <mode name='custom' supported='yes'> <model usable='yes'>qemu64</model> -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:15PM +0100, Jiri Denemark wrote:
Until now host-model CPU mode tried to enable all CPU features supported by the host CPU even if QEMU/KVM did not support them. This caused a number of issues and made host-model quite unreliable. Asking QEMU for the CPU it can provide and the current host makes host-model much more robust.
This commit fixes the following bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1018251 https://bugzilla.redhat.com/show_bug.cgi?id=1371617 https://bugzilla.redhat.com/show_bug.cgi?id=1372581 https://bugzilla.redhat.com/show_bug.cgi?id=1404627 https://bugzilla.redhat.com/show_bug.cgi?id=870071
In addition to that, the following bug should be mostly limited to cases when an unsupported feature is explicitly requested:
https://bugzilla.redhat.com/show_bug.cgi?id=1335534
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - added #include "cpu/cpu_x86.h" removed in an earlier patch - adapted to changes to qemuMonitorCPUModelProperty
Version 2: - no change
src/qemu/qemu_capabilities.c | 77 ++++++++++++++++++++++ .../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 33 +++++++++- tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 11 +++- 3 files changed, 119 insertions(+), 2 deletions(-)
ACK Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - no change src/qemu/qemu_capabilities.c | 4 +++- src/qemu/qemu_monitor.c | 4 ++-- src/qemu/qemu_monitor.h | 6 +++++- src/qemu/qemu_monitor_json.c | 11 +++++++++-- src/qemu/qemu_monitor_json.h | 4 ++-- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index adfe84bff..3f0a0ef07 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2857,7 +2857,9 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps, model = "host"; } - return qemuMonitorGetCPUModelExpansion(mon, "static", model, modelInfo); + return qemuMonitorGetCPUModelExpansion(mon, + QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC, + model, modelInfo); } struct tpmTypeToCaps { diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 4c3f7a20f..c33b0e847 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3641,11 +3641,11 @@ qemuMonitorCPUDefInfoFree(qemuMonitorCPUDefInfoPtr cpu) int qemuMonitorGetCPUModelExpansion(qemuMonitorPtr mon, - const char *type, + qemuMonitorCPUModelExpansionType type, const char *model_name, qemuMonitorCPUModelInfoPtr *model_info) { - VIR_DEBUG("type=%s model_name=%s", type, model_name); + VIR_DEBUG("type=%d model_name=%s", type, model_name); QEMU_CHECK_MONITOR_JSON(mon); diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index ff8731bdd..208da2d05 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -952,8 +952,12 @@ struct _qemuMonitorCPUModelInfo { qemuMonitorCPUPropertyPtr props; }; +typedef enum { + QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC, +} qemuMonitorCPUModelExpansionType; + int qemuMonitorGetCPUModelExpansion(qemuMonitorPtr mon, - const char *type, + qemuMonitorCPUModelExpansionType type, const char *model_name, qemuMonitorCPUModelInfoPtr *model_info); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 56635979a..7461c8567 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5026,7 +5026,7 @@ qemuMonitorJSONParseCPUModelProperty(const char *key, int qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon, - const char *type, + qemuMonitorCPUModelExpansionType type, const char *model_name, qemuMonitorCPUModelInfoPtr *model_info) { @@ -5039,6 +5039,7 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon, virJSONValuePtr cpu_props; qemuMonitorCPUModelInfoPtr machine_model = NULL; char const *cpu_name; + const char *typeStr = ""; *model_info = NULL; @@ -5048,8 +5049,14 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon, if (virJSONValueObjectAppendString(model, "name", model_name) < 0) goto cleanup; + switch (type) { + case QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC: + typeStr = "static"; + break; + } + if (!(cmd = qemuMonitorJSONMakeCommand("query-cpu-model-expansion", - "s:type", type, + "s:type", typeStr, "a:model", model, NULL))) goto cleanup; diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 79688c82f..59d9f098c 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -354,10 +354,10 @@ int qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon, ATTRIBUTE_NONNULL(2); int qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon, - const char *type, + qemuMonitorCPUModelExpansionType type, const char *model_name, qemuMonitorCPUModelInfoPtr *model_info) - ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); + ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); int qemuMonitorJSONGetCommands(qemuMonitorPtr mon, char ***commands) -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:16PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - no change
src/qemu/qemu_capabilities.c | 4 +++- src/qemu/qemu_monitor.c | 4 ++-- src/qemu/qemu_monitor.h | 6 +++++- src/qemu/qemu_monitor_json.c | 11 +++++++++-- src/qemu/qemu_monitor_json.h | 4 ++-- 5 files changed, 21 insertions(+), 8 deletions(-)
ACK Pavel

The static CPU model expansion is designed to return only canonical names of all CPU properties. To maintain backwards compatibility libvirt is stuck with different spelling of some of the features, but we need to use the full expansion to get the additional spellings. In addition to returning all spelling variants for all properties the full expansion will contain properties which are not guaranteed to be migration compatible. Thus, we need to combine both expansions. First we need to call the static expansion to limit the result to migratable properties. Then we can use the result of the static expansion as an input to the full expansion to get both canonical names and their aliases. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - reworded the commit message a bit - moved retry label just above switch (type) to simplify the code - added a comment to explain why we are jumping back Version 2: - no change src/qemu/qemu_capabilities.c | 10 +- src/qemu/qemu_monitor.h | 2 + src/qemu/qemu_monitor_json.c | 21 +- .../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 2 - tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 3 +- .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 476 +++++++++++++++++++++ tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 178 ++++++-- 7 files changed, 654 insertions(+), 38 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3f0a0ef07..ce191ee99 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2845,6 +2845,7 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps, { qemuMonitorCPUModelInfoPtr *modelInfo; const char *model; + qemuMonitorCPUModelExpansionType type; if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION)) return 0; @@ -2857,9 +2858,12 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps, model = "host"; } - return qemuMonitorGetCPUModelExpansion(mon, - QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC, - model, modelInfo); + if (ARCH_IS_X86(qemuCaps->arch)) + type = QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC_FULL; + else + type = QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC; + + return qemuMonitorGetCPUModelExpansion(mon, type, model, modelInfo); } struct tpmTypeToCaps { diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 208da2d05..591d6a48f 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -954,6 +954,8 @@ struct _qemuMonitorCPUModelInfo { typedef enum { QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC, + QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC_FULL, + QEMU_MONITOR_CPU_MODEL_EXPANSION_FULL, } qemuMonitorCPUModelExpansionType; int qemuMonitorGetCPUModelExpansion(qemuMonitorPtr mon, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 7461c8567..7cf70e3b8 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5031,7 +5031,7 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon, qemuMonitorCPUModelInfoPtr *model_info) { int ret = -1; - virJSONValuePtr model; + virJSONValuePtr model = NULL; virJSONValuePtr cmd = NULL; virJSONValuePtr reply = NULL; virJSONValuePtr data; @@ -5049,10 +5049,16 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon, if (virJSONValueObjectAppendString(model, "name", model_name) < 0) goto cleanup; + retry: switch (type) { case QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC: + case QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC_FULL: typeStr = "static"; break; + + case QEMU_MONITOR_CPU_MODEL_EXPANSION_FULL: + typeStr = "full"; + break; } if (!(cmd = qemuMonitorJSONMakeCommand("query-cpu-model-expansion", @@ -5089,6 +5095,19 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon, goto cleanup; } + /* QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC_FULL requests "full" expansion + * on the result of the initial "static" expansion. + */ + if (type == QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC_FULL) { + if (!(model = virJSONValueCopy(cpu_model))) + goto cleanup; + + virJSONValueFree(cmd); + virJSONValueFree(reply); + type = QEMU_MONITOR_CPU_MODEL_EXPANSION_FULL; + goto retry; + } + if (!(cpu_name = virJSONValueObjectGetString(cpu_model, "name"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("query-cpu-model-expansion reply data was missing 'name'")); diff --git a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml index 1827b1d6f..573eb4bb6 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml @@ -46,9 +46,7 @@ <feature policy='require' name='3dnowext'/> <feature policy='require' name='3dnow'/> <feature policy='require' name='cr8legacy'/> - <feature policy='disable' name='pclmuldq'/> <feature policy='disable' name='avx'/> - <feature policy='disable' name='lahf_lm'/> <feature policy='disable' name='misalignsse'/> <feature policy='disable' name='3dnowprefetch'/> <feature policy='disable' name='xop'/> diff --git a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml index a7a2ecdea..b361475d7 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml @@ -26,11 +26,10 @@ <feature policy='require' name='ss'/> <feature policy='require' name='vmx'/> <feature policy='require' name='hypervisor'/> + <feature policy='require' name='tsc_adjust'/> <feature policy='require' name='clflushopt'/> <feature policy='require' name='xsaves'/> <feature policy='require' name='pdpe1gb'/> - <feature policy='disable' name='pclmuldq'/> - <feature policy='disable' name='lahf_lm'/> </mode> <mode name='custom' supported='yes'> <model usable='yes'>qemu64</model> diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies index 6cf1cdd3e..99556487f 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies @@ -14541,6 +14541,244 @@ { "return": { + "model": { + "name": "base", + "props": { + "phys-bits": 0, + "core-id": -1, + "xlevel": 2147483656, + "cmov": true, + "ia64": false, + "aes": true, + "mmx": true, + "arat": true, + "rdpid": false, + "pause-filter": false, + "xsavec": true, + "osxsave": false, + "tsc-frequency": 0, + "xd": true, + "hv-vendor-id": "", + "kvm-asyncpf": true, + "kvm_asyncpf": true, + "perfctr_core": false, + "perfctr-core": false, + "mpx": true, + "avx512cd": false, + "decodeassists": false, + "pbe": false, + "sse4_1": true, + "sse4.1": true, + "sse4-1": true, + "family": 6, + "avx512f": false, + "xcrypt": false, + "hv-runtime": false, + "msr": true, + "mce": true, + "mca": true, + "thread-id": -1, + "min-level": 13, + "xgetbv1": true, + "cid": false, + "hv-relaxed": false, + "fxsr": true, + "ds": false, + "hv-crash": false, + "xsaveopt": true, + "xtpr": false, + "avx512-vpopcntdq": false, + "phe": false, + "avx512vl": false, + "extapic": false, + "3dnowprefetch": true, + "cr8legacy": false, + "cpuid-0xb": true, + "xcrypt-en": false, + "kvm_pv_eoi": true, + "apic-id": 4294967295, + "pn": false, + "dca": false, + "vendor": "GenuineIntel", + "pku": false, + "smx": false, + "cmp-legacy": false, + "cmp_legacy": false, + "avx512-4fmaps": false, + "vmcb-clean": false, + "vmcb_clean": false, + "3dnowext": false, + "hle": true, + "npt": false, + "memory": "/machine/unattached/system[0]", + "clwb": false, + "lbrv": false, + "adx": true, + "ss": true, + "pni": true, + "svm_lock": false, + "svm-lock": false, + "smep": true, + "pfthreshold": false, + "smap": true, + "x2apic": true, + "avx512vbmi": false, + "hv-stimer": false, + "i64": true, + "flushbyasid": false, + "f16c": true, + "ace2-en": false, + "pat": true, + "pae": true, + "sse": true, + "phe-en": false, + "kvm-nopiodelay": true, + "kvm_nopiodelay": true, + "tm": false, + "kvmclock-stable-bit": true, + "hypervisor": true, + "socket-id": -1, + "pcommit": false, + "syscall": true, + "level": 13, + "avx512dq": false, + "svm": false, + "full-cpuid-auto-level": true, + "hv-reset": false, + "invtsc": false, + "sse3": true, + "sse2": true, + "est": false, + "avx512ifma": false, + "tm2": false, + "kvm-pv-eoi": true, + "cx8": true, + "kvm-mmu": false, + "kvm_mmu": false, + "sse4_2": true, + "sse4.2": true, + "sse4-2": true, + "pge": true, + "fill-mtrr-mask": true, + "pdcm": false, + "nodeid_msr": false, + "model": 94, + "movbe": true, + "nrip-save": false, + "nrip_save": false, + "sse4a": false, + "ssse3": true, + "kvm_pv_unhalt": true, + "invpcid": true, + "pdpe1gb": true, + "tsc-deadline": true, + "fma": true, + "cx16": true, + "de": true, + "enforce": false, + "stepping": 3, + "xsave": true, + "clflush": true, + "skinit": false, + "tce": false, + "tsc": true, + "fpu": true, + "ds-cpl": false, + "ds_cpl": false, + "ibs": false, + "host-phys-bits": false, + "fma4": false, + "la57": false, + "osvw": false, + "check": true, + "pmm": false, + "apic": true, + "pmu": false, + "min-xlevel2": 0, + "tsc-adjust": true, + "tsc_adjust": true, + "kvm-steal-time": true, + "kvm_steal_time": true, + "kvmclock": true, + "l3-cache": true, + "lwp": false, + "xop": false, + "avx": true, + "ospke": false, + "ace2": false, + "acpi": false, + "avx512bw": false, + "hv-vapic": false, + "fsgsbase": true, + "ht": false, + "nx": true, + "pclmulqdq": true, + "mmxext": false, + "popcnt": true, + "xsaves": true, + "lm": true, + "umip": false, + "avx2": true, + "pse": true, + "sep": true, + "pclmuldq": true, + "nodeid-msr": false, + "kvm": true, + "misalignsse": false, + "min-xlevel": 2147483656, + "bmi2": true, + "bmi1": true, + "kvm-pv-unhalt": true, + "realized": false, + "tsc_scale": false, + "tsc-scale": false, + "topoext": false, + "hv-vpindex": false, + "xlevel2": 0, + "clflushopt": true, + "monitor": false, + "avx512er": false, + "pmm-en": false, + "pcid": true, + "3dnow": false, + "erms": true, + "lahf-lm": true, + "lahf_lm": true, + "xstore": false, + "hv-synic": false, + "fxsr-opt": false, + "fxsr_opt": false, + "rtm": true, + "lmce": true, + "hv-time": false, + "perfctr-nb": false, + "perfctr_nb": false, + "ffxsr": false, + "rdrand": true, + "rdseed": true, + "avx512-4vnniw": false, + "vme": true, + "vmx": true, + "dtes64": false, + "mtrr": true, + "rdtscp": true, + "pse36": true, + "tbm": false, + "wdt": false, + "pause_filter": false, + "model-id": "Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz", + "sha-ni": false, + "abm": true, + "avx512pf": false, + "xstore-en": false + } + } + }, + "id": "libvirt-49" +} + +{ + "return": { }, "id": "libvirt-1" } @@ -15068,3 +15306,241 @@ }, "id": "libvirt-3" } + +{ + "return": { + "model": { + "name": "base", + "props": { + "phys-bits": 0, + "core-id": -1, + "xlevel": 2147483658, + "cmov": true, + "ia64": false, + "aes": true, + "mmx": true, + "arat": true, + "rdpid": false, + "pause-filter": false, + "xsavec": false, + "osxsave": false, + "tsc-frequency": 0, + "xd": true, + "hv-vendor-id": "", + "kvm-asyncpf": false, + "kvm_asyncpf": false, + "perfctr_core": false, + "perfctr-core": false, + "mpx": true, + "avx512cd": false, + "decodeassists": false, + "pbe": false, + "sse4_1": true, + "sse4.1": true, + "sse4-1": true, + "family": 6, + "avx512f": false, + "xcrypt": false, + "hv-runtime": false, + "msr": true, + "mce": true, + "mca": true, + "thread-id": -1, + "min-level": 13, + "xgetbv1": true, + "cid": false, + "hv-relaxed": false, + "fxsr": true, + "ds": false, + "hv-crash": false, + "xsaveopt": true, + "xtpr": false, + "avx512-vpopcntdq": false, + "phe": false, + "avx512vl": false, + "extapic": false, + "3dnowprefetch": false, + "cr8legacy": true, + "cpuid-0xb": true, + "xcrypt-en": false, + "kvm_pv_eoi": false, + "apic-id": 4294967295, + "pn": false, + "dca": false, + "vendor": "AuthenticAMD", + "pku": true, + "smx": false, + "cmp-legacy": false, + "cmp_legacy": false, + "avx512-4fmaps": false, + "vmcb-clean": false, + "vmcb_clean": false, + "3dnowext": true, + "hle": false, + "npt": false, + "memory": "/machine/unattached/system[0]", + "clwb": true, + "lbrv": false, + "adx": true, + "ss": true, + "pni": true, + "svm_lock": false, + "svm-lock": false, + "smep": true, + "pfthreshold": false, + "smap": true, + "x2apic": false, + "avx512vbmi": false, + "hv-stimer": false, + "i64": true, + "flushbyasid": false, + "f16c": false, + "ace2-en": false, + "pat": true, + "pae": true, + "sse": true, + "phe-en": false, + "kvm-nopiodelay": false, + "kvm_nopiodelay": false, + "tm": false, + "kvmclock-stable-bit": false, + "hypervisor": true, + "socket-id": -1, + "pcommit": true, + "syscall": true, + "level": 13, + "avx512dq": false, + "svm": true, + "full-cpuid-auto-level": true, + "hv-reset": false, + "invtsc": false, + "sse3": true, + "sse2": true, + "est": false, + "avx512ifma": false, + "tm2": false, + "kvm-pv-eoi": false, + "cx8": true, + "kvm-mmu": false, + "kvm_mmu": false, + "sse4_2": true, + "sse4.2": true, + "sse4-2": true, + "pge": true, + "fill-mtrr-mask": true, + "pdcm": false, + "nodeid_msr": false, + "model": 6, + "movbe": true, + "nrip-save": false, + "nrip_save": false, + "sse4a": true, + "ssse3": true, + "kvm_pv_unhalt": false, + "invpcid": false, + "pdpe1gb": true, + "tsc-deadline": false, + "fma": false, + "cx16": true, + "de": true, + "enforce": false, + "stepping": 3, + "xsave": true, + "clflush": true, + "skinit": false, + "tce": false, + "tsc": true, + "fpu": true, + "ds-cpl": false, + "ds_cpl": false, + "ibs": false, + "host-phys-bits": false, + "fma4": false, + "la57": true, + "osvw": false, + "check": true, + "pmm": false, + "apic": true, + "pmu": false, + "min-xlevel2": 0, + "tsc-adjust": false, + "tsc_adjust": false, + "kvm-steal-time": false, + "kvm_steal_time": false, + "kvmclock": false, + "l3-cache": true, + "lwp": false, + "xop": false, + "avx": false, + "ospke": true, + "ace2": false, + "acpi": true, + "avx512bw": false, + "hv-vapic": false, + "fsgsbase": true, + "ht": false, + "nx": true, + "pclmulqdq": true, + "mmxext": true, + "popcnt": true, + "xsaves": false, + "lm": true, + "umip": false, + "avx2": false, + "pse": true, + "sep": true, + "pclmuldq": true, + "nodeid-msr": false, + "kvm": true, + "misalignsse": false, + "min-xlevel": 2147483658, + "bmi2": true, + "bmi1": true, + "kvm-pv-unhalt": false, + "realized": false, + "tsc_scale": false, + "tsc-scale": false, + "topoext": false, + "hv-vpindex": false, + "xlevel2": 0, + "clflushopt": true, + "monitor": true, + "avx512er": false, + "pmm-en": false, + "pcid": false, + "3dnow": true, + "erms": true, + "lahf-lm": true, + "lahf_lm": true, + "xstore": false, + "hv-synic": false, + "fxsr-opt": false, + "fxsr_opt": false, + "rtm": false, + "lmce": false, + "hv-time": false, + "perfctr-nb": false, + "perfctr_nb": false, + "ffxsr": false, + "rdrand": false, + "rdseed": false, + "avx512-4vnniw": false, + "vme": false, + "vmx": false, + "dtes64": false, + "mtrr": true, + "rdtscp": true, + "pse36": true, + "tbm": false, + "wdt": false, + "pause_filter": false, + "model-id": "QEMU TCG CPU version 2.5+", + "sha-ni": false, + "abm": true, + "avx512pf": false, + "xstore-en": false + } + } + }, + "id": "libvirt-4" +} diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index 2afd78a98..07661fc6e 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -208,80 +208,109 @@ <package> (v2.8.0-1428-g1b1a68c602)</package> <arch>x86_64</arch> <hostCPU type='kvm' model='base'> + <property name='phys-bits' type='number' value='0'/> + <property name='core-id' type='number' value='18446744073709551615'/> + <property name='xlevel' type='number' value='2147483656'/> <property name='cmov' type='boolean' value='true'/> <property name='ia64' type='boolean' value='false'/> <property name='aes' type='boolean' value='true'/> <property name='mmx' type='boolean' value='true'/> - <property name='rdpid' type='boolean' value='false'/> <property name='arat' type='boolean' value='true'/> + <property name='rdpid' type='boolean' value='false'/> <property name='pause-filter' type='boolean' value='false'/> <property name='xsavec' type='boolean' value='true'/> <property name='osxsave' type='boolean' value='false'/> + <property name='tsc-frequency' type='number' value='0'/> + <property name='xd' type='boolean' value='true'/> + <property name='hv-vendor-id' type='string' value=''/> <property name='kvm-asyncpf' type='boolean' value='true'/> + <property name='kvm_asyncpf' type='boolean' value='true'/> + <property name='perfctr_core' type='boolean' value='false'/> <property name='perfctr-core' type='boolean' value='false'/> <property name='mpx' type='boolean' value='true'/> - <property name='pbe' type='boolean' value='false'/> <property name='avx512cd' type='boolean' value='false'/> <property name='decodeassists' type='boolean' value='false'/> + <property name='pbe' type='boolean' value='false'/> + <property name='sse4_1' type='boolean' value='true'/> <property name='sse4.1' type='boolean' value='true'/> + <property name='sse4-1' type='boolean' value='true'/> <property name='family' type='number' value='6'/> <property name='avx512f' type='boolean' value='false'/> + <property name='xcrypt' type='boolean' value='false'/> + <property name='hv-runtime' type='boolean' value='false'/> <property name='msr' type='boolean' value='true'/> <property name='mce' type='boolean' value='true'/> <property name='mca' type='boolean' value='true'/> - <property name='xcrypt' type='boolean' value='false'/> + <property name='thread-id' type='number' value='18446744073709551615'/> <property name='min-level' type='number' value='13'/> <property name='xgetbv1' type='boolean' value='true'/> <property name='cid' type='boolean' value='false'/> - <property name='ds' type='boolean' value='false'/> + <property name='hv-relaxed' type='boolean' value='false'/> <property name='fxsr' type='boolean' value='true'/> + <property name='ds' type='boolean' value='false'/> + <property name='hv-crash' type='boolean' value='false'/> <property name='xsaveopt' type='boolean' value='true'/> <property name='xtpr' type='boolean' value='false'/> - <property name='avx512vl' type='boolean' value='false'/> <property name='avx512-vpopcntdq' type='boolean' value='false'/> <property name='phe' type='boolean' value='false'/> + <property name='avx512vl' type='boolean' value='false'/> <property name='extapic' type='boolean' value='false'/> <property name='3dnowprefetch' type='boolean' value='true'/> <property name='cr8legacy' type='boolean' value='false'/> + <property name='cpuid-0xb' type='boolean' value='true'/> <property name='xcrypt-en' type='boolean' value='false'/> + <property name='kvm_pv_eoi' type='boolean' value='true'/> + <property name='apic-id' type='number' value='4294967295'/> <property name='pn' type='boolean' value='false'/> <property name='dca' type='boolean' value='false'/> <property name='vendor' type='string' value='GenuineIntel'/> <property name='pku' type='boolean' value='false'/> <property name='smx' type='boolean' value='false'/> <property name='cmp-legacy' type='boolean' value='false'/> + <property name='cmp_legacy' type='boolean' value='false'/> <property name='avx512-4fmaps' type='boolean' value='false'/> <property name='vmcb-clean' type='boolean' value='false'/> - <property name='hle' type='boolean' value='true'/> + <property name='vmcb_clean' type='boolean' value='false'/> <property name='3dnowext' type='boolean' value='false'/> + <property name='hle' type='boolean' value='true'/> <property name='npt' type='boolean' value='false'/> + <property name='memory' type='string' value='/machine/unattached/system[0]'/> <property name='clwb' type='boolean' value='false'/> <property name='lbrv' type='boolean' value='false'/> <property name='adx' type='boolean' value='true'/> <property name='ss' type='boolean' value='true'/> <property name='pni' type='boolean' value='true'/> + <property name='svm_lock' type='boolean' value='false'/> <property name='svm-lock' type='boolean' value='false'/> <property name='smep' type='boolean' value='true'/> - <property name='smap' type='boolean' value='true'/> <property name='pfthreshold' type='boolean' value='false'/> + <property name='smap' type='boolean' value='true'/> <property name='x2apic' type='boolean' value='true'/> <property name='avx512vbmi' type='boolean' value='false'/> + <property name='hv-stimer' type='boolean' value='false'/> + <property name='i64' type='boolean' value='true'/> <property name='flushbyasid' type='boolean' value='false'/> <property name='f16c' type='boolean' value='true'/> <property name='ace2-en' type='boolean' value='false'/> - <property name='pae' type='boolean' value='true'/> <property name='pat' type='boolean' value='true'/> + <property name='pae' type='boolean' value='true'/> <property name='sse' type='boolean' value='true'/> <property name='phe-en' type='boolean' value='false'/> <property name='kvm-nopiodelay' type='boolean' value='true'/> + <property name='kvm_nopiodelay' type='boolean' value='true'/> <property name='tm' type='boolean' value='false'/> <property name='kvmclock-stable-bit' type='boolean' value='true'/> <property name='hypervisor' type='boolean' value='true'/> + <property name='socket-id' type='number' value='18446744073709551615'/> <property name='pcommit' type='boolean' value='false'/> <property name='syscall' type='boolean' value='true'/> + <property name='level' type='number' value='13'/> <property name='avx512dq' type='boolean' value='false'/> <property name='svm' type='boolean' value='false'/> + <property name='full-cpuid-auto-level' type='boolean' value='true'/> + <property name='hv-reset' type='boolean' value='false'/> <property name='invtsc' type='boolean' value='false'/> + <property name='sse3' type='boolean' value='true'/> <property name='sse2' type='boolean' value='true'/> <property name='est' type='boolean' value='false'/> <property name='avx512ifma' type='boolean' value='false'/> @@ -289,44 +318,61 @@ <property name='kvm-pv-eoi' type='boolean' value='true'/> <property name='cx8' type='boolean' value='true'/> <property name='kvm-mmu' type='boolean' value='false'/> + <property name='kvm_mmu' type='boolean' value='false'/> + <property name='sse4_2' type='boolean' value='true'/> <property name='sse4.2' type='boolean' value='true'/> + <property name='sse4-2' type='boolean' value='true'/> <property name='pge' type='boolean' value='true'/> + <property name='fill-mtrr-mask' type='boolean' value='true'/> <property name='pdcm' type='boolean' value='false'/> + <property name='nodeid_msr' type='boolean' value='false'/> <property name='model' type='number' value='94'/> <property name='movbe' type='boolean' value='true'/> <property name='nrip-save' type='boolean' value='false'/> - <property name='ssse3' type='boolean' value='true'/> + <property name='nrip_save' type='boolean' value='false'/> <property name='sse4a' type='boolean' value='false'/> + <property name='ssse3' type='boolean' value='true'/> + <property name='kvm_pv_unhalt' type='boolean' value='true'/> <property name='invpcid' type='boolean' value='true'/> <property name='pdpe1gb' type='boolean' value='true'/> <property name='tsc-deadline' type='boolean' value='true'/> <property name='fma' type='boolean' value='true'/> <property name='cx16' type='boolean' value='true'/> <property name='de' type='boolean' value='true'/> + <property name='enforce' type='boolean' value='false'/> <property name='stepping' type='number' value='3'/> <property name='xsave' type='boolean' value='true'/> <property name='clflush' type='boolean' value='true'/> <property name='skinit' type='boolean' value='false'/> - <property name='tsc' type='boolean' value='true'/> <property name='tce' type='boolean' value='false'/> + <property name='tsc' type='boolean' value='true'/> <property name='fpu' type='boolean' value='true'/> <property name='ds-cpl' type='boolean' value='false'/> + <property name='ds_cpl' type='boolean' value='false'/> <property name='ibs' type='boolean' value='false'/> + <property name='host-phys-bits' type='boolean' value='false'/> <property name='fma4' type='boolean' value='false'/> <property name='la57' type='boolean' value='false'/> <property name='osvw' type='boolean' value='false'/> - <property name='apic' type='boolean' value='true'/> + <property name='check' type='boolean' value='true'/> <property name='pmm' type='boolean' value='false'/> + <property name='apic' type='boolean' value='true'/> + <property name='pmu' type='boolean' value='false'/> + <property name='min-xlevel2' type='number' value='0'/> <property name='tsc-adjust' type='boolean' value='true'/> + <property name='tsc_adjust' type='boolean' value='true'/> <property name='kvm-steal-time' type='boolean' value='true'/> + <property name='kvm_steal_time' type='boolean' value='true'/> <property name='kvmclock' type='boolean' value='true'/> + <property name='l3-cache' type='boolean' value='true'/> <property name='lwp' type='boolean' value='false'/> <property name='xop' type='boolean' value='false'/> <property name='avx' type='boolean' value='true'/> <property name='ospke' type='boolean' value='false'/> + <property name='ace2' type='boolean' value='false'/> <property name='acpi' type='boolean' value='false'/> <property name='avx512bw' type='boolean' value='false'/> - <property name='ace2' type='boolean' value='false'/> + <property name='hv-vapic' type='boolean' value='false'/> <property name='fsgsbase' type='boolean' value='true'/> <property name='ht' type='boolean' value='false'/> <property name='nx' type='boolean' value='true'/> @@ -336,17 +382,23 @@ <property name='xsaves' type='boolean' value='true'/> <property name='lm' type='boolean' value='true'/> <property name='umip' type='boolean' value='false'/> - <property name='pse' type='boolean' value='true'/> <property name='avx2' type='boolean' value='true'/> + <property name='pse' type='boolean' value='true'/> <property name='sep' type='boolean' value='true'/> + <property name='pclmuldq' type='boolean' value='true'/> <property name='nodeid-msr' type='boolean' value='false'/> + <property name='kvm' type='boolean' value='true'/> <property name='misalignsse' type='boolean' value='false'/> <property name='min-xlevel' type='number' value='2147483656'/> - <property name='bmi1' type='boolean' value='true'/> <property name='bmi2' type='boolean' value='true'/> + <property name='bmi1' type='boolean' value='true'/> <property name='kvm-pv-unhalt' type='boolean' value='true'/> + <property name='realized' type='boolean' value='false'/> + <property name='tsc_scale' type='boolean' value='false'/> <property name='tsc-scale' type='boolean' value='false'/> <property name='topoext' type='boolean' value='false'/> + <property name='hv-vpindex' type='boolean' value='false'/> + <property name='xlevel2' type='number' value='0'/> <property name='clflushopt' type='boolean' value='true'/> <property name='monitor' type='boolean' value='false'/> <property name='avx512er' type='boolean' value='false'/> @@ -355,11 +407,17 @@ <property name='3dnow' type='boolean' value='false'/> <property name='erms' type='boolean' value='true'/> <property name='lahf-lm' type='boolean' value='true'/> - <property name='fxsr-opt' type='boolean' value='false'/> + <property name='lahf_lm' type='boolean' value='true'/> <property name='xstore' type='boolean' value='false'/> + <property name='hv-synic' type='boolean' value='false'/> + <property name='fxsr-opt' type='boolean' value='false'/> + <property name='fxsr_opt' type='boolean' value='false'/> <property name='rtm' type='boolean' value='true'/> <property name='lmce' type='boolean' value='true'/> + <property name='hv-time' type='boolean' value='false'/> <property name='perfctr-nb' type='boolean' value='false'/> + <property name='perfctr_nb' type='boolean' value='false'/> + <property name='ffxsr' type='boolean' value='false'/> <property name='rdrand' type='boolean' value='true'/> <property name='rdseed' type='boolean' value='true'/> <property name='avx512-4vnniw' type='boolean' value='false'/> @@ -371,6 +429,7 @@ <property name='pse36' type='boolean' value='true'/> <property name='tbm' type='boolean' value='false'/> <property name='wdt' type='boolean' value='false'/> + <property name='pause_filter' type='boolean' value='false'/> <property name='model-id' type='string' value='Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz'/> <property name='sha-ni' type='boolean' value='false'/> <property name='abm' type='boolean' value='true'/> @@ -378,80 +437,109 @@ <property name='xstore-en' type='boolean' value='false'/> </hostCPU> <hostCPU type='tcg' model='base'> + <property name='phys-bits' type='number' value='0'/> + <property name='core-id' type='number' value='18446744073709551615'/> + <property name='xlevel' type='number' value='2147483658'/> <property name='cmov' type='boolean' value='true'/> <property name='ia64' type='boolean' value='false'/> <property name='aes' type='boolean' value='true'/> <property name='mmx' type='boolean' value='true'/> - <property name='rdpid' type='boolean' value='false'/> <property name='arat' type='boolean' value='true'/> + <property name='rdpid' type='boolean' value='false'/> <property name='pause-filter' type='boolean' value='false'/> <property name='xsavec' type='boolean' value='false'/> <property name='osxsave' type='boolean' value='false'/> + <property name='tsc-frequency' type='number' value='0'/> + <property name='xd' type='boolean' value='true'/> + <property name='hv-vendor-id' type='string' value=''/> <property name='kvm-asyncpf' type='boolean' value='false'/> + <property name='kvm_asyncpf' type='boolean' value='false'/> + <property name='perfctr_core' type='boolean' value='false'/> <property name='perfctr-core' type='boolean' value='false'/> <property name='mpx' type='boolean' value='true'/> - <property name='pbe' type='boolean' value='false'/> <property name='avx512cd' type='boolean' value='false'/> <property name='decodeassists' type='boolean' value='false'/> + <property name='pbe' type='boolean' value='false'/> + <property name='sse4_1' type='boolean' value='true'/> <property name='sse4.1' type='boolean' value='true'/> + <property name='sse4-1' type='boolean' value='true'/> <property name='family' type='number' value='6'/> <property name='avx512f' type='boolean' value='false'/> + <property name='xcrypt' type='boolean' value='false'/> + <property name='hv-runtime' type='boolean' value='false'/> <property name='msr' type='boolean' value='true'/> <property name='mce' type='boolean' value='true'/> <property name='mca' type='boolean' value='true'/> - <property name='xcrypt' type='boolean' value='false'/> + <property name='thread-id' type='number' value='18446744073709551615'/> <property name='min-level' type='number' value='13'/> <property name='xgetbv1' type='boolean' value='true'/> <property name='cid' type='boolean' value='false'/> - <property name='ds' type='boolean' value='false'/> + <property name='hv-relaxed' type='boolean' value='false'/> <property name='fxsr' type='boolean' value='true'/> + <property name='ds' type='boolean' value='false'/> + <property name='hv-crash' type='boolean' value='false'/> <property name='xsaveopt' type='boolean' value='true'/> <property name='xtpr' type='boolean' value='false'/> - <property name='avx512vl' type='boolean' value='false'/> <property name='avx512-vpopcntdq' type='boolean' value='false'/> <property name='phe' type='boolean' value='false'/> + <property name='avx512vl' type='boolean' value='false'/> <property name='extapic' type='boolean' value='false'/> <property name='3dnowprefetch' type='boolean' value='false'/> <property name='cr8legacy' type='boolean' value='true'/> + <property name='cpuid-0xb' type='boolean' value='true'/> <property name='xcrypt-en' type='boolean' value='false'/> + <property name='kvm_pv_eoi' type='boolean' value='false'/> + <property name='apic-id' type='number' value='4294967295'/> <property name='pn' type='boolean' value='false'/> <property name='dca' type='boolean' value='false'/> <property name='vendor' type='string' value='AuthenticAMD'/> <property name='pku' type='boolean' value='true'/> <property name='smx' type='boolean' value='false'/> <property name='cmp-legacy' type='boolean' value='false'/> + <property name='cmp_legacy' type='boolean' value='false'/> <property name='avx512-4fmaps' type='boolean' value='false'/> <property name='vmcb-clean' type='boolean' value='false'/> - <property name='hle' type='boolean' value='false'/> + <property name='vmcb_clean' type='boolean' value='false'/> <property name='3dnowext' type='boolean' value='true'/> + <property name='hle' type='boolean' value='false'/> <property name='npt' type='boolean' value='false'/> + <property name='memory' type='string' value='/machine/unattached/system[0]'/> <property name='clwb' type='boolean' value='true'/> <property name='lbrv' type='boolean' value='false'/> <property name='adx' type='boolean' value='true'/> <property name='ss' type='boolean' value='true'/> <property name='pni' type='boolean' value='true'/> + <property name='svm_lock' type='boolean' value='false'/> <property name='svm-lock' type='boolean' value='false'/> <property name='smep' type='boolean' value='true'/> - <property name='smap' type='boolean' value='true'/> <property name='pfthreshold' type='boolean' value='false'/> + <property name='smap' type='boolean' value='true'/> <property name='x2apic' type='boolean' value='false'/> <property name='avx512vbmi' type='boolean' value='false'/> + <property name='hv-stimer' type='boolean' value='false'/> + <property name='i64' type='boolean' value='true'/> <property name='flushbyasid' type='boolean' value='false'/> <property name='f16c' type='boolean' value='false'/> <property name='ace2-en' type='boolean' value='false'/> - <property name='pae' type='boolean' value='true'/> <property name='pat' type='boolean' value='true'/> + <property name='pae' type='boolean' value='true'/> <property name='sse' type='boolean' value='true'/> <property name='phe-en' type='boolean' value='false'/> <property name='kvm-nopiodelay' type='boolean' value='false'/> + <property name='kvm_nopiodelay' type='boolean' value='false'/> <property name='tm' type='boolean' value='false'/> <property name='kvmclock-stable-bit' type='boolean' value='false'/> <property name='hypervisor' type='boolean' value='true'/> + <property name='socket-id' type='number' value='18446744073709551615'/> <property name='pcommit' type='boolean' value='true'/> <property name='syscall' type='boolean' value='true'/> + <property name='level' type='number' value='13'/> <property name='avx512dq' type='boolean' value='false'/> <property name='svm' type='boolean' value='true'/> + <property name='full-cpuid-auto-level' type='boolean' value='true'/> + <property name='hv-reset' type='boolean' value='false'/> <property name='invtsc' type='boolean' value='false'/> + <property name='sse3' type='boolean' value='true'/> <property name='sse2' type='boolean' value='true'/> <property name='est' type='boolean' value='false'/> <property name='avx512ifma' type='boolean' value='false'/> @@ -459,44 +547,61 @@ <property name='kvm-pv-eoi' type='boolean' value='false'/> <property name='cx8' type='boolean' value='true'/> <property name='kvm-mmu' type='boolean' value='false'/> + <property name='kvm_mmu' type='boolean' value='false'/> + <property name='sse4_2' type='boolean' value='true'/> <property name='sse4.2' type='boolean' value='true'/> + <property name='sse4-2' type='boolean' value='true'/> <property name='pge' type='boolean' value='true'/> + <property name='fill-mtrr-mask' type='boolean' value='true'/> <property name='pdcm' type='boolean' value='false'/> + <property name='nodeid_msr' type='boolean' value='false'/> <property name='model' type='number' value='6'/> <property name='movbe' type='boolean' value='true'/> <property name='nrip-save' type='boolean' value='false'/> - <property name='ssse3' type='boolean' value='true'/> + <property name='nrip_save' type='boolean' value='false'/> <property name='sse4a' type='boolean' value='true'/> + <property name='ssse3' type='boolean' value='true'/> + <property name='kvm_pv_unhalt' type='boolean' value='false'/> <property name='invpcid' type='boolean' value='false'/> <property name='pdpe1gb' type='boolean' value='true'/> <property name='tsc-deadline' type='boolean' value='false'/> <property name='fma' type='boolean' value='false'/> <property name='cx16' type='boolean' value='true'/> <property name='de' type='boolean' value='true'/> + <property name='enforce' type='boolean' value='false'/> <property name='stepping' type='number' value='3'/> <property name='xsave' type='boolean' value='true'/> <property name='clflush' type='boolean' value='true'/> <property name='skinit' type='boolean' value='false'/> - <property name='tsc' type='boolean' value='true'/> <property name='tce' type='boolean' value='false'/> + <property name='tsc' type='boolean' value='true'/> <property name='fpu' type='boolean' value='true'/> <property name='ds-cpl' type='boolean' value='false'/> + <property name='ds_cpl' type='boolean' value='false'/> <property name='ibs' type='boolean' value='false'/> + <property name='host-phys-bits' type='boolean' value='false'/> <property name='fma4' type='boolean' value='false'/> <property name='la57' type='boolean' value='true'/> <property name='osvw' type='boolean' value='false'/> - <property name='apic' type='boolean' value='true'/> + <property name='check' type='boolean' value='true'/> <property name='pmm' type='boolean' value='false'/> + <property name='apic' type='boolean' value='true'/> + <property name='pmu' type='boolean' value='false'/> + <property name='min-xlevel2' type='number' value='0'/> <property name='tsc-adjust' type='boolean' value='false'/> + <property name='tsc_adjust' type='boolean' value='false'/> <property name='kvm-steal-time' type='boolean' value='false'/> + <property name='kvm_steal_time' type='boolean' value='false'/> <property name='kvmclock' type='boolean' value='false'/> + <property name='l3-cache' type='boolean' value='true'/> <property name='lwp' type='boolean' value='false'/> <property name='xop' type='boolean' value='false'/> <property name='avx' type='boolean' value='false'/> <property name='ospke' type='boolean' value='true'/> + <property name='ace2' type='boolean' value='false'/> <property name='acpi' type='boolean' value='true'/> <property name='avx512bw' type='boolean' value='false'/> - <property name='ace2' type='boolean' value='false'/> + <property name='hv-vapic' type='boolean' value='false'/> <property name='fsgsbase' type='boolean' value='true'/> <property name='ht' type='boolean' value='false'/> <property name='nx' type='boolean' value='true'/> @@ -506,17 +611,23 @@ <property name='xsaves' type='boolean' value='false'/> <property name='lm' type='boolean' value='true'/> <property name='umip' type='boolean' value='false'/> - <property name='pse' type='boolean' value='true'/> <property name='avx2' type='boolean' value='false'/> + <property name='pse' type='boolean' value='true'/> <property name='sep' type='boolean' value='true'/> + <property name='pclmuldq' type='boolean' value='true'/> <property name='nodeid-msr' type='boolean' value='false'/> + <property name='kvm' type='boolean' value='true'/> <property name='misalignsse' type='boolean' value='false'/> <property name='min-xlevel' type='number' value='2147483658'/> - <property name='bmi1' type='boolean' value='true'/> <property name='bmi2' type='boolean' value='true'/> + <property name='bmi1' type='boolean' value='true'/> <property name='kvm-pv-unhalt' type='boolean' value='false'/> + <property name='realized' type='boolean' value='false'/> + <property name='tsc_scale' type='boolean' value='false'/> <property name='tsc-scale' type='boolean' value='false'/> <property name='topoext' type='boolean' value='false'/> + <property name='hv-vpindex' type='boolean' value='false'/> + <property name='xlevel2' type='number' value='0'/> <property name='clflushopt' type='boolean' value='true'/> <property name='monitor' type='boolean' value='true'/> <property name='avx512er' type='boolean' value='false'/> @@ -525,11 +636,17 @@ <property name='3dnow' type='boolean' value='true'/> <property name='erms' type='boolean' value='true'/> <property name='lahf-lm' type='boolean' value='true'/> - <property name='fxsr-opt' type='boolean' value='false'/> + <property name='lahf_lm' type='boolean' value='true'/> <property name='xstore' type='boolean' value='false'/> + <property name='hv-synic' type='boolean' value='false'/> + <property name='fxsr-opt' type='boolean' value='false'/> + <property name='fxsr_opt' type='boolean' value='false'/> <property name='rtm' type='boolean' value='false'/> <property name='lmce' type='boolean' value='false'/> + <property name='hv-time' type='boolean' value='false'/> <property name='perfctr-nb' type='boolean' value='false'/> + <property name='perfctr_nb' type='boolean' value='false'/> + <property name='ffxsr' type='boolean' value='false'/> <property name='rdrand' type='boolean' value='false'/> <property name='rdseed' type='boolean' value='false'/> <property name='avx512-4vnniw' type='boolean' value='false'/> @@ -541,6 +658,7 @@ <property name='pse36' type='boolean' value='true'/> <property name='tbm' type='boolean' value='false'/> <property name='wdt' type='boolean' value='false'/> + <property name='pause_filter' type='boolean' value='false'/> <property name='model-id' type='string' value='QEMU TCG CPU version 2.5+'/> <property name='sha-ni' type='boolean' value='false'/> <property name='abm' type='boolean' value='true'/> -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:17PM +0100, Jiri Denemark wrote:
The static CPU model expansion is designed to return only canonical names of all CPU properties. To maintain backwards compatibility libvirt is stuck with different spelling of some of the features, but we need to use the full expansion to get the additional spellings. In addition to returning all spelling variants for all properties the full expansion will contain properties which are not guaranteed to be migration compatible. Thus, we need to combine both expansions. First we need to call the static expansion to limit the result to migratable properties. Then we can use the result of the static expansion as an input to the full expansion to get both canonical names and their aliases.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - reworded the commit message a bit - moved retry label just above switch (type) to simplify the code - added a comment to explain why we are jumping back
Version 2: - no change
src/qemu/qemu_capabilities.c | 10 +- src/qemu/qemu_monitor.h | 2 + src/qemu/qemu_monitor_json.c | 21 +- .../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 2 - tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 3 +- .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 476 +++++++++++++++++++++ tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 178 ++++++-- 7 files changed, 654 insertions(+), 38 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3f0a0ef07..ce191ee99 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2845,6 +2845,7 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps, { qemuMonitorCPUModelInfoPtr *modelInfo; const char *model; + qemuMonitorCPUModelExpansionType type;
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION)) return 0; @@ -2857,9 +2858,12 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps, model = "host"; }
- return qemuMonitorGetCPUModelExpansion(mon, - QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC, - model, modelInfo); + if (ARCH_IS_X86(qemuCaps->arch)) + type = QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC_FULL; + else + type = QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC;
It might be useful to explain here in the code why STATIC_FULL is used only for x86 arch so nobody tries to add here different architecture when it gets support in QEMU to list use FULL expansion. ACK Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - s/type/virtType/ in virQEMUCapsLoadHostCPUModelInfo Version 2: - no change src/qemu/qemu_capabilities.c | 19 ++++++++++++++----- src/qemu/qemu_capspriv.h | 10 ++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index ce191ee99..55c17a20e 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3209,7 +3209,7 @@ virQEMUCapsInitCPUModelX86(virQEMUCapsPtr qemuCaps, * 1 when the caller should fall back to using virCapsPtr->host.cpu, * -1 on error. */ -static int +int virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, virDomainVirtType type, virCPUDefPtr cpu) @@ -3273,6 +3273,18 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, } +void +virQEMUCapsSetCPUModelInfo(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, + qemuMonitorCPUModelInfoPtr modelInfo) +{ + if (type == VIR_DOMAIN_VIRT_KVM) + qemuCaps->kvmCPUModelInfo = modelInfo; + else + qemuCaps->tcgCPUModelInfo = modelInfo; +} + + static int virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, xmlXPathContextPtr ctxt, @@ -3372,10 +3384,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, } } - if (virtType == VIR_DOMAIN_VIRT_KVM) - qemuCaps->kvmCPUModelInfo = hostCPU; - else - qemuCaps->tcgCPUModelInfo = hostCPU; + virQEMUCapsSetCPUModelInfo(qemuCaps, virtType, hostCPU); hostCPU = NULL; ret = 0; diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 75499d462..d4f13a2d2 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -73,4 +73,14 @@ void virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, virCapsPtr caps, virDomainVirtType type); + +int +virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, + virCPUDefPtr cpu); + +void +virQEMUCapsSetCPUModelInfo(virQEMUCapsPtr qemuCaps, + virDomainVirtType type, + qemuMonitorCPUModelInfoPtr modelInfo); #endif -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:18PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - s/type/virtType/ in virQEMUCapsLoadHostCPUModelInfo
Version 2: - no change
src/qemu/qemu_capabilities.c | 19 ++++++++++++++----- src/qemu/qemu_capspriv.h | 10 ++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-)
ACK Pavel

While "x86" is a CPU sub driver name, it is not a recognized name of any architecture known to libvirt. Let's use "x86_64" prefix which can be used with virArch APIs. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - fix file names created by cpu-parse.sh tests/cputest.c | 204 ++++++++++----------- tests/cputestdata/cpu-parse.sh | 2 +- ...ack.xml => x86_64-Haswell-noTSX-nofallback.xml} | 0 ...-Haswell-noTSX.xml => x86_64-Haswell-noTSX.xml} | 0 .../{x86-Haswell.xml => x86_64-Haswell.xml} | 0 ...e-1-result.xml => x86_64-baseline-1-result.xml} | 0 .../{x86-baseline-1.xml => x86_64-baseline-1.xml} | 0 ...e-2-result.xml => x86_64-baseline-2-result.xml} | 0 .../{x86-baseline-2.xml => x86_64-baseline-2.xml} | 0 ...expanded.xml => x86_64-baseline-3-expanded.xml} | 0 ...e-3-result.xml => x86_64-baseline-3-result.xml} | 0 .../{x86-baseline-3.xml => x86_64-baseline-3.xml} | 0 ...expanded.xml => x86_64-baseline-4-expanded.xml} | 0 ...e-4-result.xml => x86_64-baseline-4-result.xml} | 0 .../{x86-baseline-4.xml => x86_64-baseline-4.xml} | 0 ...expanded.xml => x86_64-baseline-5-expanded.xml} | 0 ...e-5-result.xml => x86_64-baseline-5-result.xml} | 0 .../{x86-baseline-5.xml => x86_64-baseline-5.xml} | 0 ...atable.xml => x86_64-baseline-6-migratable.xml} | 0 ...e-6-result.xml => x86_64-baseline-6-result.xml} | 0 .../{x86-baseline-6.xml => x86_64-baseline-6.xml} | 0 ...e-7-result.xml => x86_64-baseline-7-result.xml} | 0 .../{x86-baseline-7.xml => x86_64-baseline-7.xml} | 0 ...e-8-result.xml => x86_64-baseline-8-result.xml} | 0 .../{x86-baseline-8.xml => x86_64-baseline-8.xml} | 0 ...ml => x86_64-baseline-incompatible-vendors.xml} | 0 ...lt.xml => x86_64-baseline-no-vendor-result.xml} | 0 ...no-vendor.xml => x86_64-baseline-no-vendor.xml} | 0 ...xml => x86_64-baseline-some-vendors-result.xml} | 0 ...endors.xml => x86_64-baseline-some-vendors.xml} | 0 ...-bogus-feature.xml => x86_64-bogus-feature.xml} | 0 ...{x86-bogus-model.xml => x86_64-bogus-model.xml} | 0 ...86-bogus-vendor.xml => x86_64-bogus-vendor.xml} | 0 ...-guest.xml => x86_64-cpuid-A10-5800K-guest.xml} | 0 ...0K-host.xml => x86_64-cpuid-A10-5800K-host.xml} | 0 ...0K-json.xml => x86_64-cpuid-A10-5800K-json.xml} | 0 ...-A10-5800K.json => x86_64-cpuid-A10-5800K.json} | 0 ...id-A10-5800K.xml => x86_64-cpuid-A10-5800K.xml} | 0 ...-guest.xml => x86_64-cpuid-Atom-D510-guest.xml} | 0 ...10-host.xml => x86_64-cpuid-Atom-D510-host.xml} | 0 ...id-Atom-D510.xml => x86_64-cpuid-Atom-D510.xml} | 0 ...-guest.xml => x86_64-cpuid-Atom-N450-guest.xml} | 0 ...50-host.xml => x86_64-cpuid-Atom-N450-host.xml} | 0 ...id-Atom-N450.xml => x86_64-cpuid-Atom-N450.xml} | 0 ...est.xml => x86_64-cpuid-Core-i5-2500-guest.xml} | 0 ...host.xml => x86_64-cpuid-Core-i5-2500-host.xml} | 0 ...json.xml => x86_64-cpuid-Core-i5-2500-json.xml} | 0 ...i5-2500.json => x86_64-cpuid-Core-i5-2500.json} | 0 ...e-i5-2500.xml => x86_64-cpuid-Core-i5-2500.xml} | 0 ...st.xml => x86_64-cpuid-Core-i5-2540M-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i5-2540M-host.xml} | 0 ...son.xml => x86_64-cpuid-Core-i5-2540M-json.xml} | 0 ...-2540M.json => x86_64-cpuid-Core-i5-2540M.json} | 0 ...i5-2540M.xml => x86_64-cpuid-Core-i5-2540M.xml} | 0 ...st.xml => x86_64-cpuid-Core-i5-4670T-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i5-4670T-host.xml} | 0 ...son.xml => x86_64-cpuid-Core-i5-4670T-json.xml} | 0 ...-4670T.json => x86_64-cpuid-Core-i5-4670T.json} | 0 ...i5-4670T.xml => x86_64-cpuid-Core-i5-4670T.xml} | 0 ...est.xml => x86_64-cpuid-Core-i5-6600-guest.xml} | 0 ...host.xml => x86_64-cpuid-Core-i5-6600-host.xml} | 0 ...json.xml => x86_64-cpuid-Core-i5-6600-json.xml} | 0 ...i5-6600.json => x86_64-cpuid-Core-i5-6600.json} | 0 ...e-i5-6600.xml => x86_64-cpuid-Core-i5-6600.xml} | 0 ...est.xml => x86_64-cpuid-Core-i7-2600-guest.xml} | 0 ...host.xml => x86_64-cpuid-Core-i7-2600-host.xml} | 0 ...json.xml => x86_64-cpuid-Core-i7-2600-json.xml} | 0 ...i7-2600.json => x86_64-cpuid-Core-i7-2600.json} | 0 ...e-i7-2600.xml => x86_64-cpuid-Core-i7-2600.xml} | 0 ...st.xml => x86_64-cpuid-Core-i7-3520M-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i7-3520M-host.xml} | 0 ...i7-3520M.xml => x86_64-cpuid-Core-i7-3520M.xml} | 0 ...t.xml => x86_64-cpuid-Core-i7-3740QM-guest.xml} | 0 ...st.xml => x86_64-cpuid-Core-i7-3740QM-host.xml} | 0 ...on.xml => x86_64-cpuid-Core-i7-3740QM-json.xml} | 0 ...740QM.json => x86_64-cpuid-Core-i7-3740QM.json} | 0 ...-3740QM.xml => x86_64-cpuid-Core-i7-3740QM.xml} | 0 ...est.xml => x86_64-cpuid-Core-i7-3770-guest.xml} | 0 ...host.xml => x86_64-cpuid-Core-i7-3770-host.xml} | 0 ...json.xml => x86_64-cpuid-Core-i7-3770-json.xml} | 0 ...i7-3770.json => x86_64-cpuid-Core-i7-3770.json} | 0 ...e-i7-3770.xml => x86_64-cpuid-Core-i7-3770.xml} | 0 ...st.xml => x86_64-cpuid-Core-i7-4600U-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i7-4600U-host.xml} | 0 ...son.xml => x86_64-cpuid-Core-i7-4600U-json.xml} | 0 ...-4600U.json => x86_64-cpuid-Core-i7-4600U.json} | 0 ...i7-4600U.xml => x86_64-cpuid-Core-i7-4600U.xml} | 0 ...st.xml => x86_64-cpuid-Core-i7-5600U-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Core-i7-5600U-host.xml} | 0 ...son.xml => x86_64-cpuid-Core-i7-5600U-json.xml} | 0 ...-5600U.json => x86_64-cpuid-Core-i7-5600U.json} | 0 ...i7-5600U.xml => x86_64-cpuid-Core-i7-5600U.xml} | 0 ...uest.xml => x86_64-cpuid-Core2-E6850-guest.xml} | 0 ...-host.xml => x86_64-cpuid-Core2-E6850-host.xml} | 0 ...-json.xml => x86_64-cpuid-Core2-E6850-json.xml} | 0 ...e2-E6850.json => x86_64-cpuid-Core2-E6850.json} | 0 ...ore2-E6850.xml => x86_64-cpuid-Core2-E6850.xml} | 0 ...uest.xml => x86_64-cpuid-Core2-Q9500-guest.xml} | 0 ...-host.xml => x86_64-cpuid-Core2-Q9500-host.xml} | 0 ...ore2-Q9500.xml => x86_64-cpuid-Core2-Q9500.xml} | 0 ...50-guest.xml => x86_64-cpuid-FX-8150-guest.xml} | 0 ...8150-host.xml => x86_64-cpuid-FX-8150-host.xml} | 0 ...-cpuid-FX-8150.xml => x86_64-cpuid-FX-8150.xml} | 0 ...est.xml => x86_64-cpuid-Opteron-1352-guest.xml} | 0 ...host.xml => x86_64-cpuid-Opteron-1352-host.xml} | 0 ...eron-1352.xml => x86_64-cpuid-Opteron-1352.xml} | 0 ...est.xml => x86_64-cpuid-Opteron-2350-guest.xml} | 0 ...host.xml => x86_64-cpuid-Opteron-2350-host.xml} | 0 ...json.xml => x86_64-cpuid-Opteron-2350-json.xml} | 0 ...on-2350.json => x86_64-cpuid-Opteron-2350.json} | 0 ...eron-2350.xml => x86_64-cpuid-Opteron-2350.xml} | 0 ...est.xml => x86_64-cpuid-Opteron-6234-guest.xml} | 0 ...host.xml => x86_64-cpuid-Opteron-6234-host.xml} | 0 ...json.xml => x86_64-cpuid-Opteron-6234-json.xml} | 0 ...on-6234.json => x86_64-cpuid-Opteron-6234.json} | 0 ...eron-6234.xml => x86_64-cpuid-Opteron-6234.xml} | 0 ...est.xml => x86_64-cpuid-Opteron-6282-guest.xml} | 0 ...host.xml => x86_64-cpuid-Opteron-6282-host.xml} | 0 ...eron-6282.xml => x86_64-cpuid-Opteron-6282.xml} | 0 ...st.xml => x86_64-cpuid-Pentium-P6100-guest.xml} | 0 ...ost.xml => x86_64-cpuid-Pentium-P6100-host.xml} | 0 ...um-P6100.xml => x86_64-cpuid-Pentium-P6100.xml} | 0 ...guest.xml => x86_64-cpuid-Phenom-B95-guest.xml} | 0 ...5-host.xml => x86_64-cpuid-Phenom-B95-host.xml} | 0 ...5-json.xml => x86_64-cpuid-Phenom-B95-json.xml} | 0 ...henom-B95.json => x86_64-cpuid-Phenom-B95.json} | 0 ...-Phenom-B95.xml => x86_64-cpuid-Phenom-B95.xml} | 0 ...-guest.xml => x86_64-cpuid-Xeon-5110-guest.xml} | 0 ...10-host.xml => x86_64-cpuid-Xeon-5110-host.xml} | 0 ...id-Xeon-5110.xml => x86_64-cpuid-Xeon-5110.xml} | 0 ...est.xml => x86_64-cpuid-Xeon-E3-1245-guest.xml} | 0 ...host.xml => x86_64-cpuid-Xeon-E3-1245-host.xml} | 0 ...json.xml => x86_64-cpuid-Xeon-E3-1245-json.xml} | 0 ...E3-1245.json => x86_64-cpuid-Xeon-E3-1245.json} | 0 ...n-E3-1245.xml => x86_64-cpuid-Xeon-E3-1245.xml} | 0 ...est.xml => x86_64-cpuid-Xeon-E5-2630-guest.xml} | 0 ...host.xml => x86_64-cpuid-Xeon-E5-2630-host.xml} | 0 ...json.xml => x86_64-cpuid-Xeon-E5-2630-json.xml} | 0 ...E5-2630.json => x86_64-cpuid-Xeon-E5-2630.json} | 0 ...n-E5-2630.xml => x86_64-cpuid-Xeon-E5-2630.xml} | 0 ...est.xml => x86_64-cpuid-Xeon-E5-2650-guest.xml} | 0 ...host.xml => x86_64-cpuid-Xeon-E5-2650-host.xml} | 0 ...json.xml => x86_64-cpuid-Xeon-E5-2650-json.xml} | 0 ...E5-2650.json => x86_64-cpuid-Xeon-E5-2650.json} | 0 ...n-E5-2650.xml => x86_64-cpuid-Xeon-E5-2650.xml} | 0 ...est.xml => x86_64-cpuid-Xeon-E7-4820-guest.xml} | 0 ...host.xml => x86_64-cpuid-Xeon-E7-4820-host.xml} | 0 ...json.xml => x86_64-cpuid-Xeon-E7-4820-json.xml} | 0 ...E7-4820.json => x86_64-cpuid-Xeon-E7-4820.json} | 0 ...n-E7-4820.xml => x86_64-cpuid-Xeon-E7-4820.xml} | 0 ...guest.xml => x86_64-cpuid-Xeon-W3520-guest.xml} | 0 ...0-host.xml => x86_64-cpuid-Xeon-W3520-host.xml} | 0 ...0-json.xml => x86_64-cpuid-Xeon-W3520-json.xml} | 0 ...eon-W3520.json => x86_64-cpuid-Xeon-W3520.json} | 0 ...-Xeon-W3520.xml => x86_64-cpuid-Xeon-W3520.xml} | 0 ...guest.xml => x86_64-cpuid-Xeon-X5460-guest.xml} | 0 ...0-host.xml => x86_64-cpuid-Xeon-X5460-host.xml} | 0 ...-Xeon-X5460.xml => x86_64-cpuid-Xeon-X5460.xml} | 0 ...le-extra.xml => x86_64-exact-disable-extra.xml} | 0 ...-exact-disable.xml => x86_64-exact-disable.xml} | 0 ...xact-disable2.xml => x86_64-exact-disable2.xml} | 0 ...bid-extra.xml => x86_64-exact-forbid-extra.xml} | 0 ...86-exact-forbid.xml => x86_64-exact-forbid.xml} | 0 ...-Haswell.xml => x86_64-exact-force-Haswell.xml} | 0 ...{x86-exact-force.xml => x86_64-exact-force.xml} | 0 ...re-extra.xml => x86_64-exact-require-extra.xml} | 0 ...-exact-require.xml => x86_64-exact-require.xml} | 0 .../{x86-exact.xml => x86_64-exact.xml} | 0 ...-nofallback.xml => x86_64-guest-nofallback.xml} | 0 .../{x86-guest.xml => x86_64-guest.xml} | 0 ...t.xml => x86_64-host+guest,model486-result.xml} | 0 ...ult.xml => x86_64-host+guest,models-result.xml} | 0 ...est-result.xml => x86_64-host+guest-result.xml} | 0 .../{x86-host+guest.xml => x86_64-host+guest.xml} | 0 ... x86_64-host+host+host-model,models-result.xml} | 0 ...k.xml => x86_64-host+host-model-nofallback.xml} | 0 ...t+host-model.xml => x86_64-host+host-model.xml} | 0 ...l => x86_64-host+host-passthrough-features.xml} | 0 ...hrough.xml => x86_64-host+host-passthrough.xml} | 0 .../{x86-host+min.xml => x86_64-host+min.xml} | 0 ...ult.xml => x86_64-host+penryn-force-result.xml} | 0 ...-host+pentium3.xml => x86_64-host+pentium3.xml} | 0 ...l => x86_64-host+strict-force-extra-result.xml} | 0 ...-host-Haswell-noTSX+Haswell,haswell-result.xml} | 0 ...Haswell-noTSX+Haswell-noTSX,haswell-result.xml} | 0 ...64-host-Haswell-noTSX+Haswell-noTSX-result.xml} | 0 ...ell-noTSX.xml => x86_64-host-Haswell-noTSX.xml} | 0 ...SandyBridge.xml => x86_64-host-SandyBridge.xml} | 0 ...-host-amd-fake.xml => x86_64-host-amd-fake.xml} | 0 .../{x86-host-amd.xml => x86_64-host-amd.xml} | 0 ....xml => x86_64-host-better+pentium3-result.xml} | 0 ...{x86-host-better.xml => x86_64-host-better.xml} | 0 ...incomp-arch.xml => x86_64-host-incomp-arch.xml} | 0 ...model.xml => x86_64-host-invtsc+host-model.xml} | 0 ...{x86-host-invtsc.xml => x86_64-host-invtsc.xml} | 0 ...llback.xml => x86_64-host-model-nofallback.xml} | 0 .../{x86-host-model.xml => x86_64-host-model.xml} | 0 ...ost-no-vendor.xml => x86_64-host-no-vendor.xml} | 0 ...es.xml => x86_64-host-passthrough-features.xml} | 0 ...passthrough.xml => x86_64-host-passthrough.xml} | 0 ...sult.xml => x86_64-host-worse+guest-result.xml} | 0 .../{x86-host-worse.xml => x86_64-host-worse.xml} | 0 .../cputestdata/{x86-host.xml => x86_64-host.xml} | 0 tests/cputestdata/{x86-min.xml => x86_64-min.xml} | 0 ...86-penryn-force.xml => x86_64-penryn-force.xml} | 0 ...86-pentium3-amd.xml => x86_64-pentium3-amd.xml} | 0 .../{x86-pentium3.xml => x86_64-pentium3.xml} | 0 ...trict-disable.xml => x86_64-strict-disable.xml} | 0 ...rce-extra.xml => x86_64-strict-force-extra.xml} | 0 ...{x86-strict-full.xml => x86_64-strict-full.xml} | 0 .../{x86-strict.xml => x86_64-strict.xml} | 0 211 files changed, 103 insertions(+), 103 deletions(-) rename tests/cputestdata/{x86-Haswell-noTSX-nofallback.xml => x86_64-Haswell-noTSX-nofallback.xml} (100%) rename tests/cputestdata/{x86-Haswell-noTSX.xml => x86_64-Haswell-noTSX.xml} (100%) rename tests/cputestdata/{x86-Haswell.xml => x86_64-Haswell.xml} (100%) rename tests/cputestdata/{x86-baseline-1-result.xml => x86_64-baseline-1-result.xml} (100%) rename tests/cputestdata/{x86-baseline-1.xml => x86_64-baseline-1.xml} (100%) rename tests/cputestdata/{x86-baseline-2-result.xml => x86_64-baseline-2-result.xml} (100%) rename tests/cputestdata/{x86-baseline-2.xml => x86_64-baseline-2.xml} (100%) rename tests/cputestdata/{x86-baseline-3-expanded.xml => x86_64-baseline-3-expanded.xml} (100%) rename tests/cputestdata/{x86-baseline-3-result.xml => x86_64-baseline-3-result.xml} (100%) rename tests/cputestdata/{x86-baseline-3.xml => x86_64-baseline-3.xml} (100%) rename tests/cputestdata/{x86-baseline-4-expanded.xml => x86_64-baseline-4-expanded.xml} (100%) rename tests/cputestdata/{x86-baseline-4-result.xml => x86_64-baseline-4-result.xml} (100%) rename tests/cputestdata/{x86-baseline-4.xml => x86_64-baseline-4.xml} (100%) rename tests/cputestdata/{x86-baseline-5-expanded.xml => x86_64-baseline-5-expanded.xml} (100%) rename tests/cputestdata/{x86-baseline-5-result.xml => x86_64-baseline-5-result.xml} (100%) rename tests/cputestdata/{x86-baseline-5.xml => x86_64-baseline-5.xml} (100%) rename tests/cputestdata/{x86-baseline-6-migratable.xml => x86_64-baseline-6-migratable.xml} (100%) rename tests/cputestdata/{x86-baseline-6-result.xml => x86_64-baseline-6-result.xml} (100%) rename tests/cputestdata/{x86-baseline-6.xml => x86_64-baseline-6.xml} (100%) rename tests/cputestdata/{x86-baseline-7-result.xml => x86_64-baseline-7-result.xml} (100%) rename tests/cputestdata/{x86-baseline-7.xml => x86_64-baseline-7.xml} (100%) rename tests/cputestdata/{x86-baseline-8-result.xml => x86_64-baseline-8-result.xml} (100%) rename tests/cputestdata/{x86-baseline-8.xml => x86_64-baseline-8.xml} (100%) rename tests/cputestdata/{x86-baseline-incompatible-vendors.xml => x86_64-baseline-incompatible-vendors.xml} (100%) rename tests/cputestdata/{x86-baseline-no-vendor-result.xml => x86_64-baseline-no-vendor-result.xml} (100%) rename tests/cputestdata/{x86-baseline-no-vendor.xml => x86_64-baseline-no-vendor.xml} (100%) rename tests/cputestdata/{x86-baseline-some-vendors-result.xml => x86_64-baseline-some-vendors-result.xml} (100%) rename tests/cputestdata/{x86-baseline-some-vendors.xml => x86_64-baseline-some-vendors.xml} (100%) rename tests/cputestdata/{x86-bogus-feature.xml => x86_64-bogus-feature.xml} (100%) rename tests/cputestdata/{x86-bogus-model.xml => x86_64-bogus-model.xml} (100%) rename tests/cputestdata/{x86-bogus-vendor.xml => x86_64-bogus-vendor.xml} (100%) rename tests/cputestdata/{x86-cpuid-A10-5800K-guest.xml => x86_64-cpuid-A10-5800K-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-A10-5800K-host.xml => x86_64-cpuid-A10-5800K-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-A10-5800K-json.xml => x86_64-cpuid-A10-5800K-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-A10-5800K.json => x86_64-cpuid-A10-5800K.json} (100%) rename tests/cputestdata/{x86-cpuid-A10-5800K.xml => x86_64-cpuid-A10-5800K.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-D510-guest.xml => x86_64-cpuid-Atom-D510-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-D510-host.xml => x86_64-cpuid-Atom-D510-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-D510.xml => x86_64-cpuid-Atom-D510.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-N450-guest.xml => x86_64-cpuid-Atom-N450-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-N450-host.xml => x86_64-cpuid-Atom-N450-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Atom-N450.xml => x86_64-cpuid-Atom-N450.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2500-guest.xml => x86_64-cpuid-Core-i5-2500-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2500-host.xml => x86_64-cpuid-Core-i5-2500-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2500-json.xml => x86_64-cpuid-Core-i5-2500-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2500.json => x86_64-cpuid-Core-i5-2500.json} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2500.xml => x86_64-cpuid-Core-i5-2500.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2540M-guest.xml => x86_64-cpuid-Core-i5-2540M-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2540M-host.xml => x86_64-cpuid-Core-i5-2540M-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2540M-json.xml => x86_64-cpuid-Core-i5-2540M-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2540M.json => x86_64-cpuid-Core-i5-2540M.json} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-2540M.xml => x86_64-cpuid-Core-i5-2540M.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-4670T-guest.xml => x86_64-cpuid-Core-i5-4670T-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-4670T-host.xml => x86_64-cpuid-Core-i5-4670T-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-4670T-json.xml => x86_64-cpuid-Core-i5-4670T-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-4670T.json => x86_64-cpuid-Core-i5-4670T.json} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-4670T.xml => x86_64-cpuid-Core-i5-4670T.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-6600-guest.xml => x86_64-cpuid-Core-i5-6600-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-6600-host.xml => x86_64-cpuid-Core-i5-6600-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-6600-json.xml => x86_64-cpuid-Core-i5-6600-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-6600.json => x86_64-cpuid-Core-i5-6600.json} (100%) rename tests/cputestdata/{x86-cpuid-Core-i5-6600.xml => x86_64-cpuid-Core-i5-6600.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-2600-guest.xml => x86_64-cpuid-Core-i7-2600-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-2600-host.xml => x86_64-cpuid-Core-i7-2600-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-2600-json.xml => x86_64-cpuid-Core-i7-2600-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-2600.json => x86_64-cpuid-Core-i7-2600.json} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-2600.xml => x86_64-cpuid-Core-i7-2600.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3520M-guest.xml => x86_64-cpuid-Core-i7-3520M-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3520M-host.xml => x86_64-cpuid-Core-i7-3520M-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3520M.xml => x86_64-cpuid-Core-i7-3520M.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM-guest.xml => x86_64-cpuid-Core-i7-3740QM-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM-host.xml => x86_64-cpuid-Core-i7-3740QM-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM-json.xml => x86_64-cpuid-Core-i7-3740QM-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM.json => x86_64-cpuid-Core-i7-3740QM.json} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM.xml => x86_64-cpuid-Core-i7-3740QM.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3770-guest.xml => x86_64-cpuid-Core-i7-3770-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3770-host.xml => x86_64-cpuid-Core-i7-3770-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3770-json.xml => x86_64-cpuid-Core-i7-3770-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3770.json => x86_64-cpuid-Core-i7-3770.json} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-3770.xml => x86_64-cpuid-Core-i7-3770.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-4600U-guest.xml => x86_64-cpuid-Core-i7-4600U-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-4600U-host.xml => x86_64-cpuid-Core-i7-4600U-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-4600U-json.xml => x86_64-cpuid-Core-i7-4600U-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-4600U.json => x86_64-cpuid-Core-i7-4600U.json} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-4600U.xml => x86_64-cpuid-Core-i7-4600U.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-5600U-guest.xml => x86_64-cpuid-Core-i7-5600U-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-5600U-host.xml => x86_64-cpuid-Core-i7-5600U-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-5600U-json.xml => x86_64-cpuid-Core-i7-5600U-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-5600U.json => x86_64-cpuid-Core-i7-5600U.json} (100%) rename tests/cputestdata/{x86-cpuid-Core-i7-5600U.xml => x86_64-cpuid-Core-i7-5600U.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-E6850-guest.xml => x86_64-cpuid-Core2-E6850-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-E6850-host.xml => x86_64-cpuid-Core2-E6850-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-E6850-json.xml => x86_64-cpuid-Core2-E6850-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-E6850.json => x86_64-cpuid-Core2-E6850.json} (100%) rename tests/cputestdata/{x86-cpuid-Core2-E6850.xml => x86_64-cpuid-Core2-E6850.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-Q9500-guest.xml => x86_64-cpuid-Core2-Q9500-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-Q9500-host.xml => x86_64-cpuid-Core2-Q9500-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Core2-Q9500.xml => x86_64-cpuid-Core2-Q9500.xml} (100%) rename tests/cputestdata/{x86-cpuid-FX-8150-guest.xml => x86_64-cpuid-FX-8150-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-FX-8150-host.xml => x86_64-cpuid-FX-8150-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-FX-8150.xml => x86_64-cpuid-FX-8150.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-1352-guest.xml => x86_64-cpuid-Opteron-1352-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-1352-host.xml => x86_64-cpuid-Opteron-1352-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-1352.xml => x86_64-cpuid-Opteron-1352.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-2350-guest.xml => x86_64-cpuid-Opteron-2350-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-2350-host.xml => x86_64-cpuid-Opteron-2350-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-2350-json.xml => x86_64-cpuid-Opteron-2350-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-2350.json => x86_64-cpuid-Opteron-2350.json} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-2350.xml => x86_64-cpuid-Opteron-2350.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6234-guest.xml => x86_64-cpuid-Opteron-6234-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6234-host.xml => x86_64-cpuid-Opteron-6234-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6234-json.xml => x86_64-cpuid-Opteron-6234-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6234.json => x86_64-cpuid-Opteron-6234.json} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6234.xml => x86_64-cpuid-Opteron-6234.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6282-guest.xml => x86_64-cpuid-Opteron-6282-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6282-host.xml => x86_64-cpuid-Opteron-6282-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Opteron-6282.xml => x86_64-cpuid-Opteron-6282.xml} (100%) rename tests/cputestdata/{x86-cpuid-Pentium-P6100-guest.xml => x86_64-cpuid-Pentium-P6100-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Pentium-P6100-host.xml => x86_64-cpuid-Pentium-P6100-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Pentium-P6100.xml => x86_64-cpuid-Pentium-P6100.xml} (100%) rename tests/cputestdata/{x86-cpuid-Phenom-B95-guest.xml => x86_64-cpuid-Phenom-B95-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Phenom-B95-host.xml => x86_64-cpuid-Phenom-B95-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Phenom-B95-json.xml => x86_64-cpuid-Phenom-B95-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Phenom-B95.json => x86_64-cpuid-Phenom-B95.json} (100%) rename tests/cputestdata/{x86-cpuid-Phenom-B95.xml => x86_64-cpuid-Phenom-B95.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-5110-guest.xml => x86_64-cpuid-Xeon-5110-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-5110-host.xml => x86_64-cpuid-Xeon-5110-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-5110.xml => x86_64-cpuid-Xeon-5110.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245-guest.xml => x86_64-cpuid-Xeon-E3-1245-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245-host.xml => x86_64-cpuid-Xeon-E3-1245-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245-json.xml => x86_64-cpuid-Xeon-E3-1245-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245.json => x86_64-cpuid-Xeon-E3-1245.json} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245.xml => x86_64-cpuid-Xeon-E3-1245.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630-guest.xml => x86_64-cpuid-Xeon-E5-2630-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630-host.xml => x86_64-cpuid-Xeon-E5-2630-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630-json.xml => x86_64-cpuid-Xeon-E5-2630-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630.json => x86_64-cpuid-Xeon-E5-2630.json} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630.xml => x86_64-cpuid-Xeon-E5-2630.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650-guest.xml => x86_64-cpuid-Xeon-E5-2650-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650-host.xml => x86_64-cpuid-Xeon-E5-2650-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650-json.xml => x86_64-cpuid-Xeon-E5-2650-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650.json => x86_64-cpuid-Xeon-E5-2650.json} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650.xml => x86_64-cpuid-Xeon-E5-2650.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820-guest.xml => x86_64-cpuid-Xeon-E7-4820-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820-host.xml => x86_64-cpuid-Xeon-E7-4820-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820-json.xml => x86_64-cpuid-Xeon-E7-4820-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820.json => x86_64-cpuid-Xeon-E7-4820.json} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820.xml => x86_64-cpuid-Xeon-E7-4820.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-W3520-guest.xml => x86_64-cpuid-Xeon-W3520-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-W3520-host.xml => x86_64-cpuid-Xeon-W3520-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-W3520-json.xml => x86_64-cpuid-Xeon-W3520-json.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-W3520.json => x86_64-cpuid-Xeon-W3520.json} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-W3520.xml => x86_64-cpuid-Xeon-W3520.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-X5460-guest.xml => x86_64-cpuid-Xeon-X5460-guest.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-X5460-host.xml => x86_64-cpuid-Xeon-X5460-host.xml} (100%) rename tests/cputestdata/{x86-cpuid-Xeon-X5460.xml => x86_64-cpuid-Xeon-X5460.xml} (100%) rename tests/cputestdata/{x86-exact-disable-extra.xml => x86_64-exact-disable-extra.xml} (100%) rename tests/cputestdata/{x86-exact-disable.xml => x86_64-exact-disable.xml} (100%) rename tests/cputestdata/{x86-exact-disable2.xml => x86_64-exact-disable2.xml} (100%) rename tests/cputestdata/{x86-exact-forbid-extra.xml => x86_64-exact-forbid-extra.xml} (100%) rename tests/cputestdata/{x86-exact-forbid.xml => x86_64-exact-forbid.xml} (100%) rename tests/cputestdata/{x86-exact-force-Haswell.xml => x86_64-exact-force-Haswell.xml} (100%) rename tests/cputestdata/{x86-exact-force.xml => x86_64-exact-force.xml} (100%) rename tests/cputestdata/{x86-exact-require-extra.xml => x86_64-exact-require-extra.xml} (100%) rename tests/cputestdata/{x86-exact-require.xml => x86_64-exact-require.xml} (100%) rename tests/cputestdata/{x86-exact.xml => x86_64-exact.xml} (100%) rename tests/cputestdata/{x86-guest-nofallback.xml => x86_64-guest-nofallback.xml} (100%) rename tests/cputestdata/{x86-guest.xml => x86_64-guest.xml} (100%) rename tests/cputestdata/{x86-host+guest,model486-result.xml => x86_64-host+guest,model486-result.xml} (100%) rename tests/cputestdata/{x86-host+guest,models-result.xml => x86_64-host+guest,models-result.xml} (100%) rename tests/cputestdata/{x86-host+guest-result.xml => x86_64-host+guest-result.xml} (100%) rename tests/cputestdata/{x86-host+guest.xml => x86_64-host+guest.xml} (100%) rename tests/cputestdata/{x86-host+host+host-model,models-result.xml => x86_64-host+host+host-model,models-result.xml} (100%) rename tests/cputestdata/{x86-host+host-model-nofallback.xml => x86_64-host+host-model-nofallback.xml} (100%) rename tests/cputestdata/{x86-host+host-model.xml => x86_64-host+host-model.xml} (100%) rename tests/cputestdata/{x86-host+host-passthrough-features.xml => x86_64-host+host-passthrough-features.xml} (100%) rename tests/cputestdata/{x86-host+host-passthrough.xml => x86_64-host+host-passthrough.xml} (100%) rename tests/cputestdata/{x86-host+min.xml => x86_64-host+min.xml} (100%) rename tests/cputestdata/{x86-host+penryn-force-result.xml => x86_64-host+penryn-force-result.xml} (100%) rename tests/cputestdata/{x86-host+pentium3.xml => x86_64-host+pentium3.xml} (100%) rename tests/cputestdata/{x86-host+strict-force-extra-result.xml => x86_64-host+strict-force-extra-result.xml} (100%) rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell,haswell-result.xml => x86_64-host-Haswell-noTSX+Haswell,haswell-result.xml} (100%) rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml => x86_64-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml} (100%) rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell-noTSX-result.xml => x86_64-host-Haswell-noTSX+Haswell-noTSX-result.xml} (100%) rename tests/cputestdata/{x86-host-Haswell-noTSX.xml => x86_64-host-Haswell-noTSX.xml} (100%) rename tests/cputestdata/{x86-host-SandyBridge.xml => x86_64-host-SandyBridge.xml} (100%) rename tests/cputestdata/{x86-host-amd-fake.xml => x86_64-host-amd-fake.xml} (100%) rename tests/cputestdata/{x86-host-amd.xml => x86_64-host-amd.xml} (100%) rename tests/cputestdata/{x86-host-better+pentium3-result.xml => x86_64-host-better+pentium3-result.xml} (100%) rename tests/cputestdata/{x86-host-better.xml => x86_64-host-better.xml} (100%) rename tests/cputestdata/{x86-host-incomp-arch.xml => x86_64-host-incomp-arch.xml} (100%) rename tests/cputestdata/{x86-host-invtsc+host-model.xml => x86_64-host-invtsc+host-model.xml} (100%) rename tests/cputestdata/{x86-host-invtsc.xml => x86_64-host-invtsc.xml} (100%) rename tests/cputestdata/{x86-host-model-nofallback.xml => x86_64-host-model-nofallback.xml} (100%) rename tests/cputestdata/{x86-host-model.xml => x86_64-host-model.xml} (100%) rename tests/cputestdata/{x86-host-no-vendor.xml => x86_64-host-no-vendor.xml} (100%) rename tests/cputestdata/{x86-host-passthrough-features.xml => x86_64-host-passthrough-features.xml} (100%) rename tests/cputestdata/{x86-host-passthrough.xml => x86_64-host-passthrough.xml} (100%) rename tests/cputestdata/{x86-host-worse+guest-result.xml => x86_64-host-worse+guest-result.xml} (100%) rename tests/cputestdata/{x86-host-worse.xml => x86_64-host-worse.xml} (100%) rename tests/cputestdata/{x86-host.xml => x86_64-host.xml} (100%) rename tests/cputestdata/{x86-min.xml => x86_64-min.xml} (100%) rename tests/cputestdata/{x86-penryn-force.xml => x86_64-penryn-force.xml} (100%) rename tests/cputestdata/{x86-pentium3-amd.xml => x86_64-pentium3-amd.xml} (100%) rename tests/cputestdata/{x86-pentium3.xml => x86_64-pentium3.xml} (100%) rename tests/cputestdata/{x86-strict-disable.xml => x86_64-strict-disable.xml} (100%) rename tests/cputestdata/{x86-strict-force-extra.xml => x86_64-strict-force-extra.xml} (100%) rename tests/cputestdata/{x86-strict-full.xml => x86_64-strict-full.xml} (100%) rename tests/cputestdata/{x86-strict.xml => x86_64-strict.xml} (100%) diff --git a/tests/cputest.c b/tests/cputest.c index 8d761af61..406b40dfe 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -677,13 +677,13 @@ mymain(void) } while (0) /* host to host comparison */ - DO_TEST_COMPARE("x86", "host", "host", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86", "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86", "host", "host-worse", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "host-amd-fake", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86", "host", "host-incomp-arch", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86", "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86", "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE("x86_64", "host", "host", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE("x86_64", "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE("x86_64", "host", "host-worse", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "host-amd-fake", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE("x86_64", "host", "host-incomp-arch", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE("x86_64", "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE("x86_64", "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE); DO_TEST_COMPARE("ppc64", "host", "host", VIR_CPU_COMPARE_IDENTICAL); DO_TEST_COMPARE("ppc64", "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE); @@ -693,28 +693,28 @@ mymain(void) DO_TEST_COMPARE("ppc64", "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE); /* guest to host comparison */ - DO_TEST_COMPARE("x86", "host", "bogus-model", VIR_CPU_COMPARE_ERROR); - DO_TEST_COMPARE("x86", "host", "bogus-feature", VIR_CPU_COMPARE_ERROR); - DO_TEST_COMPARE("x86", "host", "min", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "pentium3", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "exact", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "exact-forbid", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86", "host", "exact-forbid-extra", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "exact-disable", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "exact-disable2", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "exact-disable-extra", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "exact-require", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "exact-require-extra", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86", "host", "exact-force", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "strict", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86", "host", "strict-full", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86", "host", "strict-disable", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86", "host", "strict-force-extra", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86", "host", "guest", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host", "pentium3-amd", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86", "host-amd", "pentium3-amd", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86", "host-worse", "penryn-force", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86", "host-SandyBridge", "exact-force-Haswell", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE("x86_64", "host", "bogus-model", VIR_CPU_COMPARE_ERROR); + DO_TEST_COMPARE("x86_64", "host", "bogus-feature", VIR_CPU_COMPARE_ERROR); + DO_TEST_COMPARE("x86_64", "host", "min", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "pentium3", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "exact", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "exact-forbid", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE("x86_64", "host", "exact-forbid-extra", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "exact-disable", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "exact-disable2", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "exact-disable-extra", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "exact-require", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "exact-require-extra", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE("x86_64", "host", "exact-force", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "strict", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE("x86_64", "host", "strict-full", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE("x86_64", "host", "strict-disable", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE("x86_64", "host", "strict-force-extra", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE("x86_64", "host", "guest", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host", "pentium3-amd", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE("x86_64", "host-amd", "pentium3-amd", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE("x86_64", "host-worse", "penryn-force", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE("x86_64", "host-SandyBridge", "exact-force-Haswell", VIR_CPU_COMPARE_IDENTICAL); DO_TEST_COMPARE("ppc64", "host", "guest-strict", VIR_CPU_COMPARE_IDENTICAL); DO_TEST_COMPARE("ppc64", "host", "guest-exact", VIR_CPU_COMPARE_INCOMPATIBLE); @@ -728,14 +728,14 @@ mymain(void) /* guest updates for migration * automatically compares host CPU with the result */ - DO_TEST_UPDATE("x86", "host", "min", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("x86", "host", "pentium3", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("x86", "host", "guest", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_UPDATE("x86", "host", "host-model", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("x86", "host", "host-model-nofallback", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("x86", "host-invtsc", "host-model", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_UPDATE_ONLY("x86", "host", "host-passthrough"); - DO_TEST_UPDATE_ONLY("x86", "host", "host-passthrough-features"); + DO_TEST_UPDATE("x86_64", "host", "min", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE("x86_64", "host", "pentium3", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE("x86_64", "host", "guest", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_UPDATE("x86_64", "host", "host-model", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE("x86_64", "host", "host-model-nofallback", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE("x86_64", "host-invtsc", "host-model", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_UPDATE_ONLY("x86_64", "host", "host-passthrough"); + DO_TEST_UPDATE_ONLY("x86_64", "host", "host-passthrough-features"); DO_TEST_UPDATE("ppc64", "host", "guest", VIR_CPU_COMPARE_IDENTICAL); DO_TEST_UPDATE("ppc64", "host", "guest-nofallback", VIR_CPU_COMPARE_INCOMPATIBLE); @@ -748,21 +748,21 @@ mymain(void) DO_TEST_UPDATE("ppc64", "host", "guest-compat-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE); /* computing baseline CPUs */ - DO_TEST_BASELINE("x86", "incompatible-vendors", 0, -1); - DO_TEST_BASELINE("x86", "no-vendor", 0, 0); - DO_TEST_BASELINE("x86", "some-vendors", 0, 0); - DO_TEST_BASELINE("x86", "1", 0, 0); - DO_TEST_BASELINE("x86", "2", 0, 0); - DO_TEST_BASELINE("x86", "3", 0, 0); - DO_TEST_BASELINE("x86", "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); - DO_TEST_BASELINE("x86", "4", 0, 0); - DO_TEST_BASELINE("x86", "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); - DO_TEST_BASELINE("x86", "5", 0, 0); - DO_TEST_BASELINE("x86", "5", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); - DO_TEST_BASELINE("x86", "6", 0, 0); - DO_TEST_BASELINE("x86", "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0); - DO_TEST_BASELINE("x86", "7", 0, 0); - DO_TEST_BASELINE("x86", "8", 0, 0); + DO_TEST_BASELINE("x86_64", "incompatible-vendors", 0, -1); + DO_TEST_BASELINE("x86_64", "no-vendor", 0, 0); + DO_TEST_BASELINE("x86_64", "some-vendors", 0, 0); + DO_TEST_BASELINE("x86_64", "1", 0, 0); + DO_TEST_BASELINE("x86_64", "2", 0, 0); + DO_TEST_BASELINE("x86_64", "3", 0, 0); + DO_TEST_BASELINE("x86_64", "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); + DO_TEST_BASELINE("x86_64", "4", 0, 0); + DO_TEST_BASELINE("x86_64", "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); + DO_TEST_BASELINE("x86_64", "5", 0, 0); + DO_TEST_BASELINE("x86_64", "5", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); + DO_TEST_BASELINE("x86_64", "6", 0, 0); + DO_TEST_BASELINE("x86_64", "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0); + DO_TEST_BASELINE("x86_64", "7", 0, 0); + DO_TEST_BASELINE("x86_64", "8", 0, 0); DO_TEST_BASELINE("ppc64", "incompatible-vendors", 0, -1); DO_TEST_BASELINE("ppc64", "no-vendor", 0, 0); @@ -771,29 +771,29 @@ mymain(void) DO_TEST_BASELINE("ppc64", "legacy", 0, -1); /* CPU features */ - DO_TEST_HASFEATURE("x86", "host", "vmx", YES); - DO_TEST_HASFEATURE("x86", "host", "lm", YES); - DO_TEST_HASFEATURE("x86", "host", "sse4.1", YES); - DO_TEST_HASFEATURE("x86", "host", "3dnowext", NO); - DO_TEST_HASFEATURE("x86", "host", "skinit", NO); - DO_TEST_HASFEATURE("x86", "host", "foo", FAIL); + DO_TEST_HASFEATURE("x86_64", "host", "vmx", YES); + DO_TEST_HASFEATURE("x86_64", "host", "lm", YES); + DO_TEST_HASFEATURE("x86_64", "host", "sse4.1", YES); + DO_TEST_HASFEATURE("x86_64", "host", "3dnowext", NO); + DO_TEST_HASFEATURE("x86_64", "host", "skinit", NO); + DO_TEST_HASFEATURE("x86_64", "host", "foo", FAIL); /* computing guest data and decoding the data into a guest CPU XML */ - DO_TEST_GUESTCPU("x86", "host", "guest", NULL, 0); - DO_TEST_GUESTCPU("x86", "host-better", "pentium3", NULL, 0); - DO_TEST_GUESTCPU("x86", "host-worse", "guest", NULL, 0); - DO_TEST_GUESTCPU("x86", "host", "strict-force-extra", NULL, 0); - DO_TEST_GUESTCPU("x86", "host", "penryn-force", NULL, 0); - DO_TEST_GUESTCPU("x86", "host", "guest", model486, 0); - DO_TEST_GUESTCPU("x86", "host", "guest", models, 0); - DO_TEST_GUESTCPU("x86", "host", "guest", nomodel, -1); - DO_TEST_GUESTCPU("x86", "host", "guest-nofallback", models, -1); - DO_TEST_GUESTCPU("x86", "host", "host+host-model", models, 0); - DO_TEST_GUESTCPU("x86", "host", "host+host-model-nofallback", models, -1); - DO_TEST_GUESTCPU("x86", "host-Haswell-noTSX", "Haswell", haswell, 0); - DO_TEST_GUESTCPU("x86", "host-Haswell-noTSX", "Haswell-noTSX", haswell, 0); - DO_TEST_GUESTCPU("x86", "host-Haswell-noTSX", "Haswell-noTSX-nofallback", haswell, -1); - DO_TEST_GUESTCPU("x86", "host-Haswell-noTSX", "Haswell-noTSX", NULL, 0); + DO_TEST_GUESTCPU("x86_64", "host", "guest", NULL, 0); + DO_TEST_GUESTCPU("x86_64", "host-better", "pentium3", NULL, 0); + DO_TEST_GUESTCPU("x86_64", "host-worse", "guest", NULL, 0); + DO_TEST_GUESTCPU("x86_64", "host", "strict-force-extra", NULL, 0); + DO_TEST_GUESTCPU("x86_64", "host", "penryn-force", NULL, 0); + DO_TEST_GUESTCPU("x86_64", "host", "guest", model486, 0); + DO_TEST_GUESTCPU("x86_64", "host", "guest", models, 0); + DO_TEST_GUESTCPU("x86_64", "host", "guest", nomodel, -1); + DO_TEST_GUESTCPU("x86_64", "host", "guest-nofallback", models, -1); + DO_TEST_GUESTCPU("x86_64", "host", "host+host-model", models, 0); + DO_TEST_GUESTCPU("x86_64", "host", "host+host-model-nofallback", models, -1); + DO_TEST_GUESTCPU("x86_64", "host-Haswell-noTSX", "Haswell", haswell, 0); + DO_TEST_GUESTCPU("x86_64", "host-Haswell-noTSX", "Haswell-noTSX", haswell, 0); + DO_TEST_GUESTCPU("x86_64", "host-Haswell-noTSX", "Haswell-noTSX-nofallback", haswell, -1); + DO_TEST_GUESTCPU("x86_64", "host-Haswell-noTSX", "Haswell-noTSX", NULL, 0); DO_TEST_GUESTCPU("ppc64", "host", "guest", ppc_models, 0); DO_TEST_GUESTCPU("ppc64", "host", "guest-nofallback", ppc_models, -1); @@ -801,35 +801,35 @@ mymain(void) DO_TEST_GUESTCPU("ppc64", "host", "guest-legacy-incompatible", ppc_models, -1); DO_TEST_GUESTCPU("ppc64", "host", "guest-legacy-invalid", ppc_models, -1); - DO_TEST_CPUID("x86", "A10-5800K", true); - DO_TEST_CPUID("x86", "Atom-D510", false); - DO_TEST_CPUID("x86", "Atom-N450", false); - DO_TEST_CPUID("x86", "Core-i5-2500", true); - DO_TEST_CPUID("x86", "Core-i5-2540M", true); - DO_TEST_CPUID("x86", "Core-i5-4670T", true); - DO_TEST_CPUID("x86", "Core-i5-6600", true); - DO_TEST_CPUID("x86", "Core-i7-2600", true); - DO_TEST_CPUID("x86", "Core-i7-3520M", false); - DO_TEST_CPUID("x86", "Core-i7-3740QM", true); - DO_TEST_CPUID("x86", "Core-i7-3770", true); - DO_TEST_CPUID("x86", "Core-i7-4600U", true); - DO_TEST_CPUID("x86", "Core-i7-5600U", true); - DO_TEST_CPUID("x86", "Core2-E6850", true); - DO_TEST_CPUID("x86", "Core2-Q9500", false); - DO_TEST_CPUID("x86", "FX-8150", false); - DO_TEST_CPUID("x86", "Opteron-1352", false); - DO_TEST_CPUID("x86", "Opteron-2350", true); - DO_TEST_CPUID("x86", "Opteron-6234", true); - DO_TEST_CPUID("x86", "Opteron-6282", false); - DO_TEST_CPUID("x86", "Pentium-P6100", false); - DO_TEST_CPUID("x86", "Phenom-B95", true); - DO_TEST_CPUID("x86", "Xeon-5110", false); - DO_TEST_CPUID("x86", "Xeon-E3-1245", true); - DO_TEST_CPUID("x86", "Xeon-E5-2630", true); - DO_TEST_CPUID("x86", "Xeon-E5-2650", true); - DO_TEST_CPUID("x86", "Xeon-E7-4820", true); - DO_TEST_CPUID("x86", "Xeon-W3520", true); - DO_TEST_CPUID("x86", "Xeon-X5460", false); + DO_TEST_CPUID("x86_64", "A10-5800K", true); + DO_TEST_CPUID("x86_64", "Atom-D510", false); + DO_TEST_CPUID("x86_64", "Atom-N450", false); + DO_TEST_CPUID("x86_64", "Core-i5-2500", true); + DO_TEST_CPUID("x86_64", "Core-i5-2540M", true); + DO_TEST_CPUID("x86_64", "Core-i5-4670T", true); + DO_TEST_CPUID("x86_64", "Core-i5-6600", true); + DO_TEST_CPUID("x86_64", "Core-i7-2600", true); + DO_TEST_CPUID("x86_64", "Core-i7-3520M", false); + DO_TEST_CPUID("x86_64", "Core-i7-3740QM", true); + DO_TEST_CPUID("x86_64", "Core-i7-3770", true); + DO_TEST_CPUID("x86_64", "Core-i7-4600U", true); + DO_TEST_CPUID("x86_64", "Core-i7-5600U", true); + DO_TEST_CPUID("x86_64", "Core2-E6850", true); + DO_TEST_CPUID("x86_64", "Core2-Q9500", false); + DO_TEST_CPUID("x86_64", "FX-8150", false); + DO_TEST_CPUID("x86_64", "Opteron-1352", false); + DO_TEST_CPUID("x86_64", "Opteron-2350", true); + DO_TEST_CPUID("x86_64", "Opteron-6234", true); + DO_TEST_CPUID("x86_64", "Opteron-6282", false); + DO_TEST_CPUID("x86_64", "Pentium-P6100", false); + DO_TEST_CPUID("x86_64", "Phenom-B95", true); + DO_TEST_CPUID("x86_64", "Xeon-5110", false); + DO_TEST_CPUID("x86_64", "Xeon-E3-1245", true); + DO_TEST_CPUID("x86_64", "Xeon-E5-2630", true); + DO_TEST_CPUID("x86_64", "Xeon-E5-2650", true); + DO_TEST_CPUID("x86_64", "Xeon-E7-4820", true); + DO_TEST_CPUID("x86_64", "Xeon-W3520", true); + DO_TEST_CPUID("x86_64", "Xeon-X5460", false); #if WITH_QEMU && WITH_YAJL qemuTestDriverFree(&driver); diff --git a/tests/cputestdata/cpu-parse.sh b/tests/cputestdata/cpu-parse.sh index c3b5ef106..3db401daa 100755 --- a/tests/cputestdata/cpu-parse.sh +++ b/tests/cputestdata/cpu-parse.sh @@ -18,7 +18,7 @@ fname=`sed -e 's/^ *//; s/ APU .*//; s/ \(v[0-9]\|SE\)$//; s/ /-/g' <<<"$model"` -fname="x86-cpuid-$fname" +fname="x86_64-cpuid-$fname" xml() { diff --git a/tests/cputestdata/x86-Haswell-noTSX-nofallback.xml b/tests/cputestdata/x86_64-Haswell-noTSX-nofallback.xml similarity index 100% rename from tests/cputestdata/x86-Haswell-noTSX-nofallback.xml rename to tests/cputestdata/x86_64-Haswell-noTSX-nofallback.xml diff --git a/tests/cputestdata/x86-Haswell-noTSX.xml b/tests/cputestdata/x86_64-Haswell-noTSX.xml similarity index 100% rename from tests/cputestdata/x86-Haswell-noTSX.xml rename to tests/cputestdata/x86_64-Haswell-noTSX.xml diff --git a/tests/cputestdata/x86-Haswell.xml b/tests/cputestdata/x86_64-Haswell.xml similarity index 100% rename from tests/cputestdata/x86-Haswell.xml rename to tests/cputestdata/x86_64-Haswell.xml diff --git a/tests/cputestdata/x86-baseline-1-result.xml b/tests/cputestdata/x86_64-baseline-1-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-1-result.xml rename to tests/cputestdata/x86_64-baseline-1-result.xml diff --git a/tests/cputestdata/x86-baseline-1.xml b/tests/cputestdata/x86_64-baseline-1.xml similarity index 100% rename from tests/cputestdata/x86-baseline-1.xml rename to tests/cputestdata/x86_64-baseline-1.xml diff --git a/tests/cputestdata/x86-baseline-2-result.xml b/tests/cputestdata/x86_64-baseline-2-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-2-result.xml rename to tests/cputestdata/x86_64-baseline-2-result.xml diff --git a/tests/cputestdata/x86-baseline-2.xml b/tests/cputestdata/x86_64-baseline-2.xml similarity index 100% rename from tests/cputestdata/x86-baseline-2.xml rename to tests/cputestdata/x86_64-baseline-2.xml diff --git a/tests/cputestdata/x86-baseline-3-expanded.xml b/tests/cputestdata/x86_64-baseline-3-expanded.xml similarity index 100% rename from tests/cputestdata/x86-baseline-3-expanded.xml rename to tests/cputestdata/x86_64-baseline-3-expanded.xml diff --git a/tests/cputestdata/x86-baseline-3-result.xml b/tests/cputestdata/x86_64-baseline-3-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-3-result.xml rename to tests/cputestdata/x86_64-baseline-3-result.xml diff --git a/tests/cputestdata/x86-baseline-3.xml b/tests/cputestdata/x86_64-baseline-3.xml similarity index 100% rename from tests/cputestdata/x86-baseline-3.xml rename to tests/cputestdata/x86_64-baseline-3.xml diff --git a/tests/cputestdata/x86-baseline-4-expanded.xml b/tests/cputestdata/x86_64-baseline-4-expanded.xml similarity index 100% rename from tests/cputestdata/x86-baseline-4-expanded.xml rename to tests/cputestdata/x86_64-baseline-4-expanded.xml diff --git a/tests/cputestdata/x86-baseline-4-result.xml b/tests/cputestdata/x86_64-baseline-4-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-4-result.xml rename to tests/cputestdata/x86_64-baseline-4-result.xml diff --git a/tests/cputestdata/x86-baseline-4.xml b/tests/cputestdata/x86_64-baseline-4.xml similarity index 100% rename from tests/cputestdata/x86-baseline-4.xml rename to tests/cputestdata/x86_64-baseline-4.xml diff --git a/tests/cputestdata/x86-baseline-5-expanded.xml b/tests/cputestdata/x86_64-baseline-5-expanded.xml similarity index 100% rename from tests/cputestdata/x86-baseline-5-expanded.xml rename to tests/cputestdata/x86_64-baseline-5-expanded.xml diff --git a/tests/cputestdata/x86-baseline-5-result.xml b/tests/cputestdata/x86_64-baseline-5-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-5-result.xml rename to tests/cputestdata/x86_64-baseline-5-result.xml diff --git a/tests/cputestdata/x86-baseline-5.xml b/tests/cputestdata/x86_64-baseline-5.xml similarity index 100% rename from tests/cputestdata/x86-baseline-5.xml rename to tests/cputestdata/x86_64-baseline-5.xml diff --git a/tests/cputestdata/x86-baseline-6-migratable.xml b/tests/cputestdata/x86_64-baseline-6-migratable.xml similarity index 100% rename from tests/cputestdata/x86-baseline-6-migratable.xml rename to tests/cputestdata/x86_64-baseline-6-migratable.xml diff --git a/tests/cputestdata/x86-baseline-6-result.xml b/tests/cputestdata/x86_64-baseline-6-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-6-result.xml rename to tests/cputestdata/x86_64-baseline-6-result.xml diff --git a/tests/cputestdata/x86-baseline-6.xml b/tests/cputestdata/x86_64-baseline-6.xml similarity index 100% rename from tests/cputestdata/x86-baseline-6.xml rename to tests/cputestdata/x86_64-baseline-6.xml diff --git a/tests/cputestdata/x86-baseline-7-result.xml b/tests/cputestdata/x86_64-baseline-7-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-7-result.xml rename to tests/cputestdata/x86_64-baseline-7-result.xml diff --git a/tests/cputestdata/x86-baseline-7.xml b/tests/cputestdata/x86_64-baseline-7.xml similarity index 100% rename from tests/cputestdata/x86-baseline-7.xml rename to tests/cputestdata/x86_64-baseline-7.xml diff --git a/tests/cputestdata/x86-baseline-8-result.xml b/tests/cputestdata/x86_64-baseline-8-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-8-result.xml rename to tests/cputestdata/x86_64-baseline-8-result.xml diff --git a/tests/cputestdata/x86-baseline-8.xml b/tests/cputestdata/x86_64-baseline-8.xml similarity index 100% rename from tests/cputestdata/x86-baseline-8.xml rename to tests/cputestdata/x86_64-baseline-8.xml diff --git a/tests/cputestdata/x86-baseline-incompatible-vendors.xml b/tests/cputestdata/x86_64-baseline-incompatible-vendors.xml similarity index 100% rename from tests/cputestdata/x86-baseline-incompatible-vendors.xml rename to tests/cputestdata/x86_64-baseline-incompatible-vendors.xml diff --git a/tests/cputestdata/x86-baseline-no-vendor-result.xml b/tests/cputestdata/x86_64-baseline-no-vendor-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-no-vendor-result.xml rename to tests/cputestdata/x86_64-baseline-no-vendor-result.xml diff --git a/tests/cputestdata/x86-baseline-no-vendor.xml b/tests/cputestdata/x86_64-baseline-no-vendor.xml similarity index 100% rename from tests/cputestdata/x86-baseline-no-vendor.xml rename to tests/cputestdata/x86_64-baseline-no-vendor.xml diff --git a/tests/cputestdata/x86-baseline-some-vendors-result.xml b/tests/cputestdata/x86_64-baseline-some-vendors-result.xml similarity index 100% rename from tests/cputestdata/x86-baseline-some-vendors-result.xml rename to tests/cputestdata/x86_64-baseline-some-vendors-result.xml diff --git a/tests/cputestdata/x86-baseline-some-vendors.xml b/tests/cputestdata/x86_64-baseline-some-vendors.xml similarity index 100% rename from tests/cputestdata/x86-baseline-some-vendors.xml rename to tests/cputestdata/x86_64-baseline-some-vendors.xml diff --git a/tests/cputestdata/x86-bogus-feature.xml b/tests/cputestdata/x86_64-bogus-feature.xml similarity index 100% rename from tests/cputestdata/x86-bogus-feature.xml rename to tests/cputestdata/x86_64-bogus-feature.xml diff --git a/tests/cputestdata/x86-bogus-model.xml b/tests/cputestdata/x86_64-bogus-model.xml similarity index 100% rename from tests/cputestdata/x86-bogus-model.xml rename to tests/cputestdata/x86_64-bogus-model.xml diff --git a/tests/cputestdata/x86-bogus-vendor.xml b/tests/cputestdata/x86_64-bogus-vendor.xml similarity index 100% rename from tests/cputestdata/x86-bogus-vendor.xml rename to tests/cputestdata/x86_64-bogus-vendor.xml diff --git a/tests/cputestdata/x86-cpuid-A10-5800K-guest.xml b/tests/cputestdata/x86_64-cpuid-A10-5800K-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-A10-5800K-guest.xml rename to tests/cputestdata/x86_64-cpuid-A10-5800K-guest.xml diff --git a/tests/cputestdata/x86-cpuid-A10-5800K-host.xml b/tests/cputestdata/x86_64-cpuid-A10-5800K-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-A10-5800K-host.xml rename to tests/cputestdata/x86_64-cpuid-A10-5800K-host.xml diff --git a/tests/cputestdata/x86-cpuid-A10-5800K-json.xml b/tests/cputestdata/x86_64-cpuid-A10-5800K-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-A10-5800K-json.xml rename to tests/cputestdata/x86_64-cpuid-A10-5800K-json.xml diff --git a/tests/cputestdata/x86-cpuid-A10-5800K.json b/tests/cputestdata/x86_64-cpuid-A10-5800K.json similarity index 100% rename from tests/cputestdata/x86-cpuid-A10-5800K.json rename to tests/cputestdata/x86_64-cpuid-A10-5800K.json diff --git a/tests/cputestdata/x86-cpuid-A10-5800K.xml b/tests/cputestdata/x86_64-cpuid-A10-5800K.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-A10-5800K.xml rename to tests/cputestdata/x86_64-cpuid-A10-5800K.xml diff --git a/tests/cputestdata/x86-cpuid-Atom-D510-guest.xml b/tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Atom-D510-guest.xml rename to tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Atom-D510-host.xml b/tests/cputestdata/x86_64-cpuid-Atom-D510-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Atom-D510-host.xml rename to tests/cputestdata/x86_64-cpuid-Atom-D510-host.xml diff --git a/tests/cputestdata/x86-cpuid-Atom-D510.xml b/tests/cputestdata/x86_64-cpuid-Atom-D510.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Atom-D510.xml rename to tests/cputestdata/x86_64-cpuid-Atom-D510.xml diff --git a/tests/cputestdata/x86-cpuid-Atom-N450-guest.xml b/tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Atom-N450-guest.xml rename to tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Atom-N450-host.xml b/tests/cputestdata/x86_64-cpuid-Atom-N450-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Atom-N450-host.xml rename to tests/cputestdata/x86_64-cpuid-Atom-N450-host.xml diff --git a/tests/cputestdata/x86-cpuid-Atom-N450.xml b/tests/cputestdata/x86_64-cpuid-Atom-N450.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Atom-N450.xml rename to tests/cputestdata/x86_64-cpuid-Atom-N450.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2500-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2500-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2500-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-2500-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2500-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2500-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2500-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-2500-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2500-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2500-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2500-json.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-2500-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2500.json b/tests/cputestdata/x86_64-cpuid-Core-i5-2500.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2500.json rename to tests/cputestdata/x86_64-cpuid-Core-i5-2500.json diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2500.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2500.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2500.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-2500.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2540M-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2540M-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-2540M-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2540M-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2540M-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-2540M-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2540M-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2540M-json.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-2540M-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2540M.json b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2540M.json rename to tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json diff --git a/tests/cputestdata/x86-cpuid-Core-i5-2540M.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-2540M.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-2540M.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-4670T-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-4670T-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-4670T-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-4670T-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-4670T-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-4670T-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-4670T-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-4670T-json.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-4670T-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-4670T.json b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-4670T.json rename to tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json diff --git a/tests/cputestdata/x86-cpuid-Core-i5-4670T.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-4670T.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-4670T.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-6600-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-6600-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-6600-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-6600-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-6600-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-6600-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-6600-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-6600-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-6600-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-6600-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-6600-json.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-6600-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i5-6600.json b/tests/cputestdata/x86_64-cpuid-Core-i5-6600.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-6600.json rename to tests/cputestdata/x86_64-cpuid-Core-i5-6600.json diff --git a/tests/cputestdata/x86-cpuid-Core-i5-6600.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-6600.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i5-6600.xml rename to tests/cputestdata/x86_64-cpuid-Core-i5-6600.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-2600-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-2600-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-2600-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-2600-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-2600-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-2600-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-2600-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-2600-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-2600-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-2600-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-2600-json.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-2600-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-2600.json b/tests/cputestdata/x86_64-cpuid-Core-i7-2600.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-2600.json rename to tests/cputestdata/x86_64-cpuid-Core-i7-2600.json diff --git a/tests/cputestdata/x86-cpuid-Core-i7-2600.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-2600.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-2600.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-2600.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3520M-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3520M-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3520M-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3520M-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3520M-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3520M-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3520M-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3520M-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3520M.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3520M.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3520M.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3520M.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3740QM-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3740QM-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3740QM-json.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM.json b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3740QM.json rename to tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3740QM.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3770-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3770-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3770-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3770-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3770-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3770-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3770-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3770-json.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3770-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770.json b/tests/cputestdata/x86_64-cpuid-Core-i7-3770.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3770.json rename to tests/cputestdata/x86_64-cpuid-Core-i7-3770.json diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3770.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-3770.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-3770.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-4600U-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-4600U-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-4600U-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-4600U-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-4600U-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-4600U-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-4600U-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-4600U-json.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-4600U-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-4600U.json b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-4600U.json rename to tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json diff --git a/tests/cputestdata/x86-cpuid-Core-i7-4600U.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-4600U.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-4600U.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-5600U-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-5600U-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-5600U-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-5600U-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-5600U-host.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-5600U-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-5600U-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-5600U-json.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-5600U-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core-i7-5600U.json b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-5600U.json rename to tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json diff --git a/tests/cputestdata/x86-cpuid-Core-i7-5600U.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core-i7-5600U.xml rename to tests/cputestdata/x86_64-cpuid-Core-i7-5600U.xml diff --git a/tests/cputestdata/x86-cpuid-Core2-E6850-guest.xml b/tests/cputestdata/x86_64-cpuid-Core2-E6850-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core2-E6850-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core2-E6850-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core2-E6850-host.xml b/tests/cputestdata/x86_64-cpuid-Core2-E6850-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core2-E6850-host.xml rename to tests/cputestdata/x86_64-cpuid-Core2-E6850-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core2-E6850-json.xml b/tests/cputestdata/x86_64-cpuid-Core2-E6850-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core2-E6850-json.xml rename to tests/cputestdata/x86_64-cpuid-Core2-E6850-json.xml diff --git a/tests/cputestdata/x86-cpuid-Core2-E6850.json b/tests/cputestdata/x86_64-cpuid-Core2-E6850.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Core2-E6850.json rename to tests/cputestdata/x86_64-cpuid-Core2-E6850.json diff --git a/tests/cputestdata/x86-cpuid-Core2-E6850.xml b/tests/cputestdata/x86_64-cpuid-Core2-E6850.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core2-E6850.xml rename to tests/cputestdata/x86_64-cpuid-Core2-E6850.xml diff --git a/tests/cputestdata/x86-cpuid-Core2-Q9500-guest.xml b/tests/cputestdata/x86_64-cpuid-Core2-Q9500-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core2-Q9500-guest.xml rename to tests/cputestdata/x86_64-cpuid-Core2-Q9500-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Core2-Q9500-host.xml b/tests/cputestdata/x86_64-cpuid-Core2-Q9500-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core2-Q9500-host.xml rename to tests/cputestdata/x86_64-cpuid-Core2-Q9500-host.xml diff --git a/tests/cputestdata/x86-cpuid-Core2-Q9500.xml b/tests/cputestdata/x86_64-cpuid-Core2-Q9500.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Core2-Q9500.xml rename to tests/cputestdata/x86_64-cpuid-Core2-Q9500.xml diff --git a/tests/cputestdata/x86-cpuid-FX-8150-guest.xml b/tests/cputestdata/x86_64-cpuid-FX-8150-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-FX-8150-guest.xml rename to tests/cputestdata/x86_64-cpuid-FX-8150-guest.xml diff --git a/tests/cputestdata/x86-cpuid-FX-8150-host.xml b/tests/cputestdata/x86_64-cpuid-FX-8150-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-FX-8150-host.xml rename to tests/cputestdata/x86_64-cpuid-FX-8150-host.xml diff --git a/tests/cputestdata/x86-cpuid-FX-8150.xml b/tests/cputestdata/x86_64-cpuid-FX-8150.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-FX-8150.xml rename to tests/cputestdata/x86_64-cpuid-FX-8150.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-1352-guest.xml b/tests/cputestdata/x86_64-cpuid-Opteron-1352-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-1352-guest.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-1352-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-1352-host.xml b/tests/cputestdata/x86_64-cpuid-Opteron-1352-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-1352-host.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-1352-host.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-1352.xml b/tests/cputestdata/x86_64-cpuid-Opteron-1352.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-1352.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-1352.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350-guest.xml b/tests/cputestdata/x86_64-cpuid-Opteron-2350-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-2350-guest.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-2350-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350-host.xml b/tests/cputestdata/x86_64-cpuid-Opteron-2350-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-2350-host.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-2350-host.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350-json.xml b/tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-2350-json.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350.json b/tests/cputestdata/x86_64-cpuid-Opteron-2350.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-2350.json rename to tests/cputestdata/x86_64-cpuid-Opteron-2350.json diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350.xml b/tests/cputestdata/x86_64-cpuid-Opteron-2350.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-2350.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-2350.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234-guest.xml b/tests/cputestdata/x86_64-cpuid-Opteron-6234-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-6234-guest.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-6234-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234-host.xml b/tests/cputestdata/x86_64-cpuid-Opteron-6234-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-6234-host.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-6234-host.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234-json.xml b/tests/cputestdata/x86_64-cpuid-Opteron-6234-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-6234-json.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-6234-json.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234.json b/tests/cputestdata/x86_64-cpuid-Opteron-6234.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-6234.json rename to tests/cputestdata/x86_64-cpuid-Opteron-6234.json diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234.xml b/tests/cputestdata/x86_64-cpuid-Opteron-6234.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-6234.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-6234.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-6282-guest.xml b/tests/cputestdata/x86_64-cpuid-Opteron-6282-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-6282-guest.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-6282-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-6282-host.xml b/tests/cputestdata/x86_64-cpuid-Opteron-6282-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-6282-host.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-6282-host.xml diff --git a/tests/cputestdata/x86-cpuid-Opteron-6282.xml b/tests/cputestdata/x86_64-cpuid-Opteron-6282.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Opteron-6282.xml rename to tests/cputestdata/x86_64-cpuid-Opteron-6282.xml diff --git a/tests/cputestdata/x86-cpuid-Pentium-P6100-guest.xml b/tests/cputestdata/x86_64-cpuid-Pentium-P6100-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Pentium-P6100-guest.xml rename to tests/cputestdata/x86_64-cpuid-Pentium-P6100-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Pentium-P6100-host.xml b/tests/cputestdata/x86_64-cpuid-Pentium-P6100-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Pentium-P6100-host.xml rename to tests/cputestdata/x86_64-cpuid-Pentium-P6100-host.xml diff --git a/tests/cputestdata/x86-cpuid-Pentium-P6100.xml b/tests/cputestdata/x86_64-cpuid-Pentium-P6100.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Pentium-P6100.xml rename to tests/cputestdata/x86_64-cpuid-Pentium-P6100.xml diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95-guest.xml b/tests/cputestdata/x86_64-cpuid-Phenom-B95-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Phenom-B95-guest.xml rename to tests/cputestdata/x86_64-cpuid-Phenom-B95-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95-host.xml b/tests/cputestdata/x86_64-cpuid-Phenom-B95-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Phenom-B95-host.xml rename to tests/cputestdata/x86_64-cpuid-Phenom-B95-host.xml diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95-json.xml b/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Phenom-B95-json.xml rename to tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95.json b/tests/cputestdata/x86_64-cpuid-Phenom-B95.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Phenom-B95.json rename to tests/cputestdata/x86_64-cpuid-Phenom-B95.json diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95.xml b/tests/cputestdata/x86_64-cpuid-Phenom-B95.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Phenom-B95.xml rename to tests/cputestdata/x86_64-cpuid-Phenom-B95.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-5110-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-5110-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-5110-guest.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-5110-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-5110-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-5110-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-5110-host.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-5110-host.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-5110.xml b/tests/cputestdata/x86_64-cpuid-Xeon-5110.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-5110.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-5110.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E3-1245-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E3-1245-guest.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E3-1245-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E3-1245-host.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-host.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E3-1245-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E3-1245-json.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-json.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E3-1245.json b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E3-1245.json rename to tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json diff --git a/tests/cputestdata/x86-cpuid-Xeon-E3-1245.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E3-1245.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2630-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2630-guest.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2630-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2630-host.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-host.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2630-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2630-json.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-json.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2630.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2630.json rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2630.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2630.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2650-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2650-guest.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2650-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2650-host.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-host.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2650-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2650-json.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-json.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2650.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2650.json rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json diff --git a/tests/cputestdata/x86-cpuid-Xeon-E5-2650.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E5-2650.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E7-4820-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E7-4820-guest.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E7-4820-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E7-4820-host.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-host.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E7-4820-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E7-4820-json.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-E7-4820.json b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E7-4820.json rename to tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json diff --git a/tests/cputestdata/x86-cpuid-Xeon-E7-4820.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-E7-4820.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-W3520-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-W3520-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-W3520-guest.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-W3520-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-W3520-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-W3520-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-W3520-host.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-W3520-host.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-W3520-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-W3520-json.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-W3520-json.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-W3520-json.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-W3520.json b/tests/cputestdata/x86_64-cpuid-Xeon-W3520.json similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-W3520.json rename to tests/cputestdata/x86_64-cpuid-Xeon-W3520.json diff --git a/tests/cputestdata/x86-cpuid-Xeon-W3520.xml b/tests/cputestdata/x86_64-cpuid-Xeon-W3520.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-W3520.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-W3520.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-X5460-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-X5460-guest.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-X5460-guest.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-X5460-guest.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-X5460-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-X5460-host.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-X5460-host.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-X5460-host.xml diff --git a/tests/cputestdata/x86-cpuid-Xeon-X5460.xml b/tests/cputestdata/x86_64-cpuid-Xeon-X5460.xml similarity index 100% rename from tests/cputestdata/x86-cpuid-Xeon-X5460.xml rename to tests/cputestdata/x86_64-cpuid-Xeon-X5460.xml diff --git a/tests/cputestdata/x86-exact-disable-extra.xml b/tests/cputestdata/x86_64-exact-disable-extra.xml similarity index 100% rename from tests/cputestdata/x86-exact-disable-extra.xml rename to tests/cputestdata/x86_64-exact-disable-extra.xml diff --git a/tests/cputestdata/x86-exact-disable.xml b/tests/cputestdata/x86_64-exact-disable.xml similarity index 100% rename from tests/cputestdata/x86-exact-disable.xml rename to tests/cputestdata/x86_64-exact-disable.xml diff --git a/tests/cputestdata/x86-exact-disable2.xml b/tests/cputestdata/x86_64-exact-disable2.xml similarity index 100% rename from tests/cputestdata/x86-exact-disable2.xml rename to tests/cputestdata/x86_64-exact-disable2.xml diff --git a/tests/cputestdata/x86-exact-forbid-extra.xml b/tests/cputestdata/x86_64-exact-forbid-extra.xml similarity index 100% rename from tests/cputestdata/x86-exact-forbid-extra.xml rename to tests/cputestdata/x86_64-exact-forbid-extra.xml diff --git a/tests/cputestdata/x86-exact-forbid.xml b/tests/cputestdata/x86_64-exact-forbid.xml similarity index 100% rename from tests/cputestdata/x86-exact-forbid.xml rename to tests/cputestdata/x86_64-exact-forbid.xml diff --git a/tests/cputestdata/x86-exact-force-Haswell.xml b/tests/cputestdata/x86_64-exact-force-Haswell.xml similarity index 100% rename from tests/cputestdata/x86-exact-force-Haswell.xml rename to tests/cputestdata/x86_64-exact-force-Haswell.xml diff --git a/tests/cputestdata/x86-exact-force.xml b/tests/cputestdata/x86_64-exact-force.xml similarity index 100% rename from tests/cputestdata/x86-exact-force.xml rename to tests/cputestdata/x86_64-exact-force.xml diff --git a/tests/cputestdata/x86-exact-require-extra.xml b/tests/cputestdata/x86_64-exact-require-extra.xml similarity index 100% rename from tests/cputestdata/x86-exact-require-extra.xml rename to tests/cputestdata/x86_64-exact-require-extra.xml diff --git a/tests/cputestdata/x86-exact-require.xml b/tests/cputestdata/x86_64-exact-require.xml similarity index 100% rename from tests/cputestdata/x86-exact-require.xml rename to tests/cputestdata/x86_64-exact-require.xml diff --git a/tests/cputestdata/x86-exact.xml b/tests/cputestdata/x86_64-exact.xml similarity index 100% rename from tests/cputestdata/x86-exact.xml rename to tests/cputestdata/x86_64-exact.xml diff --git a/tests/cputestdata/x86-guest-nofallback.xml b/tests/cputestdata/x86_64-guest-nofallback.xml similarity index 100% rename from tests/cputestdata/x86-guest-nofallback.xml rename to tests/cputestdata/x86_64-guest-nofallback.xml diff --git a/tests/cputestdata/x86-guest.xml b/tests/cputestdata/x86_64-guest.xml similarity index 100% rename from tests/cputestdata/x86-guest.xml rename to tests/cputestdata/x86_64-guest.xml diff --git a/tests/cputestdata/x86-host+guest,model486-result.xml b/tests/cputestdata/x86_64-host+guest,model486-result.xml similarity index 100% rename from tests/cputestdata/x86-host+guest,model486-result.xml rename to tests/cputestdata/x86_64-host+guest,model486-result.xml diff --git a/tests/cputestdata/x86-host+guest,models-result.xml b/tests/cputestdata/x86_64-host+guest,models-result.xml similarity index 100% rename from tests/cputestdata/x86-host+guest,models-result.xml rename to tests/cputestdata/x86_64-host+guest,models-result.xml diff --git a/tests/cputestdata/x86-host+guest-result.xml b/tests/cputestdata/x86_64-host+guest-result.xml similarity index 100% rename from tests/cputestdata/x86-host+guest-result.xml rename to tests/cputestdata/x86_64-host+guest-result.xml diff --git a/tests/cputestdata/x86-host+guest.xml b/tests/cputestdata/x86_64-host+guest.xml similarity index 100% rename from tests/cputestdata/x86-host+guest.xml rename to tests/cputestdata/x86_64-host+guest.xml diff --git a/tests/cputestdata/x86-host+host+host-model,models-result.xml b/tests/cputestdata/x86_64-host+host+host-model,models-result.xml similarity index 100% rename from tests/cputestdata/x86-host+host+host-model,models-result.xml rename to tests/cputestdata/x86_64-host+host+host-model,models-result.xml diff --git a/tests/cputestdata/x86-host+host-model-nofallback.xml b/tests/cputestdata/x86_64-host+host-model-nofallback.xml similarity index 100% rename from tests/cputestdata/x86-host+host-model-nofallback.xml rename to tests/cputestdata/x86_64-host+host-model-nofallback.xml diff --git a/tests/cputestdata/x86-host+host-model.xml b/tests/cputestdata/x86_64-host+host-model.xml similarity index 100% rename from tests/cputestdata/x86-host+host-model.xml rename to tests/cputestdata/x86_64-host+host-model.xml diff --git a/tests/cputestdata/x86-host+host-passthrough-features.xml b/tests/cputestdata/x86_64-host+host-passthrough-features.xml similarity index 100% rename from tests/cputestdata/x86-host+host-passthrough-features.xml rename to tests/cputestdata/x86_64-host+host-passthrough-features.xml diff --git a/tests/cputestdata/x86-host+host-passthrough.xml b/tests/cputestdata/x86_64-host+host-passthrough.xml similarity index 100% rename from tests/cputestdata/x86-host+host-passthrough.xml rename to tests/cputestdata/x86_64-host+host-passthrough.xml diff --git a/tests/cputestdata/x86-host+min.xml b/tests/cputestdata/x86_64-host+min.xml similarity index 100% rename from tests/cputestdata/x86-host+min.xml rename to tests/cputestdata/x86_64-host+min.xml diff --git a/tests/cputestdata/x86-host+penryn-force-result.xml b/tests/cputestdata/x86_64-host+penryn-force-result.xml similarity index 100% rename from tests/cputestdata/x86-host+penryn-force-result.xml rename to tests/cputestdata/x86_64-host+penryn-force-result.xml diff --git a/tests/cputestdata/x86-host+pentium3.xml b/tests/cputestdata/x86_64-host+pentium3.xml similarity index 100% rename from tests/cputestdata/x86-host+pentium3.xml rename to tests/cputestdata/x86_64-host+pentium3.xml diff --git a/tests/cputestdata/x86-host+strict-force-extra-result.xml b/tests/cputestdata/x86_64-host+strict-force-extra-result.xml similarity index 100% rename from tests/cputestdata/x86-host+strict-force-extra-result.xml rename to tests/cputestdata/x86_64-host+strict-force-extra-result.xml diff --git a/tests/cputestdata/x86-host-Haswell-noTSX+Haswell,haswell-result.xml b/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell,haswell-result.xml similarity index 100% rename from tests/cputestdata/x86-host-Haswell-noTSX+Haswell,haswell-result.xml rename to tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell,haswell-result.xml diff --git a/tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml b/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml similarity index 100% rename from tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml rename to tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml diff --git a/tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX-result.xml b/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX-result.xml similarity index 100% rename from tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX-result.xml rename to tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX-result.xml diff --git a/tests/cputestdata/x86-host-Haswell-noTSX.xml b/tests/cputestdata/x86_64-host-Haswell-noTSX.xml similarity index 100% rename from tests/cputestdata/x86-host-Haswell-noTSX.xml rename to tests/cputestdata/x86_64-host-Haswell-noTSX.xml diff --git a/tests/cputestdata/x86-host-SandyBridge.xml b/tests/cputestdata/x86_64-host-SandyBridge.xml similarity index 100% rename from tests/cputestdata/x86-host-SandyBridge.xml rename to tests/cputestdata/x86_64-host-SandyBridge.xml diff --git a/tests/cputestdata/x86-host-amd-fake.xml b/tests/cputestdata/x86_64-host-amd-fake.xml similarity index 100% rename from tests/cputestdata/x86-host-amd-fake.xml rename to tests/cputestdata/x86_64-host-amd-fake.xml diff --git a/tests/cputestdata/x86-host-amd.xml b/tests/cputestdata/x86_64-host-amd.xml similarity index 100% rename from tests/cputestdata/x86-host-amd.xml rename to tests/cputestdata/x86_64-host-amd.xml diff --git a/tests/cputestdata/x86-host-better+pentium3-result.xml b/tests/cputestdata/x86_64-host-better+pentium3-result.xml similarity index 100% rename from tests/cputestdata/x86-host-better+pentium3-result.xml rename to tests/cputestdata/x86_64-host-better+pentium3-result.xml diff --git a/tests/cputestdata/x86-host-better.xml b/tests/cputestdata/x86_64-host-better.xml similarity index 100% rename from tests/cputestdata/x86-host-better.xml rename to tests/cputestdata/x86_64-host-better.xml diff --git a/tests/cputestdata/x86-host-incomp-arch.xml b/tests/cputestdata/x86_64-host-incomp-arch.xml similarity index 100% rename from tests/cputestdata/x86-host-incomp-arch.xml rename to tests/cputestdata/x86_64-host-incomp-arch.xml diff --git a/tests/cputestdata/x86-host-invtsc+host-model.xml b/tests/cputestdata/x86_64-host-invtsc+host-model.xml similarity index 100% rename from tests/cputestdata/x86-host-invtsc+host-model.xml rename to tests/cputestdata/x86_64-host-invtsc+host-model.xml diff --git a/tests/cputestdata/x86-host-invtsc.xml b/tests/cputestdata/x86_64-host-invtsc.xml similarity index 100% rename from tests/cputestdata/x86-host-invtsc.xml rename to tests/cputestdata/x86_64-host-invtsc.xml diff --git a/tests/cputestdata/x86-host-model-nofallback.xml b/tests/cputestdata/x86_64-host-model-nofallback.xml similarity index 100% rename from tests/cputestdata/x86-host-model-nofallback.xml rename to tests/cputestdata/x86_64-host-model-nofallback.xml diff --git a/tests/cputestdata/x86-host-model.xml b/tests/cputestdata/x86_64-host-model.xml similarity index 100% rename from tests/cputestdata/x86-host-model.xml rename to tests/cputestdata/x86_64-host-model.xml diff --git a/tests/cputestdata/x86-host-no-vendor.xml b/tests/cputestdata/x86_64-host-no-vendor.xml similarity index 100% rename from tests/cputestdata/x86-host-no-vendor.xml rename to tests/cputestdata/x86_64-host-no-vendor.xml diff --git a/tests/cputestdata/x86-host-passthrough-features.xml b/tests/cputestdata/x86_64-host-passthrough-features.xml similarity index 100% rename from tests/cputestdata/x86-host-passthrough-features.xml rename to tests/cputestdata/x86_64-host-passthrough-features.xml diff --git a/tests/cputestdata/x86-host-passthrough.xml b/tests/cputestdata/x86_64-host-passthrough.xml similarity index 100% rename from tests/cputestdata/x86-host-passthrough.xml rename to tests/cputestdata/x86_64-host-passthrough.xml diff --git a/tests/cputestdata/x86-host-worse+guest-result.xml b/tests/cputestdata/x86_64-host-worse+guest-result.xml similarity index 100% rename from tests/cputestdata/x86-host-worse+guest-result.xml rename to tests/cputestdata/x86_64-host-worse+guest-result.xml diff --git a/tests/cputestdata/x86-host-worse.xml b/tests/cputestdata/x86_64-host-worse.xml similarity index 100% rename from tests/cputestdata/x86-host-worse.xml rename to tests/cputestdata/x86_64-host-worse.xml diff --git a/tests/cputestdata/x86-host.xml b/tests/cputestdata/x86_64-host.xml similarity index 100% rename from tests/cputestdata/x86-host.xml rename to tests/cputestdata/x86_64-host.xml diff --git a/tests/cputestdata/x86-min.xml b/tests/cputestdata/x86_64-min.xml similarity index 100% rename from tests/cputestdata/x86-min.xml rename to tests/cputestdata/x86_64-min.xml diff --git a/tests/cputestdata/x86-penryn-force.xml b/tests/cputestdata/x86_64-penryn-force.xml similarity index 100% rename from tests/cputestdata/x86-penryn-force.xml rename to tests/cputestdata/x86_64-penryn-force.xml diff --git a/tests/cputestdata/x86-pentium3-amd.xml b/tests/cputestdata/x86_64-pentium3-amd.xml similarity index 100% rename from tests/cputestdata/x86-pentium3-amd.xml rename to tests/cputestdata/x86_64-pentium3-amd.xml diff --git a/tests/cputestdata/x86-pentium3.xml b/tests/cputestdata/x86_64-pentium3.xml similarity index 100% rename from tests/cputestdata/x86-pentium3.xml rename to tests/cputestdata/x86_64-pentium3.xml diff --git a/tests/cputestdata/x86-strict-disable.xml b/tests/cputestdata/x86_64-strict-disable.xml similarity index 100% rename from tests/cputestdata/x86-strict-disable.xml rename to tests/cputestdata/x86_64-strict-disable.xml diff --git a/tests/cputestdata/x86-strict-force-extra.xml b/tests/cputestdata/x86_64-strict-force-extra.xml similarity index 100% rename from tests/cputestdata/x86-strict-force-extra.xml rename to tests/cputestdata/x86_64-strict-force-extra.xml diff --git a/tests/cputestdata/x86-strict-full.xml b/tests/cputestdata/x86_64-strict-full.xml similarity index 100% rename from tests/cputestdata/x86-strict-full.xml rename to tests/cputestdata/x86_64-strict-full.xml diff --git a/tests/cputestdata/x86-strict.xml b/tests/cputestdata/x86_64-strict.xml similarity index 100% rename from tests/cputestdata/x86-strict.xml rename to tests/cputestdata/x86_64-strict.xml -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:19PM +0100, Jiri Denemark wrote:
While "x86" is a CPU sub driver name, it is not a recognized name of any architecture known to libvirt. Let's use "x86_64" prefix which can be used with virArch APIs.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - fix file names created by cpu-parse.sh
ACK Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - no change tests/cputest.c | 294 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 148 insertions(+), 146 deletions(-) diff --git a/tests/cputest.c b/tests/cputest.c index 406b40dfe..c0a816b60 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -56,7 +56,7 @@ enum cpuTestBoolWithError { struct data { - const char *arch; + virArch arch; const char *host; const char *name; const char **models; @@ -72,14 +72,15 @@ static virQEMUDriver driver; static virCPUDefPtr -cpuTestLoadXML(const char *arch, const char *name) +cpuTestLoadXML(virArch arch, const char *name) { char *xml = NULL; xmlDocPtr doc = NULL; xmlXPathContextPtr ctxt = NULL; virCPUDefPtr cpu = NULL; - if (virAsprintf(&xml, "%s/cputestdata/%s-%s.xml", abs_srcdir, arch, name) < 0) + if (virAsprintf(&xml, "%s/cputestdata/%s-%s.xml", + abs_srcdir, virArchToString(arch), name) < 0) goto cleanup; if (!(doc = virXMLParseFileCtxt(xml, &ctxt))) @@ -96,7 +97,7 @@ cpuTestLoadXML(const char *arch, const char *name) static virCPUDefPtr * -cpuTestLoadMultiXML(const char *arch, +cpuTestLoadMultiXML(virArch arch, const char *name, unsigned int *count) { @@ -108,7 +109,8 @@ cpuTestLoadMultiXML(const char *arch, int n; size_t i; - if (virAsprintf(&xml, "%s/cputestdata/%s-%s.xml", abs_srcdir, arch, name) < 0) + if (virAsprintf(&xml, "%s/cputestdata/%s-%s.xml", + abs_srcdir, virArchToString(arch), name) < 0) goto cleanup; if (!(doc = virXMLParseFileCtxt(xml, &ctxt))) @@ -145,7 +147,7 @@ cpuTestLoadMultiXML(const char *arch, static int -cpuTestCompareXML(const char *arch, +cpuTestCompareXML(virArch arch, virCPUDef *cpu, const char *name, bool updateCPU) @@ -155,7 +157,7 @@ cpuTestCompareXML(const char *arch, int ret = -1; if (virAsprintf(&xml, "%s/cputestdata/%s-%s.xml", - abs_srcdir, arch, name) < 0) + abs_srcdir, virArchToString(arch), name) < 0) goto cleanup; if (!(actual = virCPUDefFormat(cpu, NULL, updateCPU))) @@ -457,7 +459,7 @@ cpuTestCPUID(bool guest, const void *arg) char *result = NULL; if (virAsprintf(&hostFile, "%s/cputestdata/%s-cpuid-%s.xml", - abs_srcdir, data->arch, data->host) < 0) + abs_srcdir, virArchToString(data->arch), data->host) < 0) goto cleanup; if (virTestLoadFile(hostFile, &host) < 0 || @@ -523,7 +525,7 @@ cpuTestJSONCPUID(const void *arg) int ret = -1; if (virAsprintf(&json, "%s/cputestdata/%s-cpuid-%s.json", - abs_srcdir, data->arch, data->host) < 0 || + abs_srcdir, virArchToString(data->arch), data->host) < 0 || virAsprintf(&result, "cpuid-%s-json", data->host) < 0) goto cleanup; @@ -591,7 +593,7 @@ mymain(void) VIR_FREE(tmp); \ \ if (virAsprintf(&testLabel, "%s(%s): %s", \ - #api, arch, name) < 0) { \ + #api, virArchToString(arch), name) < 0) { \ ret = -1; \ break; \ } \ @@ -677,159 +679,159 @@ mymain(void) } while (0) /* host to host comparison */ - DO_TEST_COMPARE("x86_64", "host", "host", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86_64", "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86_64", "host", "host-worse", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "host-amd-fake", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86_64", "host", "host-incomp-arch", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86_64", "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86_64", "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host-worse", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host-amd-fake", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host-incomp-arch", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("ppc64", "host", "host", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("ppc64", "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("ppc64", "host", "host-worse", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("ppc64", "host", "host-incomp-arch", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("ppc64", "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("ppc64", "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "host", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "host-worse", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "host-incomp-arch", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE); /* guest to host comparison */ - DO_TEST_COMPARE("x86_64", "host", "bogus-model", VIR_CPU_COMPARE_ERROR); - DO_TEST_COMPARE("x86_64", "host", "bogus-feature", VIR_CPU_COMPARE_ERROR); - DO_TEST_COMPARE("x86_64", "host", "min", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "pentium3", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "exact", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "exact-forbid", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86_64", "host", "exact-forbid-extra", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "exact-disable", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "exact-disable2", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "exact-disable-extra", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "exact-require", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "exact-require-extra", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86_64", "host", "exact-force", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "strict", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86_64", "host", "strict-full", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86_64", "host", "strict-disable", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86_64", "host", "strict-force-extra", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86_64", "host", "guest", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host", "pentium3-amd", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("x86_64", "host-amd", "pentium3-amd", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_COMPARE("x86_64", "host-worse", "penryn-force", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("x86_64", "host-SandyBridge", "exact-force-Haswell", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "bogus-model", VIR_CPU_COMPARE_ERROR); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "bogus-feature", VIR_CPU_COMPARE_ERROR); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "min", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "pentium3", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "exact", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "exact-forbid", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "exact-forbid-extra", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "exact-disable", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "exact-disable2", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "exact-disable-extra", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "exact-require", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "exact-require-extra", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "exact-force", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "strict", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "strict-full", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "strict-disable", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "strict-force-extra", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "guest", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "pentium3-amd", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host-amd", "pentium3-amd", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host-worse", "penryn-force", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_X86_64, "host-SandyBridge", "exact-force-Haswell", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("ppc64", "host", "guest-strict", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("ppc64", "host", "guest-exact", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("ppc64", "host", "guest-legacy", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("ppc64", "host", "guest-legacy-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_COMPARE("ppc64", "host", "guest-legacy-invalid", VIR_CPU_COMPARE_ERROR); - DO_TEST_COMPARE("ppc64", "host", "guest-compat-none", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("ppc64", "host", "guest-compat-valid", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE("ppc64", "host", "guest-compat-invalid", VIR_CPU_COMPARE_ERROR); - DO_TEST_COMPARE("ppc64", "host", "guest-compat-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "guest-strict", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "guest-exact", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "guest-legacy", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "guest-legacy-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "guest-legacy-invalid", VIR_CPU_COMPARE_ERROR); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "guest-compat-none", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "guest-compat-valid", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "guest-compat-invalid", VIR_CPU_COMPARE_ERROR); + DO_TEST_COMPARE(VIR_ARCH_PPC64, "host", "guest-compat-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE); /* guest updates for migration * automatically compares host CPU with the result */ - DO_TEST_UPDATE("x86_64", "host", "min", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("x86_64", "host", "pentium3", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("x86_64", "host", "guest", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_UPDATE("x86_64", "host", "host-model", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("x86_64", "host", "host-model-nofallback", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("x86_64", "host-invtsc", "host-model", VIR_CPU_COMPARE_SUPERSET); - DO_TEST_UPDATE_ONLY("x86_64", "host", "host-passthrough"); - DO_TEST_UPDATE_ONLY("x86_64", "host", "host-passthrough-features"); + DO_TEST_UPDATE(VIR_ARCH_X86_64, "host", "min", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE(VIR_ARCH_X86_64, "host", "pentium3", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE(VIR_ARCH_X86_64, "host", "guest", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_UPDATE(VIR_ARCH_X86_64, "host", "host-model", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE(VIR_ARCH_X86_64, "host", "host-model-nofallback", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE(VIR_ARCH_X86_64, "host-invtsc", "host-model", VIR_CPU_COMPARE_SUPERSET); + DO_TEST_UPDATE_ONLY(VIR_ARCH_X86_64, "host", "host-passthrough"); + DO_TEST_UPDATE_ONLY(VIR_ARCH_X86_64, "host", "host-passthrough-features"); - DO_TEST_UPDATE("ppc64", "host", "guest", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("ppc64", "host", "guest-nofallback", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_UPDATE("ppc64", "host", "guest-legacy", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("ppc64", "host", "guest-legacy-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE); - DO_TEST_UPDATE("ppc64", "host", "guest-legacy-invalid", VIR_CPU_COMPARE_ERROR); - DO_TEST_UPDATE("ppc64", "host", "guest-compat-none", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("ppc64", "host", "guest-compat-valid", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_UPDATE("ppc64", "host", "guest-compat-invalid", VIR_CPU_COMPARE_ERROR); - DO_TEST_UPDATE("ppc64", "host", "guest-compat-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_UPDATE(VIR_ARCH_PPC64, "host", "guest", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE(VIR_ARCH_PPC64, "host", "guest-nofallback", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_UPDATE(VIR_ARCH_PPC64, "host", "guest-legacy", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE(VIR_ARCH_PPC64, "host", "guest-legacy-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE); + DO_TEST_UPDATE(VIR_ARCH_PPC64, "host", "guest-legacy-invalid", VIR_CPU_COMPARE_ERROR); + DO_TEST_UPDATE(VIR_ARCH_PPC64, "host", "guest-compat-none", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE(VIR_ARCH_PPC64, "host", "guest-compat-valid", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_UPDATE(VIR_ARCH_PPC64, "host", "guest-compat-invalid", VIR_CPU_COMPARE_ERROR); + DO_TEST_UPDATE(VIR_ARCH_PPC64, "host", "guest-compat-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE); /* computing baseline CPUs */ - DO_TEST_BASELINE("x86_64", "incompatible-vendors", 0, -1); - DO_TEST_BASELINE("x86_64", "no-vendor", 0, 0); - DO_TEST_BASELINE("x86_64", "some-vendors", 0, 0); - DO_TEST_BASELINE("x86_64", "1", 0, 0); - DO_TEST_BASELINE("x86_64", "2", 0, 0); - DO_TEST_BASELINE("x86_64", "3", 0, 0); - DO_TEST_BASELINE("x86_64", "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); - DO_TEST_BASELINE("x86_64", "4", 0, 0); - DO_TEST_BASELINE("x86_64", "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); - DO_TEST_BASELINE("x86_64", "5", 0, 0); - DO_TEST_BASELINE("x86_64", "5", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); - DO_TEST_BASELINE("x86_64", "6", 0, 0); - DO_TEST_BASELINE("x86_64", "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0); - DO_TEST_BASELINE("x86_64", "7", 0, 0); - DO_TEST_BASELINE("x86_64", "8", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "incompatible-vendors", 0, -1); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "no-vendor", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "some-vendors", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "1", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "2", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "5", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "5", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "7", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_X86_64, "8", 0, 0); - DO_TEST_BASELINE("ppc64", "incompatible-vendors", 0, -1); - DO_TEST_BASELINE("ppc64", "no-vendor", 0, 0); - DO_TEST_BASELINE("ppc64", "incompatible-models", 0, -1); - DO_TEST_BASELINE("ppc64", "same-model", 0, 0); - DO_TEST_BASELINE("ppc64", "legacy", 0, -1); + DO_TEST_BASELINE(VIR_ARCH_PPC64, "incompatible-vendors", 0, -1); + DO_TEST_BASELINE(VIR_ARCH_PPC64, "no-vendor", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_PPC64, "incompatible-models", 0, -1); + DO_TEST_BASELINE(VIR_ARCH_PPC64, "same-model", 0, 0); + DO_TEST_BASELINE(VIR_ARCH_PPC64, "legacy", 0, -1); /* CPU features */ - DO_TEST_HASFEATURE("x86_64", "host", "vmx", YES); - DO_TEST_HASFEATURE("x86_64", "host", "lm", YES); - DO_TEST_HASFEATURE("x86_64", "host", "sse4.1", YES); - DO_TEST_HASFEATURE("x86_64", "host", "3dnowext", NO); - DO_TEST_HASFEATURE("x86_64", "host", "skinit", NO); - DO_TEST_HASFEATURE("x86_64", "host", "foo", FAIL); + DO_TEST_HASFEATURE(VIR_ARCH_X86_64, "host", "vmx", YES); + DO_TEST_HASFEATURE(VIR_ARCH_X86_64, "host", "lm", YES); + DO_TEST_HASFEATURE(VIR_ARCH_X86_64, "host", "sse4.1", YES); + DO_TEST_HASFEATURE(VIR_ARCH_X86_64, "host", "3dnowext", NO); + DO_TEST_HASFEATURE(VIR_ARCH_X86_64, "host", "skinit", NO); + DO_TEST_HASFEATURE(VIR_ARCH_X86_64, "host", "foo", FAIL); /* computing guest data and decoding the data into a guest CPU XML */ - DO_TEST_GUESTCPU("x86_64", "host", "guest", NULL, 0); - DO_TEST_GUESTCPU("x86_64", "host-better", "pentium3", NULL, 0); - DO_TEST_GUESTCPU("x86_64", "host-worse", "guest", NULL, 0); - DO_TEST_GUESTCPU("x86_64", "host", "strict-force-extra", NULL, 0); - DO_TEST_GUESTCPU("x86_64", "host", "penryn-force", NULL, 0); - DO_TEST_GUESTCPU("x86_64", "host", "guest", model486, 0); - DO_TEST_GUESTCPU("x86_64", "host", "guest", models, 0); - DO_TEST_GUESTCPU("x86_64", "host", "guest", nomodel, -1); - DO_TEST_GUESTCPU("x86_64", "host", "guest-nofallback", models, -1); - DO_TEST_GUESTCPU("x86_64", "host", "host+host-model", models, 0); - DO_TEST_GUESTCPU("x86_64", "host", "host+host-model-nofallback", models, -1); - DO_TEST_GUESTCPU("x86_64", "host-Haswell-noTSX", "Haswell", haswell, 0); - DO_TEST_GUESTCPU("x86_64", "host-Haswell-noTSX", "Haswell-noTSX", haswell, 0); - DO_TEST_GUESTCPU("x86_64", "host-Haswell-noTSX", "Haswell-noTSX-nofallback", haswell, -1); - DO_TEST_GUESTCPU("x86_64", "host-Haswell-noTSX", "Haswell-noTSX", NULL, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host", "guest", NULL, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host-better", "pentium3", NULL, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host-worse", "guest", NULL, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host", "strict-force-extra", NULL, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host", "penryn-force", NULL, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host", "guest", model486, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host", "guest", models, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host", "guest", nomodel, -1); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host", "guest-nofallback", models, -1); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host", "host+host-model", models, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host", "host+host-model-nofallback", models, -1); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host-Haswell-noTSX", "Haswell", haswell, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host-Haswell-noTSX", "Haswell-noTSX", haswell, 0); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host-Haswell-noTSX", "Haswell-noTSX-nofallback", haswell, -1); + DO_TEST_GUESTCPU(VIR_ARCH_X86_64, "host-Haswell-noTSX", "Haswell-noTSX", NULL, 0); - DO_TEST_GUESTCPU("ppc64", "host", "guest", ppc_models, 0); - DO_TEST_GUESTCPU("ppc64", "host", "guest-nofallback", ppc_models, -1); - DO_TEST_GUESTCPU("ppc64", "host", "guest-legacy", ppc_models, 0); - DO_TEST_GUESTCPU("ppc64", "host", "guest-legacy-incompatible", ppc_models, -1); - DO_TEST_GUESTCPU("ppc64", "host", "guest-legacy-invalid", ppc_models, -1); + DO_TEST_GUESTCPU(VIR_ARCH_PPC64, "host", "guest", ppc_models, 0); + DO_TEST_GUESTCPU(VIR_ARCH_PPC64, "host", "guest-nofallback", ppc_models, -1); + DO_TEST_GUESTCPU(VIR_ARCH_PPC64, "host", "guest-legacy", ppc_models, 0); + DO_TEST_GUESTCPU(VIR_ARCH_PPC64, "host", "guest-legacy-incompatible", ppc_models, -1); + DO_TEST_GUESTCPU(VIR_ARCH_PPC64, "host", "guest-legacy-invalid", ppc_models, -1); - DO_TEST_CPUID("x86_64", "A10-5800K", true); - DO_TEST_CPUID("x86_64", "Atom-D510", false); - DO_TEST_CPUID("x86_64", "Atom-N450", false); - DO_TEST_CPUID("x86_64", "Core-i5-2500", true); - DO_TEST_CPUID("x86_64", "Core-i5-2540M", true); - DO_TEST_CPUID("x86_64", "Core-i5-4670T", true); - DO_TEST_CPUID("x86_64", "Core-i5-6600", true); - DO_TEST_CPUID("x86_64", "Core-i7-2600", true); - DO_TEST_CPUID("x86_64", "Core-i7-3520M", false); - DO_TEST_CPUID("x86_64", "Core-i7-3740QM", true); - DO_TEST_CPUID("x86_64", "Core-i7-3770", true); - DO_TEST_CPUID("x86_64", "Core-i7-4600U", true); - DO_TEST_CPUID("x86_64", "Core-i7-5600U", true); - DO_TEST_CPUID("x86_64", "Core2-E6850", true); - DO_TEST_CPUID("x86_64", "Core2-Q9500", false); - DO_TEST_CPUID("x86_64", "FX-8150", false); - DO_TEST_CPUID("x86_64", "Opteron-1352", false); - DO_TEST_CPUID("x86_64", "Opteron-2350", true); - DO_TEST_CPUID("x86_64", "Opteron-6234", true); - DO_TEST_CPUID("x86_64", "Opteron-6282", false); - DO_TEST_CPUID("x86_64", "Pentium-P6100", false); - DO_TEST_CPUID("x86_64", "Phenom-B95", true); - DO_TEST_CPUID("x86_64", "Xeon-5110", false); - DO_TEST_CPUID("x86_64", "Xeon-E3-1245", true); - DO_TEST_CPUID("x86_64", "Xeon-E5-2630", true); - DO_TEST_CPUID("x86_64", "Xeon-E5-2650", true); - DO_TEST_CPUID("x86_64", "Xeon-E7-4820", true); - DO_TEST_CPUID("x86_64", "Xeon-W3520", true); - DO_TEST_CPUID("x86_64", "Xeon-X5460", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "A10-5800K", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Atom-D510", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Atom-N450", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i5-2500", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i5-2540M", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i5-4670T", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i5-6600", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i7-2600", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i7-3520M", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i7-3740QM", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i7-3770", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i7-4600U", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core-i7-5600U", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core2-E6850", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Core2-Q9500", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "FX-8150", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Opteron-1352", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Opteron-2350", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Opteron-6234", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Opteron-6282", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Pentium-P6100", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Phenom-B95", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-5110", false); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E3-1245", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E5-2630", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E5-2650", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E7-4820", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-W3520", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-X5460", false); #if WITH_QEMU && WITH_YAJL qemuTestDriverFree(&driver); -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:20PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - no change
tests/cputest.c | 294 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 148 insertions(+), 146 deletions(-)
ACK Pavel

Instantiating "host" CPU and querying it using qom-get has been the only way of probing host CPU via QEMU until 2.9.0 implemented query-cpu-model-expansion for x86_64. Even though libvirt never really used the old way its result can be easily converted into the one produced by query-cpu-model-expansion. Thus we can reuse the original test data and possible get new data from hosts where QEMU does not support the new QMP command. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - cpu-convert.py: set "vendor" property according to model-id tests/cputestdata/cpu-convert.py | 249 +++++++++++++++++++++++++++++++++++++++ tests/cputestdata/cpu-gather.sh | 39 +++++- tests/cputestdata/cpu-parse.sh | 3 + 3 files changed, 285 insertions(+), 6 deletions(-) create mode 100755 tests/cputestdata/cpu-convert.py diff --git a/tests/cputestdata/cpu-convert.py b/tests/cputestdata/cpu-convert.py new file mode 100755 index 000000000..77bae3628 --- /dev/null +++ b/tests/cputestdata/cpu-convert.py @@ -0,0 +1,249 @@ +#!/usr/bin/python + +import sys +import json + +# This is a list of x86 CPU features as of QEMU 2.8.50 and it won't need any +# updates since in the future because query-cpu-model-expansion will be used +# with newer QEMU. +cpuidMap = [ + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000001, "edx": 0, "names": ["pni", "sse3"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000002, "edx": 0, "names": ["pclmulqdq", "pclmuldq"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000004, "edx": 0, "names": ["dtes64"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000008, "edx": 0, "names": ["monitor"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000010, "edx": 0, "names": ["ds-cpl", "ds_cpl"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000020, "edx": 0, "names": ["vmx"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000040, "edx": 0, "names": ["smx"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000080, "edx": 0, "names": ["est"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000100, "edx": 0, "names": ["tm2"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000200, "edx": 0, "names": ["ssse3"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000400, "edx": 0, "names": ["cid"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00001000, "edx": 0, "names": ["fma"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00002000, "edx": 0, "names": ["cx16"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00004000, "edx": 0, "names": ["xtpr"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00008000, "edx": 0, "names": ["pdcm"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00020000, "edx": 0, "names": ["pcid"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00040000, "edx": 0, "names": ["dca"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00080000, "edx": 0, "names": ["sse4.1", "sse4-1", "sse4_1"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00100000, "edx": 0, "names": ["sse4.2", "sse4-2", "sse4_2"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00200000, "edx": 0, "names": ["x2apic"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00400000, "edx": 0, "names": ["movbe"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00800000, "edx": 0, "names": ["popcnt"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x01000000, "edx": 0, "names": ["tsc-deadline"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x02000000, "edx": 0, "names": ["aes"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x04000000, "edx": 0, "names": ["xsave"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x08000000, "edx": 0, "names": ["osxsave"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x10000000, "edx": 0, "names": ["avx"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x20000000, "edx": 0, "names": ["f16c"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x40000000, "edx": 0, "names": ["rdrand"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x80000000, "edx": 0, "names": ["hypervisor"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000001, "names": ["fpu"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000002, "names": ["vme"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000004, "names": ["de"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000008, "names": ["pse"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000010, "names": ["tsc"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000020, "names": ["msr"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000040, "names": ["pae"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000080, "names": ["mce"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000100, "names": ["cx8"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000200, "names": ["apic"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000800, "names": ["sep"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00001000, "names": ["mtrr"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00002000, "names": ["pge"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00004000, "names": ["mca"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00008000, "names": ["cmov"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00010000, "names": ["pat"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00020000, "names": ["pse36"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00040000, "names": ["pn"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00080000, "names": ["clflush"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00200000, "names": ["ds"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00400000, "names": ["acpi"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00800000, "names": ["mmx"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x01000000, "names": ["fxsr"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x02000000, "names": ["sse"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x04000000, "names": ["sse2"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x08000000, "names": ["ss"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x10000000, "names": ["ht"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x20000000, "names": ["tm"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x40000000, "names": ["ia64"]}, + {"in_eax": 0x00000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x80000000, "names": ["pbe"]}, + {"in_eax": 0x00000006, "in_ecx": 0, "eax": 0x00000004, "ebx": 0, "ecx": 0, "edx": 0, "names": ["arat"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000001, "ecx": 0, "edx": 0, "names": ["fsgsbase"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000002, "ecx": 0, "edx": 0, "names": ["tsc-adjust", "tsc_adjust"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000008, "ecx": 0, "edx": 0, "names": ["bmi1"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000010, "ecx": 0, "edx": 0, "names": ["hle"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000020, "ecx": 0, "edx": 0, "names": ["avx2"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000080, "ecx": 0, "edx": 0, "names": ["smep"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000100, "ecx": 0, "edx": 0, "names": ["bmi2"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000200, "ecx": 0, "edx": 0, "names": ["erms"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000400, "ecx": 0, "edx": 0, "names": ["invpcid"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00000800, "ecx": 0, "edx": 0, "names": ["rtm"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00004000, "ecx": 0, "edx": 0, "names": ["mpx"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00010000, "ecx": 0, "edx": 0, "names": ["avx512f"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00020000, "ecx": 0, "edx": 0, "names": ["avx512dq"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00040000, "ecx": 0, "edx": 0, "names": ["rdseed"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00080000, "ecx": 0, "edx": 0, "names": ["adx"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00100000, "ecx": 0, "edx": 0, "names": ["smap"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00200000, "ecx": 0, "edx": 0, "names": ["avx512ifma"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00400000, "ecx": 0, "edx": 0, "names": ["pcommit"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x00800000, "ecx": 0, "edx": 0, "names": ["clflushopt"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x01000000, "ecx": 0, "edx": 0, "names": ["clwb"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x04000000, "ecx": 0, "edx": 0, "names": ["avx512pf"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x08000000, "ecx": 0, "edx": 0, "names": ["avx512er"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x10000000, "ecx": 0, "edx": 0, "names": ["avx512cd"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x20000000, "ecx": 0, "edx": 0, "names": ["sha-ni"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x40000000, "ecx": 0, "edx": 0, "names": ["avx512bw"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0x80000000, "ecx": 0, "edx": 0, "names": ["avx512vl"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000002, "edx": 0, "names": ["avx512vbmi"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000004, "edx": 0, "names": ["umip"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000008, "edx": 0, "names": ["pku"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000010, "edx": 0, "names": ["ospke"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00004000, "edx": 0, "names": ["avx512-vpopcntdq"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00010000, "edx": 0, "names": ["la57"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00400000, "edx": 0, "names": ["rdpid"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000004, "names": ["avx512-4vnniw"]}, + {"in_eax": 0x00000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000008, "names": ["avx512-4fmaps"]}, + {"in_eax": 0x0000000d, "in_ecx": 1, "eax": 0x00000001, "ebx": 0, "ecx": 0, "edx": 0, "names": ["xsaveopt"]}, + {"in_eax": 0x0000000d, "in_ecx": 1, "eax": 0x00000002, "ebx": 0, "ecx": 0, "edx": 0, "names": ["xsavec"]}, + {"in_eax": 0x0000000d, "in_ecx": 1, "eax": 0x00000004, "ebx": 0, "ecx": 0, "edx": 0, "names": ["xgetbv1"]}, + {"in_eax": 0x0000000d, "in_ecx": 1, "eax": 0x00000008, "ebx": 0, "ecx": 0, "edx": 0, "names": ["xsaves"]}, + {"in_eax": 0x40000001, "in_ecx": 0, "eax": 0x00000001, "ebx": 0, "ecx": 0, "edx": 0, "names": ["kvmclock"]}, + {"in_eax": 0x40000001, "in_ecx": 0, "eax": 0x00000002, "ebx": 0, "ecx": 0, "edx": 0, "names": ["kvm-nopiodelay", "kvm_nopiodelay"]}, + {"in_eax": 0x40000001, "in_ecx": 0, "eax": 0x00000004, "ebx": 0, "ecx": 0, "edx": 0, "names": ["kvm-mmu", "kvm_mmu"]}, + {"in_eax": 0x40000001, "in_ecx": 0, "eax": 0x00000008, "ebx": 0, "ecx": 0, "edx": 0, "names": ["kvmclock"]}, + {"in_eax": 0x40000001, "in_ecx": 0, "eax": 0x00000010, "ebx": 0, "ecx": 0, "edx": 0, "names": ["kvm-asyncpf", "kvm_asyncpf"]}, + {"in_eax": 0x40000001, "in_ecx": 0, "eax": 0x00000020, "ebx": 0, "ecx": 0, "edx": 0, "names": ["kvm-steal-time", "kvm_steal_time"]}, + {"in_eax": 0x40000001, "in_ecx": 0, "eax": 0x00000040, "ebx": 0, "ecx": 0, "edx": 0, "names": ["kvm-pv-eoi", "kvm_pv_eoi"]}, + {"in_eax": 0x40000001, "in_ecx": 0, "eax": 0x00000080, "ebx": 0, "ecx": 0, "edx": 0, "names": ["kvm-pv-unhalt", "kvm_pv_unhalt"]}, + {"in_eax": 0x40000001, "in_ecx": 0, "eax": 0x01000000, "ebx": 0, "ecx": 0, "edx": 0, "names": ["kvmclock-stable-bit"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000001, "edx": 0, "names": ["lahf-lm", "lahf_lm"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000002, "edx": 0, "names": ["cmp-legacy", "cmp_legacy"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000004, "edx": 0, "names": ["svm"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000008, "edx": 0, "names": ["extapic"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000010, "edx": 0, "names": ["cr8legacy"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000020, "edx": 0, "names": ["abm"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000040, "edx": 0, "names": ["sse4a"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000080, "edx": 0, "names": ["misalignsse"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000100, "edx": 0, "names": ["3dnowprefetch"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000200, "edx": 0, "names": ["osvw"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000400, "edx": 0, "names": ["ibs"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00000800, "edx": 0, "names": ["xop"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00001000, "edx": 0, "names": ["skinit"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00002000, "edx": 0, "names": ["wdt"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00008000, "edx": 0, "names": ["lwp"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00010000, "edx": 0, "names": ["fma4"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00020000, "edx": 0, "names": ["tce"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00080000, "edx": 0, "names": ["nodeid-msr", "nodeid_msr"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00200000, "edx": 0, "names": ["tbm"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00400000, "edx": 0, "names": ["topoext"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x00800000, "edx": 0, "names": ["perfctr-core", "perfctr_core"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0x01000000, "edx": 0, "names": ["perfctr-nb", "perfctr_nb"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000800, "names": ["syscall"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00100000, "names": ["nx", "xd"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00400000, "names": ["mmxext"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x02000000, "names": ["fxsr-opt", "ffxsr", "fxsr_opt"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x04000000, "names": ["pdpe1gb"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x08000000, "names": ["rdtscp"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x20000000, "names": ["lm", "i64"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x40000000, "names": ["3dnowext"]}, + {"in_eax": 0x80000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x80000000, "names": ["3dnow"]}, + {"in_eax": 0x80000007, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000100, "names": ["invtsc"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000001, "names": ["npt"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000002, "names": ["lbrv"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000004, "names": ["svm-lock", "svm_lock"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000008, "names": ["nrip-save", "nrip_save"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000010, "names": ["tsc-scale", "tsc_scale"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000020, "names": ["vmcb-clean", "vmcb_clean"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000040, "names": ["flushbyasid"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000080, "names": ["decodeassists"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000400, "names": ["pause-filter", "pause_filter"]}, + {"in_eax": 0x8000000A, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00001000, "names": ["pfthreshold"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000004, "names": ["xstore"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000008, "names": ["xstore-en"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000040, "names": ["xcrypt"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000080, "names": ["xcrypt-en"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000100, "names": ["ace2"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000200, "names": ["ace2-en"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000400, "names": ["phe"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00000800, "names": ["phe-en"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00001000, "names": ["pmm"]}, + {"in_eax": 0xC0000001, "in_ecx": 0, "eax": 0, "ebx": 0, "ecx": 0, "edx": 0x00002000, "names": ["pmm-en"]}, +] + + +def parseFeatureWords(path): + features = None + + with open(path, "r") as f: + s = f.read() + + props = {} + for i in range(5): + (data, pos) = dec.raw_decode(s) + if i == 0: + features = data["return"] + else: + keys = ["family", "model", "stepping", "model-id"] + props[keys[i - 1]] = data["return"] + + while pos < len(s) and s[pos] != "{": + pos += 1 + s = s[pos:] + + if props["model-id"].find("Intel") != -1: + props["vendor"] = "GenuineIntel" + elif props["model-id"].find("AMD") != -1: + props["vendor"] = "AuthenticAMD" + + cpuid = {} + for feat in features: + in_eax = feat["cpuid-input-eax"] + in_ecx = 0 + if "cpuid-input-ecx" in feat: + in_ecx = feat["cpuid-input-ecx"] + + if in_eax not in cpuid: + cpuid[in_eax] = {} + leaf = cpuid[in_eax] + + if in_ecx not in leaf: + leaf[in_ecx] = {"eax": 0, "ebx": 0, "ecx": 0, "edx": 0} + leaf = leaf[in_ecx] + + leaf[feat["cpuid-register"].lower()] = feat["features"] + + return props, cpuid + + +def propAdd(props, feature, value): + for name in feature["names"]: + props[name] = value + + +dec = json.JSONDecoder() + +for path in sys.argv[1:]: + props, cpuid = parseFeatureWords(path) + + for feature in cpuidMap: + in_eax = feature["in_eax"] + in_ecx = feature["in_ecx"] + eax = feature["eax"] + ebx = feature["ebx"] + ecx = feature["ecx"] + edx = feature["edx"] + + if in_eax not in cpuid or in_ecx not in cpuid[in_eax]: + propAdd(props, feature, False) + else: + leaf = cpuid[in_eax][in_ecx] + propAdd(props, feature, ((eax > 0 and leaf["eax"] & eax > 0) or + (ebx > 0 and leaf["ebx"] & ebx > 0) or + (ecx > 0 and leaf["ecx"] & ecx > 0) or + (edx > 0 and leaf["edx"] & edx > 0))) + + with open(path, "w") as f: + json.dump({"return": {"model": {"name": "base", "props": props}}, + "id": "model-expansion"}, + f, indent = 2, separators = (',', ': ')) + f.write("\n") diff --git a/tests/cputestdata/cpu-gather.sh b/tests/cputestdata/cpu-gather.sh index c8439a661..83963557e 100755 --- a/tests/cputestdata/cpu-gather.sh +++ b/tests/cputestdata/cpu-gather.sh @@ -24,12 +24,39 @@ qom_get() '"property":"'$1'"},"id":"'$1'"}' } -$qemu -machine accel=kvm -cpu host -nodefaults -nographic -qmp stdio <<EOF +model_expansion() +{ + mode=$1 + model=$2 + + echo '{"execute":"query-cpu-model-expansion","arguments":' \ + '{"type":"'"$mode"'","model":'"$model"'},"id":"model-expansion"}' +} + +model=$( + $qemu -machine accel=kvm -cpu host -nodefaults -nographic -qmp stdio <<EOF {"execute":"qmp_capabilities"} -`qom_get feature-words` -`qom_get family` -`qom_get model` -`qom_get stepping` -`qom_get model-id` +$(model_expansion static '{"name":"host"}') +{"execute":"quit"} +EOF +) +model=$( + echo "$model" | \ + sed -ne 's/^{"return": {"model": {\(.*{.*}\)}}, .*/{\1}/p' +) + +$qemu -machine accel=kvm -cpu host -nodefaults -nographic -qmp stdio <<EOF +{"execute":"qmp_capabilities"} +$( + if [ "x$model" != x ]; then + model_expansion full "$model" + else + qom_get feature-words + qom_get family + qom_get model + qom_get stepping + qom_get model-id + fi +) {"execute":"quit"} EOF diff --git a/tests/cputestdata/cpu-parse.sh b/tests/cputestdata/cpu-parse.sh index 3db401daa..86bcb030d 100755 --- a/tests/cputestdata/cpu-parse.sh +++ b/tests/cputestdata/cpu-parse.sh @@ -52,6 +52,9 @@ echo $fname.xml json <<<"$data" >$fname.json if [[ -s $fname.json ]]; then echo $fname.json + if ! grep -q model-expansion $fname.json; then + $(dirname $0)/cpu-convert.py $fname.json + fi else rm $fname.json fi -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:21PM +0100, Jiri Denemark wrote:
Instantiating "host" CPU and querying it using qom-get has been the only way of probing host CPU via QEMU until 2.9.0 implemented query-cpu-model-expansion for x86_64. Even though libvirt never really used the old way its result can be easily converted into the one produced by query-cpu-model-expansion. Thus we can reuse the original test data and possible get new data from hosts where QEMU does not support the new QMP command.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - cpu-convert.py: set "vendor" property according to model-id
tests/cputestdata/cpu-convert.py | 249 +++++++++++++++++++++++++++++++++++++++ tests/cputestdata/cpu-gather.sh | 39 +++++- tests/cputestdata/cpu-parse.sh | 3 + 3 files changed, 285 insertions(+), 6 deletions(-) create mode 100755 tests/cputestdata/cpu-convert.py
diff --git a/tests/cputestdata/cpu-convert.py b/tests/cputestdata/cpu-convert.py new file mode 100755 index 000000000..77bae3628 --- /dev/null +++ b/tests/cputestdata/cpu-convert.py @@ -0,0 +1,249 @@ +#!/usr/bin/python
It's better to specify python version, in this case python2. ACK Pavel

Converted by running the following command, renaming the files as *.new, and committing only the *.new files. (cd tests/cputestdata; ./cpu-convert.py *.json) Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - reconverted to contain "vendor" properties tests/cputestdata/x86_64-cpuid-A10-5800K.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Core-i5-2500.json.new | 203 +++++++++++++++++++++ .../x86_64-cpuid-Core-i5-2540M.json.new | 203 +++++++++++++++++++++ .../x86_64-cpuid-Core-i5-4670T.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Core-i5-6600.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Core-i7-2600.json.new | 203 +++++++++++++++++++++ .../x86_64-cpuid-Core-i7-3740QM.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Core-i7-3770.json.new | 203 +++++++++++++++++++++ .../x86_64-cpuid-Core-i7-4600U.json.new | 203 +++++++++++++++++++++ .../x86_64-cpuid-Core-i7-5600U.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Core2-E6850.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Opteron-2350.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Opteron-6234.json.new | 203 +++++++++++++++++++++ tests/cputestdata/x86_64-cpuid-Phenom-B95.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Xeon-E3-1245.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Xeon-E5-2630.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Xeon-E5-2650.json.new | 203 +++++++++++++++++++++ .../cputestdata/x86_64-cpuid-Xeon-E7-4820.json.new | 203 +++++++++++++++++++++ tests/cputestdata/x86_64-cpuid-Xeon-W3520.json.new | 203 +++++++++++++++++++++ 19 files changed, 3857 insertions(+) create mode 100644 tests/cputestdata/x86_64-cpuid-A10-5800K.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2500.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-6600.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3770.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Core2-E6850.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-2350.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-6234.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Phenom-B95.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json.new create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-W3520.json.new diff --git a/tests/cputestdata/x86_64-cpuid-A10-5800K.json.new b/tests/cputestdata/x86_64-cpuid-A10-5800K.json.new new file mode 100644 index 000000000..132ed249b --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-A10-5800K.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": false, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 1, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "AuthenticAMD", + "arat": false, + "ffxsr": true, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": true, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": true, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": false, + "sse4a": true, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": true, + "model-id": "AMD A10-5800K APU with Radeon(tm) HD Graphics ", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": true, + "acpi": false, + "fma4": true, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": true, + "pcid": false, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": true, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 21, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": true, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": true, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": true, + "kvm-pv-unhalt": true, + "rdtscp": false, + "mmxext": true, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": true, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": true, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": true, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": true, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": true, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": false, + "topoext": false, + "smx": false, + "bmi1": true, + "bmi2": false, + "xsaves": false, + "model": 16 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-2500.json.new b/tests/cputestdata/x86_64-cpuid-Core-i5-2500.json.new new file mode 100644 index 000000000..e98e40d3a --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core-i5-2500.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 7, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": true, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": false, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": " Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz", + "abm": false, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": false, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 42 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json.new b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json.new new file mode 100644 index 000000000..d813326f6 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 7, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": true, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": false, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": " Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz", + "abm": false, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": false, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 42 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json.new b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json.new new file mode 100644 index 000000000..bfcfcfd46 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": true, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 3, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": false, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": true, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": true, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": true, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": true, + "hle": true, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Intel(R) Core(TM) i5-4670T CPU @ 2.30GHz", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": true, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": true, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": true, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": true, + "bmi2": true, + "xsaves": false, + "model": 60 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-6600.json.new b/tests/cputestdata/x86_64-cpuid-Core-i5-6600.json.new new file mode 100644 index 000000000..3bb7feea1 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core-i5-6600.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": true, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": true, + "stepping": 3, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": true, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": true, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": true, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": true, + "tsc-adjust": true, + "aes": true, + "avx2": true, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": true, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": true, + "hle": true, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": true, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": true, + "apic": true, + "fsgsbase": true, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": true, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": true, + "pat": true, + "lbrv": false, + "3dnowprefetch": true, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": true, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": true, + "bmi2": true, + "xsaves": true, + "model": 94 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-2600.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-2600.json.new new file mode 100644 index 000000000..19c448c10 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-2600.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 7, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": false, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": false, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": " Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz", + "abm": false, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": false, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 42 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json.new new file mode 100644 index 000000000..2b50b3da4 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 9, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": false, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": true, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": true, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": " Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz", + "abm": false, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": true, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": false, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 58 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-3770.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-3770.json.new new file mode 100644 index 000000000..b0a8e8b1c --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-3770.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 9, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": false, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": true, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": " Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz", + "abm": false, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": true, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": false, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 58 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json.new new file mode 100644 index 000000000..1acde0a1e --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 1, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": true, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": true, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": true, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": true, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": true, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": true, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": true, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": true, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": true, + "bmi2": true, + "xsaves": false, + "model": 69 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json.new new file mode 100644 index 000000000..a09816078 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": true, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": true, + "stepping": 4, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": true, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": true, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": true, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": true, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": true, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": true, + "hle": true, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": true, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": true, + "apic": true, + "fsgsbase": true, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": true, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": true, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": true, + "bmi2": true, + "xsaves": false, + "model": 61 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Core2-E6850.json.new b/tests/cputestdata/x86_64-cpuid-Core2-E6850.json.new new file mode 100644 index 000000000..164cffec9 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Core2-E6850.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 11, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": false, + "monitor": false, + "sse4_1": false, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": false, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": false, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": false, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": false, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": false, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": false, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz", + "abm": false, + "avx512er": false, + "sse4.1": false, + "sse4.2": false, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": false, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": false, + "sse4-1": false, + "sse4-2": false, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": false, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": false, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": false, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": false, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 15 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-2350.json.new b/tests/cputestdata/x86_64-cpuid-Opteron-2350.json.new new file mode 100644 index 000000000..015ef1764 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Opteron-2350.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": false, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 3, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": false, + "monitor": false, + "sse4_1": false, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": false, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "AuthenticAMD", + "arat": false, + "ffxsr": true, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": false, + "ds": false, + "mpx": false, + "tsc-adjust": false, + "aes": false, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": false, + "sse4a": true, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": false, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Quad-Core AMD Opteron(tm) Processor 2350", + "abm": true, + "avx512er": false, + "sse4.1": false, + "sse4.2": false, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": true, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": true, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": true, + "pcid": false, + "sse4-1": false, + "sse4-2": false, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 16, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": true, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": true, + "kvm-pv-unhalt": true, + "rdtscp": false, + "mmxext": true, + "cid": false, + "ssse3": false, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": false, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": true, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": true, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": true, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": true, + "osvw": true, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": true, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": false, + "svm": true, + "sse3": true, + "sse2": true, + "ss": false, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 2 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-6234.json.new b/tests/cputestdata/x86_64-cpuid-Opteron-6234.json.new new file mode 100644 index 000000000..adfdfadde --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Opteron-6234.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 2, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "AuthenticAMD", + "arat": true, + "ffxsr": true, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": false, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": true, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": false, + "sse4a": true, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": true, + "model-id": "AMD Opteron(TM) Processor 6234 ", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": true, + "acpi": false, + "fma4": true, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": true, + "pcid": false, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": true, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 21, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": true, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": true, + "kvm-pv-unhalt": true, + "rdtscp": false, + "mmxext": true, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": true, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": true, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": true, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": true, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": true, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": false, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 1 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Phenom-B95.json.new b/tests/cputestdata/x86_64-cpuid-Phenom-B95.json.new new file mode 100644 index 000000000..05e8a444e --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Phenom-B95.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": false, + "tsc-deadline": false, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 2, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": false, + "monitor": false, + "sse4_1": false, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": false, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "AuthenticAMD", + "arat": false, + "ffxsr": true, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": false, + "ds": false, + "mpx": false, + "tsc-adjust": false, + "aes": false, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": true, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": false, + "sse4a": true, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": false, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "AMD Phenom(tm) II X4 B95 Processor", + "abm": true, + "avx512er": false, + "sse4.1": false, + "sse4.2": false, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": true, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": true, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": true, + "pcid": false, + "sse4-1": false, + "sse4-2": false, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": true, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 16, + "dtes64": false, + "xd": false, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": false, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": true, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": true, + "kvm-pv-unhalt": true, + "rdtscp": false, + "mmxext": true, + "cid": false, + "ssse3": false, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": false, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": true, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": true, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": true, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": true, + "osvw": true, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": true, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": false, + "svm": false, + "sse3": true, + "sse2": true, + "ss": false, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 4 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json.new new file mode 100644 index 000000000..4828da588 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": true, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": true, + "stepping": 3, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": true, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": true, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": true, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": true, + "tsc-adjust": true, + "aes": true, + "avx2": true, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": true, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": true, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": true, + "hle": true, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": true, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": true, + "apic": true, + "fsgsbase": true, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": true, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": true, + "pat": true, + "lbrv": false, + "3dnowprefetch": true, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": true, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": true, + "bmi2": true, + "xsaves": false, + "model": 94 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json.new new file mode 100644 index 000000000..52a52b35e --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 2, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": false, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": true, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": true, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": true, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": true, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": true, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": true, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": true, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": true, + "bmi2": true, + "xsaves": false, + "model": 63 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json.new new file mode 100644 index 000000000..bd0ab9ca4 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": false, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 2, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": false, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": false, + "tsc-adjust": false, + "aes": true, + "avx2": true, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": true, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": true, + "sep": true, + "xsaveopt": false, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": true, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": true, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": true, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": true, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": true, + "bmi2": true, + "xsaves": false, + "model": 63 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json.new new file mode 100644 index 000000000..ece950390 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 2, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": false, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": false, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": false, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": false, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": " Intel(R) Xeon(R) CPU E7- 4820 @ 2.00GHz", + "abm": false, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": true, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": false, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": true, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 47 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-W3520.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-W3520.json.new new file mode 100644 index 000000000..29e28dc00 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Xeon-W3520.json.new @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": false, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": false, + "stepping": 5, + "tce": false, + "kvm_steal_time": true, + "smep": false, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": false, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": false, + "xgetbv1": false, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "GenuineIntel", + "arat": false, + "ffxsr": false, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": false, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": false, + "avx2": false, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": false, + "perfctr-nb": false, + "nrip_save": false, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": false, + "sse4a": false, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": false, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "Intel(R) Xeon(R) CPU W3520 @ 2.67GHz", + "abm": false, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": false, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": false, + "pcid": false, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": false, + "nrip-save": false, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 6, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": false, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": false, + "mca": true, + "pni": true, + "rdseed": false, + "apic": true, + "fsgsbase": false, + "cmp-legacy": false, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": false, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": false, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": false, + "clflushopt": false, + "pat": true, + "lbrv": false, + "3dnowprefetch": false, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": false, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": false, + "ht": false, + "pdpe1gb": false, + "kvm-pv-eoi": true, + "npt": false, + "xsavec": false, + "lahf_lm": true, + "pclmulqdq": false, + "svm": false, + "sse3": true, + "sse2": true, + "ss": true, + "topoext": false, + "smx": false, + "bmi1": false, + "bmi2": false, + "xsaves": false, + "model": 26 + } + } + }, + "id": "model-expansion" +} -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:22PM +0100, Jiri Denemark wrote:
Converted by running the following command, renaming the files as *.new, and committing only the *.new files.
(cd tests/cputestdata; ./cpu-convert.py *.json)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - reconverted to contain "vendor" properties
ACK Pavel

The original test didn't use family/model numbers to make better decisions about the CPU model and thus mis-detected the model in the two cases which are modified in this commit. The detected CPU models now match those obtained from raw CPUID data. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - updated test results to include vendors tests/cputest.c | 28 +++++++++++++++------- tests/cputestdata/x86_64-cpuid-A10-5800K-json.xml | 1 + .../cputestdata/x86_64-cpuid-Core-i5-2500-json.xml | 1 + .../x86_64-cpuid-Core-i5-2540M-json.xml | 1 + .../x86_64-cpuid-Core-i5-4670T-json.xml | 1 + .../cputestdata/x86_64-cpuid-Core-i5-6600-json.xml | 1 + .../cputestdata/x86_64-cpuid-Core-i7-2600-json.xml | 1 + .../x86_64-cpuid-Core-i7-3740QM-json.xml | 1 + .../cputestdata/x86_64-cpuid-Core-i7-3770-json.xml | 1 + .../x86_64-cpuid-Core-i7-4600U-json.xml | 1 + .../x86_64-cpuid-Core-i7-5600U-json.xml | 12 ++++++---- .../cputestdata/x86_64-cpuid-Core2-E6850-json.xml | 5 ++-- .../cputestdata/x86_64-cpuid-Opteron-2350-json.xml | 1 + .../cputestdata/x86_64-cpuid-Opteron-6234-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml | 1 + .../cputestdata/x86_64-cpuid-Xeon-E3-1245-json.xml | 1 + .../cputestdata/x86_64-cpuid-Xeon-E5-2630-json.xml | 1 + .../cputestdata/x86_64-cpuid-Xeon-E5-2650-json.xml | 1 + .../cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-W3520-json.xml | 1 + 20 files changed, 48 insertions(+), 14 deletions(-) diff --git a/tests/cputest.c b/tests/cputest.c index c0a816b60..8c16fb95c 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -43,7 +43,9 @@ #if WITH_QEMU && WITH_YAJL # include "testutilsqemu.h" # include "qemumonitortestutils.h" -# include "qemu/qemu_monitor_json.h" +# define __QEMU_CAPSRIV_H_ALLOW__ +# include "qemu/qemu_capspriv.h" +# undef __QEMU_CAPSRIV_H_ALLOW__ #endif #define VIR_FROM_THIS VIR_FROM_CPU @@ -517,14 +519,15 @@ static int cpuTestJSONCPUID(const void *arg) { const struct data *data = arg; - virCPUDataPtr cpuData = NULL; + qemuMonitorCPUModelInfoPtr model = NULL; + virQEMUCapsPtr qemuCaps = NULL; virCPUDefPtr cpu = NULL; qemuMonitorTestPtr testMon = NULL; char *json = NULL; char *result = NULL; int ret = -1; - if (virAsprintf(&json, "%s/cputestdata/%s-cpuid-%s.json", + if (virAsprintf(&json, "%s/cputestdata/%s-cpuid-%s.json.new", abs_srcdir, virArchToString(data->arch), data->host) < 0 || virAsprintf(&result, "cpuid-%s-json", data->host) < 0) goto cleanup; @@ -532,26 +535,35 @@ cpuTestJSONCPUID(const void *arg) if (!(testMon = qemuMonitorTestNewFromFile(json, driver.xmlopt, true))) goto cleanup; - if (qemuMonitorJSONGetCPUx86Data(qemuMonitorTestGetMonitor(testMon), - "feature-words", &cpuData) < 0) + if (qemuMonitorGetCPUModelExpansion(qemuMonitorTestGetMonitor(testMon), + QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC, + "host", &model) < 0) goto cleanup; + if (!(qemuCaps = virQEMUCapsNew())) + goto cleanup; + + virQEMUCapsSetArch(qemuCaps, data->arch); + virQEMUCapsSetCPUModelInfo(qemuCaps, VIR_DOMAIN_VIRT_KVM, model); + model = NULL; + if (VIR_ALLOC(cpu) < 0) goto cleanup; - cpu->arch = cpuData->arch; + cpu->arch = data->arch; cpu->type = VIR_CPU_TYPE_GUEST; cpu->match = VIR_CPU_MATCH_EXACT; cpu->fallback = VIR_CPU_FALLBACK_FORBID; - if (cpuDecode(cpu, cpuData, NULL, 0, NULL) < 0) + if (virQEMUCapsInitCPUModel(qemuCaps, VIR_DOMAIN_VIRT_KVM, cpu) != 0) goto cleanup; ret = cpuTestCompareXML(data->arch, cpu, result, false); cleanup: + qemuMonitorCPUModelInfoFree(model); + virObjectUnref(qemuCaps); qemuMonitorTestFree(testMon); - virCPUDataFree(cpuData); virCPUDefFree(cpu); VIR_FREE(result); VIR_FREE(json); diff --git a/tests/cputestdata/x86_64-cpuid-A10-5800K-json.xml b/tests/cputestdata/x86_64-cpuid-A10-5800K-json.xml index 7a38f0fd4..c021fcddf 100644 --- a/tests/cputestdata/x86_64-cpuid-A10-5800K-json.xml +++ b/tests/cputestdata/x86_64-cpuid-A10-5800K-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Opteron_G5</model> + <vendor>AMD</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='x2apic'/> <feature policy='require' name='hypervisor'/> diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-2500-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2500-json.xml index 980cf74a0..2e2430e78 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i5-2500-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i5-2500-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>SandyBridge</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='pcid'/> diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-2540M-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M-json.xml index 980cf74a0..2e2430e78 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i5-2540M-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>SandyBridge</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='pcid'/> diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-4670T-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T-json.xml index c93688b89..cf23f59d7 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i5-4670T-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Haswell</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='vmx'/> diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-6600-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-6600-json.xml index 171b482c3..e768aa674 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i5-6600-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i5-6600-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Skylake-Client</model> + <vendor>Intel</vendor> <feature policy='require' name='ss'/> <feature policy='require' name='hypervisor'/> <feature policy='require' name='tsc_adjust'/> diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-2600-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-2600-json.xml index 27d9f3580..4e721aba4 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-2600-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-2600-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>SandyBridge</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='pcid'/> diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-json.xml index 9adeecc80..03c22de4b 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>IvyBridge</model> + <vendor>Intel</vendor> <feature policy='require' name='ss'/> <feature policy='require' name='vmx'/> <feature policy='require' name='pcid'/> diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-3770-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-3770-json.xml index a70ae4866..c1544afd3 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-3770-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-3770-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>IvyBridge</model> + <vendor>Intel</vendor> <feature policy='require' name='ss'/> <feature policy='require' name='pcid'/> <feature policy='require' name='hypervisor'/> diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-4600U-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U-json.xml index 5fa3146a7..8e4e9d96a 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-4600U-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Haswell-noTSX</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='vmx'/> diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-json.xml index 159797178..be11fa061 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-json.xml @@ -1,12 +1,16 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> - <model fallback='forbid'>Skylake-Client</model> + <model fallback='forbid'>Broadwell</model> + <vendor>Intel</vendor> + <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='vmx'/> + <feature policy='require' name='f16c'/> + <feature policy='require' name='rdrand'/> <feature policy='require' name='hypervisor'/> + <feature policy='require' name='arat'/> <feature policy='require' name='tsc_adjust'/> + <feature policy='require' name='xsaveopt'/> <feature policy='require' name='pdpe1gb'/> - <feature policy='disable' name='mpx'/> - <feature policy='disable' name='xsavec'/> - <feature policy='disable' name='xgetbv1'/> + <feature policy='require' name='abm'/> </cpu> diff --git a/tests/cputestdata/x86_64-cpuid-Core2-E6850-json.xml b/tests/cputestdata/x86_64-cpuid-Core2-E6850-json.xml index ddd730735..8950119a1 100644 --- a/tests/cputestdata/x86_64-cpuid-Core2-E6850-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core2-E6850-json.xml @@ -1,11 +1,12 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> - <model fallback='forbid'>Penryn</model> + <model fallback='forbid'>Conroe</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> + <feature policy='require' name='cx16'/> <feature policy='require' name='x2apic'/> <feature policy='require' name='tsc-deadline'/> <feature policy='require' name='hypervisor'/> <feature policy='require' name='tsc_adjust'/> - <feature policy='disable' name='sse4.1'/> </cpu> diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml b/tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml index be4cf5c74..302d6562c 100644 --- a/tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Opteron_G3</model> + <vendor>AMD</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='x2apic'/> <feature policy='require' name='tsc-deadline'/> diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-6234-json.xml b/tests/cputestdata/x86_64-cpuid-Opteron-6234-json.xml index 2e28342fd..cc8918661 100644 --- a/tests/cputestdata/x86_64-cpuid-Opteron-6234-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Opteron-6234-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Opteron_G4</model> + <vendor>AMD</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='x2apic'/> <feature policy='require' name='tsc-deadline'/> diff --git a/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml b/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml index c1070de74..d4605263b 100644 --- a/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Opteron_G3</model> + <vendor>AMD</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='x2apic'/> <feature policy='require' name='hypervisor'/> diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-json.xml index 7a8246e5c..e0e060691 100644 --- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Skylake-Client</model> + <vendor>Intel</vendor> <feature policy='require' name='ss'/> <feature policy='require' name='vmx'/> <feature policy='require' name='hypervisor'/> diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-json.xml index 6b4edc389..ec5f56205 100644 --- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Haswell-noTSX</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='f16c'/> diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-json.xml index 36b7bf20f..6e4aff07a 100644 --- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Haswell-noTSX</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='vmx'/> diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml index ff6ab65d9..cb69ff56f 100644 --- a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>SandyBridge</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='pcid'/> diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-W3520-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-W3520-json.xml index 1aadbf3d2..348bef829 100644 --- a/tests/cputestdata/x86_64-cpuid-Xeon-W3520-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Xeon-W3520-json.xml @@ -1,6 +1,7 @@ <cpu mode='custom' match='exact'> <arch>x86_64</arch> <model fallback='forbid'>Nehalem</model> + <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='x2apic'/> -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:23PM +0100, Jiri Denemark wrote:
The original test didn't use family/model numbers to make better decisions about the CPU model and thus mis-detected the model in the two cases which are modified in this commit. The detected CPU models now match those obtained from raw CPUID data.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - updated test results to include vendors
ACK Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - no change tests/cputestdata/x86_64-cpuid-A10-5800K.json | 77 ------------------- tests/cputestdata/x86_64-cpuid-Core-i5-2500.json | 88 ---------------------- tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json | 82 -------------------- tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json | 77 ------------------- tests/cputestdata/x86_64-cpuid-Core-i5-6600.json | 82 -------------------- tests/cputestdata/x86_64-cpuid-Core-i7-2600.json | 77 ------------------- tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json | 77 ------------------- tests/cputestdata/x86_64-cpuid-Core-i7-3770.json | 77 ------------------- tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json | 82 -------------------- tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json | 88 ---------------------- tests/cputestdata/x86_64-cpuid-Core2-E6850.json | 77 ------------------- tests/cputestdata/x86_64-cpuid-Opteron-2350.json | 71 ----------------- tests/cputestdata/x86_64-cpuid-Opteron-6234.json | 88 ---------------------- tests/cputestdata/x86_64-cpuid-Phenom-B95.json | 77 ------------------- tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json | 88 ---------------------- tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json | 77 ------------------- tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json | 71 ----------------- tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json | 77 ------------------- tests/cputestdata/x86_64-cpuid-Xeon-W3520.json | 77 ------------------- 19 files changed, 1510 deletions(-) delete mode 100644 tests/cputestdata/x86_64-cpuid-A10-5800K.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2500.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-6600.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3770.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Core2-E6850.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-2350.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-6234.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Phenom-B95.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json delete mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-W3520.json diff --git a/tests/cputestdata/x86_64-cpuid-A10-5800K.json b/tests/cputestdata/x86_64-cpuid-A10-5800K.json deleted file mode 100644 index 53b39ad03..000000000 --- a/tests/cputestdata/x86_64-cpuid-A10-5800K.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 9 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 2165747 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 642779136 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 10 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 3065524739 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 126614527 - } - ], - "id": "feature-words" -} - -{ - "return": 21, - "id": "family" -} - -{ - "return": 16, - "id": "model" -} - -{ - "return": 1, - "id": "stepping" -} - -{ - "return": "AMD A10-5800K APU with Radeon(tm) HD Graphics ", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-2500.json b/tests/cputestdata/x86_64-cpuid-Core-i5-2500.json deleted file mode 100644 index 156b77248..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core-i5-2500.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-eax": 6, - "features": 4 - }, - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 672139264 - }, - { - "cpuid-register": "ECX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 0 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 2 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 2545558019 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 42, - "id": "model" -} - -{ - "return": 7, - "id": "stepping" -} - -{ - "return": " Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json deleted file mode 100644 index 6dc2a803a..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-eax": 6, - "features": 4 - }, - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 672139264 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 2 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 2545558019 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 42, - "id": "model" -} - -{ - "return": 7, - "id": "stepping" -} - -{ - "return": " Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json deleted file mode 100644 index e715ca082..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 33 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 739248128 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 4027 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 4160369187 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 60, - "id": "model" -} - -{ - "return": 3, - "id": "stepping" -} - -{ - "return": "Intel(R) Core(TM) i5-4670T CPU @ 2.30GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-6600.json b/tests/cputestdata/x86_64-cpuid-Core-i5-6600.json deleted file mode 100644 index da296f945..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core-i5-6600.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-eax": 6, - "features": 4 - }, - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 15 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 289 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 739248128 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 10244027 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 4160369155 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 94, - "id": "model" -} - -{ - "return": 3, - "id": "stepping" -} - -{ - "return": "Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-2600.json b/tests/cputestdata/x86_64-cpuid-Core-i7-2600.json deleted file mode 100644 index dd3544900..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-2600.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 672139264 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 2 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 2545558019 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 42, - "id": "model" -} - -{ - "return": 7, - "id": "stepping" -} - -{ - "return": " Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json deleted file mode 100644 index 2b1349f17..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 672139264 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 643 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 4156170787 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 58, - "id": "model" -} - -{ - "return": 9, - "id": "stepping" -} - -{ - "return": " Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-3770.json b/tests/cputestdata/x86_64-cpuid-Core-i7-3770.json deleted file mode 100644 index d83e7788b..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-3770.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 672139264 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 643 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 4156170755 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 58, - "id": "model" -} - -{ - "return": 9, - "id": "stepping" -} - -{ - "return": " Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json deleted file mode 100644 index 2b15fadfd..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-eax": 6, - "features": 4 - }, - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 33 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 739248128 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 1963 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 4160369187 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 69, - "id": "model" -} - -{ - "return": 1, - "id": "stepping" -} - -{ - "return": "Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json deleted file mode 100644 index b570d46b7..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-eax": 6, - "features": 4 - }, - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 289 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 739248128 - }, - { - "cpuid-register": "ECX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 0 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 1839035 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 4160369187 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 61, - "id": "model" -} - -{ - "return": 4, - "id": "stepping" -} - -{ - "return": "Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Core2-E6850.json b/tests/cputestdata/x86_64-cpuid-Core2-E6850.json deleted file mode 100644 index 44be368f7..000000000 --- a/tests/cputestdata/x86_64-cpuid-Core2-E6850.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 537921536 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 2 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 2166366721 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 15, - "id": "model" -} - -{ - "return": 11, - "id": "stepping" -} - -{ - "return": "Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-2350.json b/tests/cputestdata/x86_64-cpuid-Opteron-2350.json deleted file mode 100644 index 79b5afad0..000000000 --- a/tests/cputestdata/x86_64-cpuid-Opteron-2350.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 1 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1015 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 3864004608 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 2174754817 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 126614527 - } - ], - "id": "feature-words" -} - -{ - "return": 16, - "id": "family" -} - -{ - "return": 2, - "id": "model" -} - -{ - "return": 3, - "id": "stepping" -} - -{ - "return": "Quad-Core AMD Opteron(tm) Processor 2350", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-6234.json b/tests/cputestdata/x86_64-cpuid-Opteron-6234.json deleted file mode 100644 index 0df386076..000000000 --- a/tests/cputestdata/x86_64-cpuid-Opteron-6234.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-eax": 6, - "features": 4 - }, - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 9 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 68595 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 668204031 - }, - { - "cpuid-register": "ECX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 0 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 2 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 2545426947 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 126614527 - } - ], - "id": "feature-words" -} - -{ - "return": 21, - "id": "family" -} - -{ - "return": 1, - "id": "model" -} - -{ - "return": 2, - "id": "stepping" -} - -{ - "return": "AMD Opteron(TM) Processor 6234 ", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Phenom-B95.json b/tests/cputestdata/x86_64-cpuid-Phenom-B95.json deleted file mode 100644 index 5f5badda9..000000000 --- a/tests/cputestdata/x86_64-cpuid-Phenom-B95.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 9 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1011 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 3862956032 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 2157977601 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 126614527 - } - ], - "id": "feature-words" -} - -{ - "return": 16, - "id": "family" -} - -{ - "return": 4, - "id": "model" -} - -{ - "return": 2, - "id": "stepping" -} - -{ - "return": "AMD Phenom(tm) II X4 B95 Processor", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json deleted file mode 100644 index 10fbe069f..000000000 --- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-eax": 6, - "features": 4 - }, - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 7 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 289 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 739248128 - }, - { - "cpuid-register": "ECX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 0 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 10244027 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 4160369187 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 94, - "id": "model" -} - -{ - "return": 3, - "id": "stepping" -} - -{ - "return": "Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json deleted file mode 100644 index f1affa46b..000000000 --- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 33 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 739248128 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 1963 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 4160369155 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 63, - "id": "model" -} - -{ - "return": 2, - "id": "stepping" -} - -{ - "return": "Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json deleted file mode 100644 index 2cd15f64b..000000000 --- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 33 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 739248128 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 1961 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 4160369187 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 63, - "id": "model" -} - -{ - "return": 2, - "id": "stepping" -} - -{ - "return": "Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json deleted file mode 100644 index a8846132e..000000000 --- a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 739248128 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 2 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 2210013699 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 47, - "id": "model" -} - -{ - "return": 2, - "id": "stepping" -} - -{ - "return": " Intel(R) Xeon(R) CPU E7- 4820 @ 2.00GHz", - "id": "model-id" -} diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-W3520.json b/tests/cputestdata/x86_64-cpuid-Xeon-W3520.json deleted file mode 100644 index c75594d4e..000000000 --- a/tests/cputestdata/x86_64-cpuid-Xeon-W3520.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "return": [ - { - "cpuid-register": "EAX", - "cpuid-input-ecx": 1, - "cpuid-input-eax": 13, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483658, - "features": 0 - }, - { - "cpuid-register": "EAX", - "cpuid-input-eax": 1073741825, - "features": 16777467 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 3221225473, - "features": 0 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483655, - "features": 0 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 2147483649, - "features": 1 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 2147483649, - "features": 672139264 - }, - { - "cpuid-register": "EBX", - "cpuid-input-ecx": 0, - "cpuid-input-eax": 7, - "features": 2 - }, - { - "cpuid-register": "ECX", - "cpuid-input-eax": 1, - "features": 2159550977 - }, - { - "cpuid-register": "EDX", - "cpuid-input-eax": 1, - "features": 260832255 - } - ], - "id": "feature-words" -} - -{ - "return": 6, - "id": "family" -} - -{ - "return": 26, - "id": "model" -} - -{ - "return": 5, - "id": "stepping" -} - -{ - "return": "Intel(R) Xeon(R) CPU W3520 @ 2.67GHz", - "id": "model-id" -} -- 2.11.1

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - no change tests/cputest.c | 2 +- .../{x86_64-cpuid-A10-5800K.json.new => x86_64-cpuid-A10-5800K.json} | 0 ...86_64-cpuid-Core-i5-2500.json.new => x86_64-cpuid-Core-i5-2500.json} | 0 ..._64-cpuid-Core-i5-2540M.json.new => x86_64-cpuid-Core-i5-2540M.json} | 0 ..._64-cpuid-Core-i5-4670T.json.new => x86_64-cpuid-Core-i5-4670T.json} | 0 ...86_64-cpuid-Core-i5-6600.json.new => x86_64-cpuid-Core-i5-6600.json} | 0 ...86_64-cpuid-Core-i7-2600.json.new => x86_64-cpuid-Core-i7-2600.json} | 0 ...4-cpuid-Core-i7-3740QM.json.new => x86_64-cpuid-Core-i7-3740QM.json} | 0 ...86_64-cpuid-Core-i7-3770.json.new => x86_64-cpuid-Core-i7-3770.json} | 0 ..._64-cpuid-Core-i7-4600U.json.new => x86_64-cpuid-Core-i7-4600U.json} | 0 ..._64-cpuid-Core-i7-5600U.json.new => x86_64-cpuid-Core-i7-5600U.json} | 0 ...{x86_64-cpuid-Core2-E6850.json.new => x86_64-cpuid-Core2-E6850.json} | 0 ...86_64-cpuid-Opteron-2350.json.new => x86_64-cpuid-Opteron-2350.json} | 0 ...86_64-cpuid-Opteron-6234.json.new => x86_64-cpuid-Opteron-6234.json} | 0 .../{x86_64-cpuid-Phenom-B95.json.new => x86_64-cpuid-Phenom-B95.json} | 0 ...86_64-cpuid-Xeon-E3-1245.json.new => x86_64-cpuid-Xeon-E3-1245.json} | 0 ...86_64-cpuid-Xeon-E5-2630.json.new => x86_64-cpuid-Xeon-E5-2630.json} | 0 ...86_64-cpuid-Xeon-E5-2650.json.new => x86_64-cpuid-Xeon-E5-2650.json} | 0 ...86_64-cpuid-Xeon-E7-4820.json.new => x86_64-cpuid-Xeon-E7-4820.json} | 0 .../{x86_64-cpuid-Xeon-W3520.json.new => x86_64-cpuid-Xeon-W3520.json} | 0 20 files changed, 1 insertion(+), 1 deletion(-) rename tests/cputestdata/{x86_64-cpuid-A10-5800K.json.new => x86_64-cpuid-A10-5800K.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core-i5-2500.json.new => x86_64-cpuid-Core-i5-2500.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core-i5-2540M.json.new => x86_64-cpuid-Core-i5-2540M.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core-i5-4670T.json.new => x86_64-cpuid-Core-i5-4670T.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core-i5-6600.json.new => x86_64-cpuid-Core-i5-6600.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core-i7-2600.json.new => x86_64-cpuid-Core-i7-2600.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core-i7-3740QM.json.new => x86_64-cpuid-Core-i7-3740QM.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core-i7-3770.json.new => x86_64-cpuid-Core-i7-3770.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core-i7-4600U.json.new => x86_64-cpuid-Core-i7-4600U.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core-i7-5600U.json.new => x86_64-cpuid-Core-i7-5600U.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Core2-E6850.json.new => x86_64-cpuid-Core2-E6850.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Opteron-2350.json.new => x86_64-cpuid-Opteron-2350.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Opteron-6234.json.new => x86_64-cpuid-Opteron-6234.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Phenom-B95.json.new => x86_64-cpuid-Phenom-B95.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Xeon-E3-1245.json.new => x86_64-cpuid-Xeon-E3-1245.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Xeon-E5-2630.json.new => x86_64-cpuid-Xeon-E5-2630.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Xeon-E5-2650.json.new => x86_64-cpuid-Xeon-E5-2650.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Xeon-E7-4820.json.new => x86_64-cpuid-Xeon-E7-4820.json} (100%) rename tests/cputestdata/{x86_64-cpuid-Xeon-W3520.json.new => x86_64-cpuid-Xeon-W3520.json} (100%) diff --git a/tests/cputest.c b/tests/cputest.c index 8c16fb95c..b7dd95d84 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -527,7 +527,7 @@ cpuTestJSONCPUID(const void *arg) char *result = NULL; int ret = -1; - if (virAsprintf(&json, "%s/cputestdata/%s-cpuid-%s.json.new", + if (virAsprintf(&json, "%s/cputestdata/%s-cpuid-%s.json", abs_srcdir, virArchToString(data->arch), data->host) < 0 || virAsprintf(&result, "cpuid-%s-json", data->host) < 0) goto cleanup; diff --git a/tests/cputestdata/x86_64-cpuid-A10-5800K.json.new b/tests/cputestdata/x86_64-cpuid-A10-5800K.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-A10-5800K.json.new rename to tests/cputestdata/x86_64-cpuid-A10-5800K.json diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-2500.json.new b/tests/cputestdata/x86_64-cpuid-Core-i5-2500.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core-i5-2500.json.new rename to tests/cputestdata/x86_64-cpuid-Core-i5-2500.json diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json.new b/tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json.new rename to tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json.new b/tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json.new rename to tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-6600.json.new b/tests/cputestdata/x86_64-cpuid-Core-i5-6600.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core-i5-6600.json.new rename to tests/cputestdata/x86_64-cpuid-Core-i5-6600.json diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-2600.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-2600.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core-i7-2600.json.new rename to tests/cputestdata/x86_64-cpuid-Core-i7-2600.json diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json.new rename to tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-3770.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-3770.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core-i7-3770.json.new rename to tests/cputestdata/x86_64-cpuid-Core-i7-3770.json diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json.new rename to tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json.new b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json.new rename to tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json diff --git a/tests/cputestdata/x86_64-cpuid-Core2-E6850.json.new b/tests/cputestdata/x86_64-cpuid-Core2-E6850.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Core2-E6850.json.new rename to tests/cputestdata/x86_64-cpuid-Core2-E6850.json diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-2350.json.new b/tests/cputestdata/x86_64-cpuid-Opteron-2350.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Opteron-2350.json.new rename to tests/cputestdata/x86_64-cpuid-Opteron-2350.json diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-6234.json.new b/tests/cputestdata/x86_64-cpuid-Opteron-6234.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Opteron-6234.json.new rename to tests/cputestdata/x86_64-cpuid-Opteron-6234.json diff --git a/tests/cputestdata/x86_64-cpuid-Phenom-B95.json.new b/tests/cputestdata/x86_64-cpuid-Phenom-B95.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Phenom-B95.json.new rename to tests/cputestdata/x86_64-cpuid-Phenom-B95.json diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json.new rename to tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json.new rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json.new rename to tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json.new rename to tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-W3520.json.new b/tests/cputestdata/x86_64-cpuid-Xeon-W3520.json similarity index 100% rename from tests/cputestdata/x86_64-cpuid-Xeon-W3520.json.new rename to tests/cputestdata/x86_64-cpuid-Xeon-W3520.json -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:25PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - no change
ACK Pavel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 3: - no change Version 2: - no change docs/news.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 74dfe9add..355dfa7b7 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -130,6 +130,17 @@ driver with all backends which may pull in too many dependencies. </description> </change> + <change> + <summary> + qemu: Detect host CPU model by asking QEMU on x86_64 + </summary> + <description> + Previously, libvirt detected the host CPU model using CPUID + instruction, which cased libvirt to detect a lot of CPU features + that are not supported by QEMU/KVM. Asking QEMU makes sure we + don't ask for unsupported features. + </description> + </change> </section> <section title="Bug fixes"> <change> -- 2.11.1

On Thu, Feb 23, 2017 at 03:15:26PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 3: - no change
Version 2: - no change
docs/news.xml | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml index 74dfe9add..355dfa7b7 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -130,6 +130,17 @@ driver with all backends which may pull in too many dependencies. </description> </change> + <change> + <summary> + qemu: Detect host CPU model by asking QEMU on x86_64 + </summary> + <description> + Previously, libvirt detected the host CPU model using CPUID + instruction, which cased libvirt to detect a lot of CPU features + that are not supported by QEMU/KVM. Asking QEMU makes sure we + don't ask for unsupported features.
Wouldn't be better to use something like this? " ... we don't start it with unsupported features." ACK anyway Pavel
+ </description> + </change> </section> <section title="Bug fixes"> <change> -- 2.11.1
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Thanks for the reviews. I pushed all patches which didn't rely on the new QEMU feature. They are mostly refactoring the code or adding new internal APIs used in the rest of the series. I'll wait with pushing the other patches until the QEMU feature is accepted upstream. Pushed patches: - qemu: Refactor virQEMUCapsInitHostCPUModel - qemu: Fix CPU model fallback in domain capabilities - cpu_x86: Drop virCPUx86MakeData and use virCPUDataNew - cpu_x86: Make virCPUx86DataClear static - cpu: Rework cpuDataFree - cpu_x86: Make virCPUx86DataAddCPUID work with virCPUDataPtr - cpu_x86: Introduce virCPUx86DataSetSignature - cpu_x86: Introduce virCPUx86DataSetVendor - cpu_x86: Introduce virCPUx86DataAddFeature - cputest: Rename x86 data files - cputest: Use virArch enum rather than strings Patches waiting for QEMU code to be pushed: - qemucapstest: Update test data for QEMU 2.9.0 - domaincapstest: Add test data for QEMU 2.9.0 - docs: Update description of the host-model CPU mode - qemu: Rename hostCPU/feature element in capabilities cache - qemu: Prepare for more types in qemuMonitorCPUModelInfo - qemu: Store more types in qemuMonitorCPUModelInfo - qemu: Probe "max" CPU model in TCG - qemu: Get host CPU model from QEMU on x86_64 - qemu: Use enum for CPU model expansion type - qemu: Use full CPU model expansion on x86 - qemu: Make virQEMUCapsInitCPUModel testable - cputest: Switch host CPU data scripts to model expansion - cputest: Convert all json data files to query-cpu-model-expansion - cputest: Test virQEMUCapsInitCPUModel - cputest: Drop obsolete CPU test data files - cputest: Drop .new suffix from CPU test data files - news: Detect host CPU model by asking QEMU on x86_64 Jirka

Thanks for the reviews.
Patches waiting for QEMU code to be pushed:
- qemucapstest: Update test data for QEMU 2.9.0 - domaincapstest: Add test data for QEMU 2.9.0 - docs: Update description of the host-model CPU mode - qemu: Rename hostCPU/feature element in capabilities cache - qemu: Prepare for more types in qemuMonitorCPUModelInfo - qemu: Store more types in qemuMonitorCPUModelInfo - qemu: Probe "max" CPU model in TCG - qemu: Get host CPU model from QEMU on x86_64 - qemu: Use enum for CPU model expansion type - qemu: Use full CPU model expansion on x86 - qemu: Make virQEMUCapsInitCPUModel testable - cputest: Switch host CPU data scripts to model expansion - cputest: Convert all json data files to query-cpu-model-expansion - cputest: Test virQEMUCapsInitCPUModel - cputest: Drop obsolete CPU test data files - cputest: Drop .new suffix from CPU test data files - news: Detect host CPU model by asking QEMU on x86_64
The QEMU implementation is merged for the upcoming 2.9.0. I changed libvirt 3.1.0 references to 3.2.0 and pushed all the remaining patches. Jirka
participants (3)
-
Andrea Bolognani
-
Jiri Denemark
-
Pavel Hrdina