]> xenbits.xensource.com Git - libvirt.git/commit
cpu_x86: Use signature in CPU detection code
authorJiri Denemark <jdenemar@redhat.com>
Thu, 25 Jun 2015 13:06:19 +0000 (15:06 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 17 Jun 2016 09:46:31 +0000 (11:46 +0200)
commit5a9221b9af27d976707128eee06ad56faeb20ba9
tree4f43bdb940f3fe286de35c21650565f29f503e1d
parent2f3ccdf01b3bb122bce4ba847263ccbf6cf7cbf3
cpu_x86: Use signature in CPU detection code

Our current detection code uses just the number of CPU features which
need to be added/removed from the CPU model to fully describe the CPUID
data. The smallest number wins. But this may sometimes generate wrong
results as one can see from the fixed test cases. This patch modifies
the algorithm to prefer the CPU model with matching signature even if
this model results in a longer list of additional features.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/cpu/cpu_map.xml
src/cpu/cpu_x86.c
tests/cputestdata/x86-cpuid-Core-i7-5600U-guest.xml
tests/cputestdata/x86-cpuid-Core2-E6850-guest.xml
tests/cputestdata/x86-cpuid-Core2-E6850-host.xml
tests/cputestdata/x86-cpuid-Xeon-5110-guest.xml
tests/cputestdata/x86-cpuid-Xeon-5110-host.xml
tests/cputestdata/x86-host+penryn-force-result.xml