bcddb9
From c34ca3d596e641381b3397958be5f584f6318777 Mon Sep 17 00:00:00 2001
bcddb9
Message-Id: <c34ca3d596e641381b3397958be5f584f6318777@dist-git>
bcddb9
From: Jiri Denemark <jdenemar@redhat.com>
bcddb9
Date: Mon, 25 Feb 2019 16:44:11 +0100
bcddb9
Subject: [PATCH] cpu_map: Add more signatures for Westmere CPU model
bcddb9
MIME-Version: 1.0
bcddb9
Content-Type: text/plain; charset=UTF-8
bcddb9
Content-Transfer-Encoding: 8bit
bcddb9
bcddb9
This fixes several CPUs which were incorrectly detected as a different
bcddb9
CPU model.
bcddb9
bcddb9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
bcddb9
Reviewed-by: Ján Tomko <jtomko@redhat.com>
bcddb9
(cherry picked from commit e89f87721406f6ad6e811ff613a22dc804d69355)
bcddb9
bcddb9
https://bugzilla.redhat.com/show_bug.cgi?id=1558558
bcddb9
https://bugzilla.redhat.com/show_bug.cgi?id=1687515
bcddb9
bcddb9
Conflicts:
bcddb9
	src/cpu_map/x86_Westmere.xml
bcddb9
            - cpu_map split not backported
bcddb9
bcddb9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
bcddb9
Reviewed-by: Ján Tomko <jtomko@redhat.com>
bcddb9
---
bcddb9
 src/cpu/cpu_map.xml                                    |  2 ++
bcddb9
 tests/cputestdata/x86_64-cpuid-Core-i5-650-json.xml    |  9 +++++----
bcddb9
 tests/cputestdata/x86_64-cpuid-Pentium-P6100-guest.xml | 10 ++++++----
bcddb9
 tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-guest.xml  |  8 ++++----
bcddb9
 tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml   |  8 +++++---
bcddb9
 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml   |  9 +++++----
bcddb9
 6 files changed, 27 insertions(+), 19 deletions(-)
bcddb9
bcddb9
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
bcddb9
index 8733834071..1435a34bb9 100644
bcddb9
--- a/src/cpu/cpu_map.xml
bcddb9
+++ b/src/cpu/cpu_map.xml
bcddb9
@@ -937,6 +937,8 @@
bcddb9
 
bcddb9
     <model name='Westmere'>
bcddb9
       <signature family='6' model='44'/> 
bcddb9
+      <signature family='6' model='47'/> 
bcddb9
+      <signature family='6' model='37'/> 
bcddb9
       <vendor name='Intel'/>
bcddb9
       <feature name='aes'/>
bcddb9
       <feature name='apic'/>
bcddb9
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i5-650-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i5-650-json.xml
bcddb9
index f5980f53e5..cb21e48a9f 100644
bcddb9
--- a/tests/cputestdata/x86_64-cpuid-Core-i5-650-json.xml
bcddb9
+++ b/tests/cputestdata/x86_64-cpuid-Core-i5-650-json.xml
bcddb9
@@ -1,12 +1,13 @@
bcddb9
 <cpu mode='custom' match='exact'>
bcddb9
-  <model fallback='forbid'>SandyBridge</model>
bcddb9
+  <model fallback='forbid'>Westmere</model>
bcddb9
   <vendor>Intel</vendor>
bcddb9
   <feature policy='require' name='vme'/>
bcddb9
   <feature policy='require' name='ss'/>
bcddb9
+  <feature policy='require' name='pclmuldq'/>
bcddb9
+  <feature policy='require' name='x2apic'/>
bcddb9
+  <feature policy='require' name='tsc-deadline'/>
bcddb9
   <feature policy='require' name='hypervisor'/>
bcddb9
   <feature policy='require' name='arat'/>
bcddb9
   <feature policy='require' name='tsc_adjust'/>
bcddb9
-  <feature policy='disable' name='xsave'/>
bcddb9
-  <feature policy='disable' name='avx'/>
bcddb9
-  <feature policy='disable' name='xsaveopt'/>
bcddb9
+  <feature policy='require' name='rdtscp'/>
bcddb9
 </cpu>
bcddb9
diff --git a/tests/cputestdata/x86_64-cpuid-Pentium-P6100-guest.xml b/tests/cputestdata/x86_64-cpuid-Pentium-P6100-guest.xml
bcddb9
index db5e0ae6af..20e2fa363a 100644
bcddb9
--- a/tests/cputestdata/x86_64-cpuid-Pentium-P6100-guest.xml
bcddb9
+++ b/tests/cputestdata/x86_64-cpuid-Pentium-P6100-guest.xml
bcddb9
@@ -1,6 +1,7 @@
bcddb9
 <cpu mode='custom' match='exact'>
bcddb9
-  <model fallback='forbid'>core2duo</model>
bcddb9
+  <model fallback='forbid'>Westmere</model>
bcddb9
   <vendor>Intel</vendor>
bcddb9
+  <feature policy='require' name='vme'/>
bcddb9
   <feature policy='require' name='ds'/>
bcddb9
   <feature policy='require' name='acpi'/>
bcddb9
   <feature policy='require' name='ss'/>
bcddb9
@@ -8,16 +9,17 @@
bcddb9
   <feature policy='require' name='tm'/>
bcddb9
   <feature policy='require' name='pbe'/>
bcddb9
   <feature policy='require' name='dtes64'/>
bcddb9
+  <feature policy='require' name='monitor'/>
bcddb9
   <feature policy='require' name='ds_cpl'/>
