[PATCH 19/23] cputest: Add query-cpu-definitions reply for Xeon-E7-4830

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This CPU was incorrectly detected as SandyBridge before because the
number of additional <feature> elements was the same for both
SandyBridge and Westmere CPU models, but SandyBridge is newer (the CPU
signature does not help here because it doesn't match any signature
defined in cpu_map.xml). But since QEMU's version of SandyBridge CPU
model contains xsaveopt which needs to be disabled, Westmere becomes the
best CPU model when translating CPUID data to virCPUDef. Unfortunately,
this doesn't help with translating the data we got from QEMU and the CPU
model is still computed as SandyBridge in this case.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 tests/cputest.c                                    |   2 +-
 .../x86_64-cpuid-Xeon-E7-4830-guest.xml            |   8 +-
 .../cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml |   1 +
 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.json   | 422 +++++++++++++++++++++
 4 files changed, 428 insertions(+), 5 deletions(-)

diff --git a/tests/cputest.c b/tests/cputest.c
index f71b4982dd..f1aa227aac 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -1148,7 +1148,7 @@ mymain(void)
     DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E5-2630", JSON_HOST);
     DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E5-2650", JSON_HOST);
     DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E7-4820", JSON_HOST);
-    DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E7-4830", JSON_HOST);
+    DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E7-4830", JSON_MODELS);
     DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E7-8890", JSON_NONE);
     DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-Gold-6148", JSON_HOST);
     DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-W3520", JSON_HOST);
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-guest.xml
index dbf8580a0e..659779687a 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-guest.xml
@@ -1,5 +1,5 @@
 <cpu mode='custom' match='exact'>
-  <model fallback='forbid'>SandyBridge</model>
+  <model fallback='forbid'>Westmere</model>
   <vendor>Intel</vendor>
   <feature policy='require' name='vme'/>
   <feature policy='require' name='ds'/>
@@ -8,6 +8,7 @@
   <feature policy='require' name='ht'/>
   <feature policy='require' name='tm'/>
   <feature policy='require' name='pbe'/>
+  <feature policy='require' name='pclmuldq'/>
   <feature policy='require' name='dtes64'/>
   <feature policy='require' name='monitor'/>
   <feature policy='require' name='ds_cpl'/>
@@ -19,10 +20,9 @@
   <feature policy='require' name='pdcm'/>
   <feature policy='require' name='pcid'/>
   <feature policy='require' name='dca'/>
+  <feature policy='require' name='x2apic'/>
   <feature policy='require' name='arat'/>
   <feature policy='require' name='pdpe1gb'/>
+  <feature policy='require' name='rdtscp'/>
   <feature policy='require' name='invtsc'/>
-  <feature policy='disable' name='tsc-deadline'/>
-  <feature policy='disable' name='xsave'/>
-  <feature policy='disable' name='avx'/>
 </cpu>
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml
index c3f04d00d1..aae32bd7e2 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml
@@ -10,4 +10,5 @@
   <feature policy='require' name='pdpe1gb'/>
   <feature policy='disable' name='xsave'/>
   <feature policy='disable' name='avx'/>
+  <feature policy='disable' name='xsaveopt'/>
 </cpu>
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.json b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.json
index 012e1d0c5c..732f65d1d9 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.json
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.json
@@ -233,3 +233,425 @@
   },
   "id": "model-expansion"
 }
