CPU signatures in the cpu_map serve as a hint for CPUID to CPU model matching algorithm. If the CPU signatures matches any CPU model in the cpu_map, this model will be the preferred one. This works out well and solved several mismatches, but in real world CPUs which should match a single CPU model may be produced with several different signatures. For example, low voltage Broadwell CPUs for laptops and Broadwell CPUs for servers differ in CPU model numbers while we should detect them all as Broadwell CPU model. This patch adds support for storing several signatures for a single CPU model to make this hint useful for more CPUs. Later commits will provide additional signatures for existing CPU models, which will correct some results in our CPU test suite. The list of signatures corresponding to each CPU model were generated by consulting the following sites: https://en.wikichip.org/wiki/intel/cpuid http://www.cpu-world.com/cgi-bin/CPUID.pl https://ark.intel.com/content/www/us/en/ark.html Jiri Denemark (26): cputest: Make sure generated files pass syntax-check cputest: Add data for Intel(R) Xeon(R) CPU E5-2630 v4 cputest: Add data for Intel(R) Core(TM) i7-7600U cputest: Add data for Intel(R) Xeon(R) CPU E7540 cputest: Add data for Intel(R) Xeon(R) CPU E5-2650 cpu_x86: Separate ancestor model parsing from x86ModelParse cpu_x86: Separate signature parsing from x86ModelParse cpu_x86: Separate vendor parsing from x86ModelParse cpu_x86: Separate feature list parsing from x86ModelParse cpu_x86: Make sure CPU model names are unique in cpu_map cpu_x86: Allow multiple signatures for a CPU model qemu_capabilities: Inroduce virQEMUCapsGetCPUModelX86Data qemu_capabilities: Introduce virQEMUCapsGetCPUModelInfo qemu_capabilities: Use virQEMUCapsGetCPUModelInfo cpu_x86: Add virCPUx86DataGetSignature for tests cpu_map: Add hex representation of signatures cputest: Test CPU signatures cpu_map: Add more signatures for Conroe CPU model cpu_map: Add more signatures for Penryn CPU model cpu_map: Add more signatures for Nehalem CPU models cpu_map: Add more signatures for Westmere CPU model cpu_map: Add more signatures for SandyBridge CPU models cpu_map: Add more signatures for IvyBridge CPU models cpu_map: Add more signatures for Haswell CPU models cpu_map: Add more signatures for Broadwell CPU models cpu_map: Add more signatures for Skylake-Client CPU models src/cpu/cpu_x86.c | 345 +++-- src/cpu/cpu_x86.h | 5 + src/cpu_map/x86_Broadwell-IBRS.xml | 5 +- src/cpu_map/x86_Broadwell-noTSX-IBRS.xml | 5 +- src/cpu_map/x86_Broadwell-noTSX.xml | 5 +- src/cpu_map/x86_Broadwell.xml | 5 +- src/cpu_map/x86_Conroe.xml | 3 +- src/cpu_map/x86_EPYC-IBRS.xml | 2 +- src/cpu_map/x86_EPYC.xml | 2 +- src/cpu_map/x86_Haswell-IBRS.xml | 5 +- src/cpu_map/x86_Haswell-noTSX-IBRS.xml | 5 +- src/cpu_map/x86_Haswell-noTSX.xml | 5 +- src/cpu_map/x86_Haswell.xml | 5 +- src/cpu_map/x86_Icelake-Client.xml | 2 +- src/cpu_map/x86_Icelake-Server.xml | 2 +- src/cpu_map/x86_IvyBridge-IBRS.xml | 3 +- src/cpu_map/x86_IvyBridge.xml | 3 +- src/cpu_map/x86_Nehalem-IBRS.xml | 5 +- src/cpu_map/x86_Nehalem.xml | 5 +- src/cpu_map/x86_Opteron_G1.xml | 2 +- src/cpu_map/x86_Opteron_G2.xml | 2 +- src/cpu_map/x86_Opteron_G3.xml | 2 +- src/cpu_map/x86_Opteron_G4.xml | 2 +- src/cpu_map/x86_Opteron_G5.xml | 2 +- src/cpu_map/x86_Penryn.xml | 3 +- src/cpu_map/x86_SandyBridge-IBRS.xml | 3 +- src/cpu_map/x86_SandyBridge.xml | 3 +- src/cpu_map/x86_Skylake-Client-IBRS.xml | 7 +- src/cpu_map/x86_Skylake-Client.xml | 7 +- src/cpu_map/x86_Skylake-Server-IBRS.xml | 2 +- src/cpu_map/x86_Skylake-Server.xml | 2 +- src/cpu_map/x86_Westmere-IBRS.xml | 2 +- src/cpu_map/x86_Westmere.xml | 4 +- src/libvirt_private.syms | 1 + src/qemu/qemu_capabilities.c | 91 +- src/qemu/qemu_capspriv.h | 8 + tests/cputest.c | 96 ++ tests/cputestdata/cpu-reformat.py | 2 +- tests/cputestdata/x86_64-cpuid-A10-5800K.sig | 4 + tests/cputestdata/x86_64-cpuid-Atom-D510.sig | 4 + tests/cputestdata/x86_64-cpuid-Atom-N450.sig | 4 + .../cputestdata/x86_64-cpuid-Core-i5-2500.sig | 4 + .../x86_64-cpuid-Core-i5-2540M.sig | 4 + .../x86_64-cpuid-Core-i5-4670T.sig | 4 + .../x86_64-cpuid-Core-i5-650-json.xml | 9 +- .../cputestdata/x86_64-cpuid-Core-i5-650.sig | 4 + .../cputestdata/x86_64-cpuid-Core-i5-6600.sig | 4 + .../x86_64-cpuid-Core-i7-2600-xsaveopt.sig | 4 + .../cputestdata/x86_64-cpuid-Core-i7-2600.sig | 4 + .../x86_64-cpuid-Core-i7-3520M.sig | 4 + .../x86_64-cpuid-Core-i7-3740QM.sig | 4 + .../cputestdata/x86_64-cpuid-Core-i7-3770.sig | 4 + .../x86_64-cpuid-Core-i7-4510U.sig | 4 + .../x86_64-cpuid-Core-i7-4600U.sig | 4 + .../x86_64-cpuid-Core-i7-5600U-arat.sig | 4 + .../x86_64-cpuid-Core-i7-5600U-ibrs.sig | 4 + .../x86_64-cpuid-Core-i7-5600U.sig | 4 + .../x86_64-cpuid-Core-i7-7600U-disabled.xml | 6 + .../x86_64-cpuid-Core-i7-7600U-enabled.xml | 8 + .../x86_64-cpuid-Core-i7-7600U-guest.xml | 28 + .../x86_64-cpuid-Core-i7-7600U-host.xml | 29 + .../x86_64-cpuid-Core-i7-7600U-json.xml | 13 + .../x86_64-cpuid-Core-i7-7600U.json | 755 +++++++++++ .../x86_64-cpuid-Core-i7-7600U.sig | 4 + .../x86_64-cpuid-Core-i7-7600U.xml | 47 + .../cputestdata/x86_64-cpuid-Core-i7-7700.sig | 4 + .../cputestdata/x86_64-cpuid-Core2-E6850.sig | 4 + .../cputestdata/x86_64-cpuid-Core2-Q9500.sig | 4 + .../x86_64-cpuid-EPYC-7601-32-Core-ibpb.sig | 4 + .../x86_64-cpuid-EPYC-7601-32-Core.sig | 4 + tests/cputestdata/x86_64-cpuid-FX-8150.sig | 4 + .../cputestdata/x86_64-cpuid-Opteron-1352.sig | 4 + .../cputestdata/x86_64-cpuid-Opteron-2350.sig | 4 + .../cputestdata/x86_64-cpuid-Opteron-6234.sig | 4 + .../cputestdata/x86_64-cpuid-Opteron-6282.sig | 4 + .../x86_64-cpuid-Pentium-P6100-guest.xml | 10 +- .../x86_64-cpuid-Pentium-P6100.sig | 4 + tests/cputestdata/x86_64-cpuid-Phenom-B95.sig | 4 + .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core.sig | 4 + tests/cputestdata/x86_64-cpuid-Xeon-5110.sig | 4 + .../x86_64-cpuid-Xeon-E3-1245-v5.sig | 4 + .../x86_64-cpuid-Xeon-E5-2609-v3.sig | 4 + .../x86_64-cpuid-Xeon-E5-2623-v4-guest.xml | 11 +- .../x86_64-cpuid-Xeon-E5-2623-v4-json.xml | 11 +- .../x86_64-cpuid-Xeon-E5-2623-v4.sig | 4 + .../x86_64-cpuid-Xeon-E5-2630-v3.sig | 4 + .../x86_64-cpuid-Xeon-E5-2630-v4-disabled.xml | 7 + .../x86_64-cpuid-Xeon-E5-2630-v4-enabled.xml | 8 + .../x86_64-cpuid-Xeon-E5-2630-v4-guest.xml | 34 + .../x86_64-cpuid-Xeon-E5-2630-v4-host.xml | 35 + .../x86_64-cpuid-Xeon-E5-2630-v4-json.xml | 14 + .../x86_64-cpuid-Xeon-E5-2630-v4.json | 596 +++++++++ .../x86_64-cpuid-Xeon-E5-2630-v4.sig | 4 + .../x86_64-cpuid-Xeon-E5-2630-v4.xml | 43 + .../x86_64-cpuid-Xeon-E5-2650-disabled.xml | 5 + .../x86_64-cpuid-Xeon-E5-2650-enabled.xml | 8 + .../x86_64-cpuid-Xeon-E5-2650-guest.xml | 29 + .../x86_64-cpuid-Xeon-E5-2650-host.xml | 30 + .../x86_64-cpuid-Xeon-E5-2650-json.xml | 14 + .../x86_64-cpuid-Xeon-E5-2650-v3.sig | 4 + .../x86_64-cpuid-Xeon-E5-2650-v4-guest.xml | 11 +- .../x86_64-cpuid-Xeon-E5-2650-v4-json.xml | 11 +- .../x86_64-cpuid-Xeon-E5-2650-v4.sig | 4 + .../x86_64-cpuid-Xeon-E5-2650.json | 931 ++++++++++++++ .../cputestdata/x86_64-cpuid-Xeon-E5-2650.sig | 4 + .../cputestdata/x86_64-cpuid-Xeon-E5-2650.xml | 34 + .../x86_64-cpuid-Xeon-E7-4820-guest.xml | 8 +- .../x86_64-cpuid-Xeon-E7-4820-json.xml | 8 +- .../cputestdata/x86_64-cpuid-Xeon-E7-4820.sig | 4 + .../x86_64-cpuid-Xeon-E7-4830-json.xml | 9 +- .../cputestdata/x86_64-cpuid-Xeon-E7-4830.sig | 4 + .../x86_64-cpuid-Xeon-E7-8890-v3.sig | 4 + .../x86_64-cpuid-Xeon-E7540-disabled.xml | 5 + .../x86_64-cpuid-Xeon-E7540-enabled.xml | 7 + .../x86_64-cpuid-Xeon-E7540-guest.xml | 25 + .../x86_64-cpuid-Xeon-E7540-host.xml | 26 + .../x86_64-cpuid-Xeon-E7540-json.xml | 14 + .../cputestdata/x86_64-cpuid-Xeon-E7540.json | 1117 +++++++++++++++++ tests/cputestdata/x86_64-cpuid-Xeon-E7540.sig | 4 + tests/cputestdata/x86_64-cpuid-Xeon-E7540.xml | 30 + .../x86_64-cpuid-Xeon-Gold-5115.sig | 4 + .../x86_64-cpuid-Xeon-Gold-6148.sig | 4 + tests/cputestdata/x86_64-cpuid-Xeon-W3520.sig | 4 + tests/cputestdata/x86_64-cpuid-Xeon-X5460.sig | 4 + 124 files changed, 4634 insertions(+), 206 deletions(-) create mode 100644 tests/cputestdata/x86_64-cpuid-A10-5800K.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Atom-D510.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Atom-N450.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2500.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2540M.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-4670T.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-650.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-6600.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3520M.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3770.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-4510U.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-4600U.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-5600U-arat.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-5600U.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-7600U-disabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-7600U-enabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-7600U-guest.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-7600U-host.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-7600U-json.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-7600U.json create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-7600U.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-7600U.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-7700.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core2-E6850.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Core2-Q9500.sig create mode 100644 tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.sig create mode 100644 tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core.sig create mode 100644 tests/cputestdata/x86_64-cpuid-FX-8150.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-1352.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-2350.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-6234.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-6282.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Pentium-P6100.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Phenom-B95.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-5110.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-v3.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-v4-disabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-v4-enabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-v4-guest.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-v4-host.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-v4-json.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-v4.json create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-v4.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630-v4.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-disabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-enabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-guest.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-host.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-json.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-v3.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650-v4.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-8890-v3.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7540-disabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7540-enabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7540-guest.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7540-host.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7540-json.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7540.json create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7540.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7540.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-W3520.sig create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-X5460.sig -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list