bcddb9
   <feature policy='require' name='est'/>
bcddb9
   <feature policy='require' name='tm2'/>
bcddb9
-  <feature policy='require' name='cx16'/>
bcddb9
   <feature policy='require' name='xtpr'/>
bcddb9
   <feature policy='require' name='pdcm'/>
bcddb9
   <feature policy='require' name='pcid'/>
bcddb9
-  <feature policy='require' name='popcnt'/>
bcddb9
   <feature policy='require' name='arat'/>
bcddb9
   <feature policy='require' name='rdtscp'/>
bcddb9
-  <feature policy='require' name='lahf_lm'/>
bcddb9
   <feature policy='require' name='invtsc'/>
bcddb9
+  <feature policy='disable' name='sse4.1'/>
bcddb9
+  <feature policy='disable' name='sse4.2'/>
bcddb9
+  <feature policy='disable' name='aes'/>
bcddb9
 </cpu>
bcddb9
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-guest.xml
bcddb9
index dbf8580a0e..659779687a 100644
bcddb9
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-guest.xml
bcddb9
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-guest.xml
bcddb9
@@ -1,5 +1,5 @@
bcddb9
 <cpu mode='custom' match='exact'>
bcddb9
-  <model fallback='forbid'>SandyBridge</model>
bcddb9
+  <model fallback='forbid'>Westmere</model>
bcddb9
   <vendor>Intel</vendor>
bcddb9
   <feature policy='require' name='vme'/>
bcddb9
   <feature policy='require' name='ds'/>
bcddb9
@@ -8,6 +8,7 @@
bcddb9
   <feature policy='require' name='ht'/>
bcddb9
   <feature policy='require' name='tm'/>
bcddb9
   <feature policy='require' name='pbe'/>
bcddb9
+  <feature policy='require' name='pclmuldq'/>
bcddb9
   <feature policy='require' name='dtes64'/>
bcddb9
   <feature policy='require' name='monitor'/>
bcddb9
   <feature policy='require' name='ds_cpl'/>
bcddb9
@@ -19,10 +20,9 @@
bcddb9
   <feature policy='require' name='pdcm'/>
bcddb9
   <feature policy='require' name='pcid'/>
bcddb9
   <feature policy='require' name='dca'/>
bcddb9
+  <feature policy='require' name='x2apic'/>
bcddb9
   <feature policy='require' name='arat'/>
bcddb9
   <feature policy='require' name='pdpe1gb'/>
bcddb9
+  <feature policy='require' name='rdtscp'/>
bcddb9
   <feature policy='require' name='invtsc'/>
bcddb9
-  <feature policy='disable' name='tsc-deadline'/>
bcddb9
-  <feature policy='disable' name='xsave'/>
bcddb9
-  <feature policy='disable' name='avx'/>
bcddb9
 </cpu>
bcddb9
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml
bcddb9
index d94a330f37..e8b74c5c30 100644
bcddb9
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml
bcddb9
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4820-json.xml
bcddb9
@@ -1,12 +1,14 @@
bcddb9
 <cpu mode='custom' match='exact'>
bcddb9
-  <model fallback='forbid'>SandyBridge</model>
bcddb9
+  <model fallback='forbid'>Westmere</model>
bcddb9
   <vendor>Intel</vendor>
bcddb9
   <feature policy='require' name='vme'/>
bcddb9
   <feature policy='require' name='ss'/>
bcddb9
+  <feature policy='require' name='pclmuldq'/>
bcddb9
   <feature policy='require' name='pcid'/>
bcddb9
+  <feature policy='require' name='x2apic'/>
bcddb9
+  <feature policy='require' name='tsc-deadline'/>
bcddb9
   <feature policy='require' name='hypervisor'/>
bcddb9
   <feature policy='require' name='tsc_adjust'/>
bcddb9
   <feature policy='require' name='pdpe1gb'/>
bcddb9
-  <feature policy='disable' name='xsave'/>
bcddb9
-  <feature policy='disable' name='avx'/>
bcddb9
+  <feature policy='require' name='rdtscp'/>
bcddb9
 </cpu>
bcddb9
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml
bcddb9
index aae32bd7e2..da949ad25e 100644
bcddb9
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml
bcddb9
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml
bcddb9
@@ -1,14 +1,15 @@
bcddb9
 <cpu mode='custom' match='exact'>
bcddb9
-  <model fallback='forbid'>SandyBridge</model>
bcddb9
+  <model fallback='forbid'>Westmere</model>
bcddb9
   <vendor>Intel</vendor>
bcddb9
   <feature policy='require' name='vme'/>
bcddb9
   <feature policy='require' name='ss'/>
bcddb9
+  <feature policy='require' name='pclmuldq'/>
bcddb9
   <feature policy='require' name='pcid'/>
bcddb9
+  <feature policy='require' name='x2apic'/>
bcddb9
+  <feature policy='require' name='tsc-deadline'/>
bcddb9
   <feature policy='require' name='hypervisor'/>
bcddb9
   <feature policy='require' name='arat'/>
bcddb9
   <feature policy='require' name='tsc_adjust'/>
bcddb9
   <feature policy='require' name='pdpe1gb'/>
bcddb9
-  <feature policy='disable' name='xsave'/>
bcddb9
-  <feature policy='disable' name='avx'/>
bcddb9
-  <feature policy='disable' name='xsaveopt'/>
bcddb9
+  <feature policy='require' name='rdtscp'/>
bcddb9
 </cpu>
bcddb9
-- 
bcddb9
2.21.0
bcddb9