On Thu, Jun 09, 2016 at 11:56:17 +0200, Jiri Denemark wrote:
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(a)redhat.com>
---
src/cpu/cpu_map.xml | 16 +++
src/cpu/cpu_x86.c | 148 +++++++++++++++++++--
.../cputestdata/x86-cpuid-Core-i7-5600U-guest.xml | 11 +-
tests/cputestdata/x86-cpuid-Core2-E6850-guest.xml | 5 +-
tests/cputestdata/x86-cpuid-Core2-E6850-host.xml | 5 +-
tests/cputestdata/x86-cpuid-Xeon-5110-guest.xml | 5 +-
tests/cputestdata/x86-cpuid-Xeon-5110-host.xml | 5 +-
tests/cputestdata/x86-host+penryn-force-result.xml | 4 +-
8 files changed, 176 insertions(+), 23 deletions(-)
ACK