[PATCH 22/41] tests: Add CPU detection test for Intel Core i7-3740QM

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

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 tests/cputest.c                                    |  1 +
 .../cputestdata/x86-cpuid-Core-i7-3740QM-guest.xml | 23 +++++++
 .../cputestdata/x86-cpuid-Core-i7-3740QM-host.xml  | 23 +++++++
 .../cputestdata/x86-cpuid-Core-i7-3740QM-json.xml  |  9 +++
 tests/cputestdata/x86-cpuid-Core-i7-3740QM.json    | 77 ++++++++++++++++++++++
 tests/cputestdata/x86-cpuid-Core-i7-3740QM.xml     | 34 ++++++++++
 6 files changed, 167 insertions(+)
 create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3740QM-guest.xml
 create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3740QM-host.xml
 create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3740QM-json.xml
 create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3740QM.json
 create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3740QM.xml

diff --git a/tests/cputest.c b/tests/cputest.c
index 050c3de..f9772cd 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -850,6 +850,7 @@ mymain(void)
     DO_TEST_CPUID("x86", "Core-i5-6600", true);
     DO_TEST_CPUID("x86", "Core-i7-2600", true);
     DO_TEST_CPUID("x86", "Core-i7-3520M", false);
+    DO_TEST_CPUID("x86", "Core-i7-3740QM", true);
 
 #if WITH_QEMU && WITH_YAJL
     qemuTestDriverFree(&driver);
diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM-guest.xml b/tests/cputestdata/x86-cpuid-Core-i7-3740QM-guest.xml
new file mode 100644
index 0000000..f5125d4
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Core-i7-3740QM-guest.xml
@@ -0,0 +1,23 @@
+<cpu mode='custom' match='exact'>
+  <arch>x86_64</arch>
+  <model fallback='forbid'>IvyBridge</model>
+  <vendor>Intel</vendor>
+  <feature policy='require' name='ds'/>
+  <feature policy='require' name='acpi'/>
+  <feature policy='require' name='ss'/>
+  <feature policy='require' name='ht'/>
+  <feature policy='require' name='tm'/>
+  <feature policy='require' name='pbe'/>
+  <feature policy='require' name='dtes64'/>
+  <feature policy='require' name='monitor'/>
+  <feature policy='require' name='ds_cpl'/>
+  <feature policy='require' name='vmx'/>
+  <feature policy='require' name='smx'/>
+  <feature policy='require' name='est'/>
+  <feature policy='require' name='tm2'/>
+  <feature policy='require' name='xtpr'/>
+  <feature policy='require' name='pdcm'/>
+  <feature policy='require' name='pcid'/>
+  <feature policy='require' name='osxsave'/>
+  <feature policy='require' name='invtsc'/>
+</cpu>
diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM-host.xml b/tests/cputestdata/x86-cpuid-Core-i7-3740QM-host.xml
new file mode 100644
index 0000000..80d3a9d
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Core-i7-3740QM-host.xml
@@ -0,0 +1,23 @@
+<cpu>
+  <arch>x86_64</arch>
+  <model>IvyBridge</model>
+  <vendor>Intel</vendor>
+  <feature name='ds'/>
+  <feature name='acpi'/>
+  <feature name='ss'/>
+  <feature name='ht'/>
+  <feature name='tm'/>
+  <feature name='pbe'/>
+  <feature name='dtes64'/>
+  <feature name='monitor'/>
+  <feature name='ds_cpl'/>
+  <feature name='vmx'/>
+  <feature name='smx'/>
+  <feature name='est'/>
+  <feature name='tm2'/>
+  <feature name='xtpr'/>
+  <feature name='pdcm'/>
+  <feature name='pcid'/>
+  <feature name='osxsave'/>
+  <feature name='invtsc'/>
+</cpu>
diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM-json.xml b/tests/cputestdata/x86-cpuid-Core-i7-3740QM-json.xml
new file mode 100644
index 0000000..64e1fc9
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Core-i7-3740QM-json.xml
@@ -0,0 +1,9 @@
+<cpu mode='custom' match='exact'>
+  <arch>x86_64</arch>
+  <model fallback='forbid'>IvyBridge</model>
+  <feature policy='require' name='ss'/>
+  <feature policy='require' name='vmx'/>
+  <feature policy='require' name='pcid'/>
+  <feature policy='require' name='hypervisor'/>
+  <feature policy='require' name='tsc_adjust'/>
+</cpu>
diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM.json b/tests/cputestdata/x86-cpuid-Core-i7-3740QM.json
new file mode 100644
index 0000000..2b1349f
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Core-i7-3740QM.json
@@ -0,0 +1,77 @@
+{
+  "return": [
+    {
+      "cpuid-register": "EAX",
+      "cpuid-input-ecx": 1,
+      "cpuid-input-eax": 13,
+      "features": 1
+    },
+    {
+      "cpuid-register": "EDX",
+      "cpuid-input-eax": 2147483658,
+      "features": 0
+    },
+    {
+      "cpuid-register": "EAX",
+      "cpuid-input-eax": 1073741825,
+      "features": 16777467
+    },
+    {
+      "cpuid-register": "EDX",
+      "cpuid-input-eax": 3221225473,
+      "features": 0
+    },
+    {
+      "cpuid-register": "EDX",
+      "cpuid-input-eax": 2147483655,
+      "features": 0
+    },
+    {
+      "cpuid-register": "ECX",
+      "cpuid-input-eax": 2147483649,
+      "features": 1
+    },
+    {
+      "cpuid-register": "EDX",
+      "cpuid-input-eax": 2147483649,
+      "features": 672139264
+    },
+    {
+      "cpuid-register": "EBX",
+      "cpuid-input-ecx": 0,
+      "cpuid-input-eax": 7,
+      "features": 643
+    },
+    {
+      "cpuid-register": "ECX",
+      "cpuid-input-eax": 1,
+      "features": 4156170787
+    },
+    {
+      "cpuid-register": "EDX",
+      "cpuid-input-eax": 1,
+      "features": 260832255
+    }
+  ],
+  "id": "feature-words"
+}
+
+{
+  "return": 6,
+  "id": "family"
+}
+
+{
+  "return": 58,
+  "id": "model"
+}
+
+{
+  "return": 9,
+  "id": "stepping"
+}
+
+{
+  "return": "      Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz",
+  "id": "model-id"
+}
diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3740QM.xml b/tests/cputestdata/x86-cpuid-Core-i7-3740QM.xml
new file mode 100644
index 0000000..3c40d11
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Core-i7-3740QM.xml
@@ -0,0 +1,34 @@
+<!-- Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz -->
+<cpudata arch='x86'>
+  <cpuid eax_in='0x00000000' ecx_in='0x00' eax='0x0000000d' ebx='0x756e6547' ecx='0x6c65746e' edx='0x49656e69'/>
+  <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x000306a9' ebx='0x03100800' ecx='0x7fbae3ff' edx='0xbfebfbff'/>
+  <cpuid eax_in='0x00000002' ecx_in='0x00' eax='0x76035a01' ebx='0x00f0b2ff' ecx='0x00000000' edx='0x00ca0000'/>
+  <cpuid eax_in='0x00000003' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x00000004' ecx_in='0x00' eax='0x1c004121' ebx='0x01c0003f' ecx='0x0000003f' edx='0x00000000'/>
+  <cpuid eax_in='0x00000004' ecx_in='0x01' eax='0x1c004122' ebx='0x01c0003f' ecx='0x0000003f' edx='0x00000000'/>
+  <cpuid eax_in='0x00000004' ecx_in='0x02' eax='0x1c004143' ebx='0x01c0003f' ecx='0x000001ff' edx='0x00000000'/>
+  <cpuid eax_in='0x00000004' ecx_in='0x03' eax='0x1c03c163' ebx='0x02c0003f' ecx='0x00001fff' edx='0x00000006'/>
+  <cpuid eax_in='0x00000005' ecx_in='0x00' eax='0x00000040' ebx='0x00000040' ecx='0x00000003' edx='0x00021120'/>
+  <cpuid eax_in='0x00000006' ecx_in='0x00' eax='0x00000077' ebx='0x00000002' ecx='0x00000009' edx='0x00000000'/>
+  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000281' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x00000008' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x00000009' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x0000000a' ecx_in='0x00' eax='0x07300403' ebx='0x00000000' ecx='0x00000000' edx='0x00000603'/>
+  <cpuid eax_in='0x0000000b' ecx_in='0x00' eax='0x00000001' ebx='0x00000002' ecx='0x00000100' edx='0x00000003'/>
+  <cpuid eax_in='0x0000000b' ecx_in='0x01' eax='0x00000004' ebx='0x00000008' ecx='0x00000201' edx='0x00000003'/>
+  <cpuid eax_in='0x0000000c' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x0000000d' ecx_in='0x00' eax='0x00000007' ebx='0x00000340' ecx='0x00000340' edx='0x00000000'/>
+  <cpuid eax_in='0x0000000d' ecx_in='0x02' eax='0x00000100' ebx='0x00000240' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x0000000d' ecx_in='0x3e' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000000' ecx_in='0x00' eax='0x80000008' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000001' edx='0x28100800'/>
+  <cpuid eax_in='0x80000002' ecx_in='0x00' eax='0x20202020' ebx='0x6e492020' ecx='0x286c6574' edx='0x43202952'/>
+  <cpuid eax_in='0x80000003' ecx_in='0x00' eax='0x2865726f' ebx='0x20294d54' ecx='0x332d3769' edx='0x51303437'/>
+  <cpuid eax_in='0x80000004' ecx_in='0x00' eax='0x5043204d' ebx='0x20402055' ecx='0x30372e32' edx='0x007a4847'/>
+  <cpuid eax_in='0x80000005' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000006' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x01006040' edx='0x00000000'/>
+  <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
+  <cpuid eax_in='0x80000008' ecx_in='0x00' eax='0x00003024' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80860000' ecx_in='0x00' eax='0x00000007' ebx='0x00000340' ecx='0x00000340' edx='0x00000000'/>
+  <cpuid eax_in='0xc0000000' ecx_in='0x00' eax='0x00000007' ebx='0x00000340' ecx='0x00000340' edx='0x00000000'/>
+</cpudata>
-- 
2.8.3

--
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]