+
+{
+  "return": [
+    {
+      "typename": "max-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": false,
+      "static": false,
+      "name": "max"
+    },
+    {
+      "typename": "host-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": false,
+      "static": false,
+      "name": "host"
+    },
+    {
+      "typename": "base-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": true,
+      "name": "base"
+    },
+    {
+      "typename": "qemu64-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "qemu64"
+    },
+    {
+      "typename": "qemu32-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "qemu32"
+    },
+    {
+      "typename": "phenom-x86_64-cpu",
+      "unavailable-features": [
+        "mmxext",
+        "fxsr-opt",
+        "3dnowext",
+        "3dnow",
+        "abm",
+        "sse4a",
+        "npt"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "phenom"
+    },
+    {
+      "typename": "pentium3-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "pentium3"
+    },
+    {
+      "typename": "pentium2-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "pentium2"
+    },
+    {
+      "typename": "pentium-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "pentium"
+    },
+    {
+      "typename": "n270-x86_64-cpu",
+      "unavailable-features": [
+        "movbe"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "n270"
+    },
+    {
+      "typename": "kvm64-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "kvm64"
+    },
+    {
+      "typename": "kvm32-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "kvm32"
+    },
+    {
+      "typename": "cpu64-rhel6-x86_64-cpu",
+      "unavailable-features": [
+        "abm",
+        "sse4a"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "cpu64-rhel6"
+    },
+    {
+      "typename": "coreduo-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "coreduo"
+    },
+    {
+      "typename": "core2duo-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "core2duo"
+    },
+    {
+      "typename": "athlon-x86_64-cpu",
+      "unavailable-features": [
+        "mmxext",
+        "3dnowext",
+        "3dnow"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "athlon"
+    },
+    {
+      "typename": "Westmere-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "Westmere"
+    },
+    {
+      "typename": "Skylake-Client-x86_64-cpu",
+      "unavailable-features": [
+        "fma",
+        "movbe",
+        "xsave",
+        "avx",
+        "f16c",
+        "rdrand",
+        "fsgsbase",
+        "bmi1",
+        "hle",
+        "avx2",
+        "smep",
+        "bmi2",
+        "erms",
+        "invpcid",
+        "rtm",
+        "mpx",
+        "rdseed",
+        "adx",
+        "smap",
+        "abm",
+        "3dnowprefetch",
+        "xsaveopt",
+        "xsavec",
+        "xgetbv1",
+        "xsave",
+        "xsave",
+        "avx",
+        "mpx",
+        "mpx"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "Skylake-Client"
+    },
+    {
+      "typename": "SandyBridge-x86_64-cpu",
+      "unavailable-features": [
+        "xsave",
+        "avx",
+        "xsaveopt",
+        "xsave",
+        "xsave",
+        "avx"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "SandyBridge"
+    },
+    {
+      "typename": "Penryn-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "Penryn"
+    },
+    {
+      "typename": "Opteron_G5-x86_64-cpu",
+      "unavailable-features": [
+        "fma",
+        "xsave",
+        "avx",
+        "f16c",
+        "abm",
+        "sse4a",
+        "misalignsse",
+        "3dnowprefetch",
+        "xop",
+        "fma4",
+        "tbm",
+        "xsave",
+        "xsave",
+        "avx"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "Opteron_G5"
+    },
+    {
+      "typename": "Opteron_G4-x86_64-cpu",
+      "unavailable-features": [
+        "xsave",
+        "avx",
+        "abm",
+        "sse4a",
+        "misalignsse",
+        "3dnowprefetch",
+        "xop",
+        "fma4",
+        "xsave",
+        "xsave",
+        "avx"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "Opteron_G4"
+    },
+    {
+      "typename": "Opteron_G3-x86_64-cpu",
+      "unavailable-features": [
+        "abm",
+        "sse4a",
+        "misalignsse"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "Opteron_G3"
+    },
+    {
+      "typename": "Opteron_G2-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "Opteron_G2"
+    },
+    {
+      "typename": "Opteron_G1-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "Opteron_G1"
+    },
+    {
+      "typename": "Nehalem-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "Nehalem"
+    },
+    {
+      "typename": "IvyBridge-x86_64-cpu",
+      "unavailable-features": [
+        "xsave",
+        "avx",
+        "f16c",
+        "rdrand",
+        "fsgsbase",
+        "smep",
+        "erms",
+        "xsaveopt",
+        "xsave",
+        "xsave",
+        "avx"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "IvyBridge"
+    },
+    {
+      "typename": "Haswell-x86_64-cpu",
+      "unavailable-features": [
+        "fma",
+        "movbe",
+        "xsave",
+        "avx",
+        "f16c",
+        "rdrand",
+        "fsgsbase",
+        "bmi1",
+        "hle",
+        "avx2",
+        "smep",
+        "bmi2",
+        "erms",
+        "invpcid",
+        "rtm",
+        "abm",
+        "xsaveopt",
+        "xsave",
+        "xsave",
+        "avx"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "Haswell"
+    },
+    {
+      "typename": "Haswell-noTSX-x86_64-cpu",
+      "unavailable-features": [
+        "fma",
+        "movbe",
+        "xsave",
+        "avx",
+        "f16c",
+        "rdrand",
+        "fsgsbase",
+        "bmi1",
+        "avx2",
+        "smep",
+        "bmi2",
+        "erms",
+        "invpcid",
+        "abm",
+        "xsaveopt",
+        "xsave",
+        "xsave",
+        "avx"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "Haswell-noTSX"
+    },
+    {
+      "typename": "Conroe-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "Conroe"
+    },
+    {
+      "typename": "Broadwell-x86_64-cpu",
+      "unavailable-features": [
+        "fma",
+        "movbe",
+        "xsave",
+        "avx",
+        "f16c",
+        "rdrand",
+        "fsgsbase",
+        "bmi1",
+        "hle",
+        "avx2",
+        "smep",
+        "bmi2",
+        "erms",
+        "invpcid",
+        "rtm",
+        "rdseed",
+        "adx",
+        "smap",
+        "abm",
+        "3dnowprefetch",
+        "xsaveopt",
+        "xsave",
+        "xsave",
+        "avx"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "Broadwell"
+    },
+    {
+      "typename": "Broadwell-noTSX-x86_64-cpu",
+      "unavailable-features": [
+        "fma",
+        "movbe",
+        "xsave",
+        "avx",
+        "f16c",
+        "rdrand",
+        "fsgsbase",
+        "bmi1",
+        "avx2",
+        "smep",
+        "bmi2",
+        "erms",
+        "invpcid",
+        "rdseed",
+        "adx",
+        "smap",
+        "abm",
+        "3dnowprefetch",
+        "xsaveopt",
+        "xsave",
+        "xsave",
+        "avx"
+      ],
+      "migration-safe": true,
+      "static": false,
+      "name": "Broadwell-noTSX"
+    },
+    {
+      "typename": "486-x86_64-cpu",
+      "unavailable-features": [],
+      "migration-safe": true,
+      "static": false,
+      "name": "486"
+    }
+  ],
+  "id": "definitions"
+}
-- 
2.14.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux