[PATCH 31/41] tests: Add CPU detection test for AMD Opteron 6234

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

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 tests/cputest.c                                    |  1 +
 tests/cputestdata/x86-cpuid-Opteron-6234-guest.xml | 24 ++++++
 tests/cputestdata/x86-cpuid-Opteron-6234-host.xml  | 24 ++++++
 tests/cputestdata/x86-cpuid-Opteron-6234-json.xml  | 16 ++++
 tests/cputestdata/x86-cpuid-Opteron-6234.json      | 88 ++++++++++++++++++++++
 tests/cputestdata/x86-cpuid-Opteron-6234.xml       | 51 +++++++++++++
 6 files changed, 204 insertions(+)
 create mode 100644 tests/cputestdata/x86-cpuid-Opteron-6234-guest.xml
 create mode 100644 tests/cputestdata/x86-cpuid-Opteron-6234-host.xml
 create mode 100644 tests/cputestdata/x86-cpuid-Opteron-6234-json.xml
 create mode 100644 tests/cputestdata/x86-cpuid-Opteron-6234.json
 create mode 100644 tests/cputestdata/x86-cpuid-Opteron-6234.xml

diff --git a/tests/cputest.c b/tests/cputest.c
index d283c62..4642a91 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -859,6 +859,7 @@ mymain(void)
     DO_TEST_CPUID("x86", "FX-8150", false);
     DO_TEST_CPUID("x86", "Opteron-1352", false);
     DO_TEST_CPUID("x86", "Opteron-2350", true);
+    DO_TEST_CPUID("x86", "Opteron-6234", true);
 
 #if WITH_QEMU && WITH_YAJL
     qemuTestDriverFree(&driver);
diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234-guest.xml b/tests/cputestdata/x86-cpuid-Opteron-6234-guest.xml
new file mode 100644
index 0000000..9858ee4
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Opteron-6234-guest.xml
@@ -0,0 +1,24 @@
+<cpu mode='custom' match='exact'>
+  <arch>x86_64</arch>
+  <model fallback='forbid'>Opteron_G4</model>
+  <vendor>AMD</vendor>
+  <feature policy='require' name='vme'/>
+  <feature policy='require' name='ht'/>
+  <feature policy='require' name='monitor'/>
+  <feature policy='require' name='osxsave'/>
+  <feature policy='require' name='mmxext'/>
+  <feature policy='require' name='fxsr_opt'/>
+  <feature policy='require' name='cmp_legacy'/>
+  <feature policy='require' name='extapic'/>
+  <feature policy='require' name='cr8legacy'/>
+  <feature policy='require' name='osvw'/>
+  <feature policy='require' name='ibs'/>
+  <feature policy='require' name='skinit'/>
+  <feature policy='require' name='wdt'/>
+  <feature policy='require' name='lwp'/>
+  <feature policy='require' name='nodeid_msr'/>
+  <feature policy='require' name='topoext'/>
+  <feature policy='require' name='perfctr_core'/>
+  <feature policy='require' name='perfctr_nb'/>
+  <feature policy='require' name='invtsc'/>
+</cpu>
diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234-host.xml b/tests/cputestdata/x86-cpuid-Opteron-6234-host.xml
new file mode 100644
index 0000000..ec670c6
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Opteron-6234-host.xml
@@ -0,0 +1,24 @@
+<cpu>
+  <arch>x86_64</arch>
+  <model>Opteron_G4</model>
+  <vendor>AMD</vendor>
+  <feature name='vme'/>
+  <feature name='ht'/>
+  <feature name='monitor'/>
+  <feature name='osxsave'/>
+  <feature name='mmxext'/>
+  <feature name='fxsr_opt'/>
+  <feature name='cmp_legacy'/>
+  <feature name='extapic'/>
+  <feature name='cr8legacy'/>
+  <feature name='osvw'/>
+  <feature name='ibs'/>
+  <feature name='skinit'/>
+  <feature name='wdt'/>
+  <feature name='lwp'/>
+  <feature name='nodeid_msr'/>
+  <feature name='topoext'/>
+  <feature name='perfctr_core'/>
+  <feature name='perfctr_nb'/>
+  <feature name='invtsc'/>
+</cpu>
diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234-json.xml b/tests/cputestdata/x86-cpuid-Opteron-6234-json.xml
new file mode 100644
index 0000000..2bb59a3
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Opteron-6234-json.xml
@@ -0,0 +1,16 @@
+<cpu mode='custom' match='exact'>
+  <arch>x86_64</arch>
+  <model fallback='forbid'>Opteron_G4</model>
+  <feature policy='require' name='vme'/>
+  <feature policy='require' name='x2apic'/>
+  <feature policy='require' name='tsc-deadline'/>
+  <feature policy='require' name='hypervisor'/>
+  <feature policy='require' name='mmxext'/>
+  <feature policy='require' name='fxsr_opt'/>
+  <feature policy='require' name='cmp_legacy'/>
+  <feature policy='require' name='cr8legacy'/>
+  <feature policy='require' name='osvw'/>
+  <feature policy='require' name='tsc_adjust'/>
+  <feature policy='disable' name='rdtscp'/>
+  <feature policy='disable' name='svm'/>
+</cpu>
diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234.json b/tests/cputestdata/x86-cpuid-Opteron-6234.json
new file mode 100644
index 0000000..0df3860
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Opteron-6234.json
@@ -0,0 +1,88 @@
+{
+  "return": [
+    {
+      "cpuid-register": "EAX",
+      "cpuid-input-eax": 6,
+      "features": 4
+    },
+    {
+      "cpuid-register": "EAX",
+      "cpuid-input-ecx": 1,
+      "cpuid-input-eax": 13,
+      "features": 0
+    },
+    {
+      "cpuid-register": "EDX",
+      "cpuid-input-eax": 2147483658,
+      "features": 9
+    },
+    {
+      "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": 68595
+    },
+    {
+      "cpuid-register": "EDX",
+      "cpuid-input-eax": 2147483649,
+      "features": 668204031
+    },
+    {
+      "cpuid-register": "ECX",
+      "cpuid-input-ecx": 0,
+      "cpuid-input-eax": 7,
+      "features": 0
+    },
+    {
+      "cpuid-register": "EBX",
+      "cpuid-input-ecx": 0,
+      "cpuid-input-eax": 7,
+      "features": 2
+    },
+    {
+      "cpuid-register": "ECX",
+      "cpuid-input-eax": 1,
+      "features": 2545426947
+    },
+    {
+      "cpuid-register": "EDX",
+      "cpuid-input-eax": 1,
+      "features": 126614527
+    }
+  ],
+  "id": "feature-words"
+}
+
+{
+  "return": 21,
+  "id": "family"
+}
+
+{
+  "return": 1,
+  "id": "model"
+}
+
+{
+  "return": 2,
+  "id": "stepping"
+}
+
+{
+  "return": "AMD Opteron(TM) Processor 6234                 ",
+  "id": "model-id"
+}
diff --git a/tests/cputestdata/x86-cpuid-Opteron-6234.xml b/tests/cputestdata/x86-cpuid-Opteron-6234.xml
new file mode 100644
index 0000000..9a89fd7
--- /dev/null
+++ b/tests/cputestdata/x86-cpuid-Opteron-6234.xml
@@ -0,0 +1,51 @@
+<!-- AMD Opteron(TM) Processor 6234 -->
+<cpudata arch='x86'>
+  <cpuid eax_in='0x00000000' ecx_in='0x00' eax='0x0000000d' ebx='0x68747541' ecx='0x444d4163' edx='0x69746e65'/>
+  <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00600f12' ebx='0x230c0800' ecx='0x1e98220b' edx='0x178bfbff'/>
+  <cpuid eax_in='0x00000002' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x00000003' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x00000005' ecx_in='0x00' eax='0x00000040' ebx='0x00000040' ecx='0x00000003' edx='0x00000000'/>
+  <cpuid eax_in='0x00000006' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000001' edx='0x00000000'/>
+  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' 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='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <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='0x000003c0' edx='0x40000000'/>
+  <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' 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='0x00000080' ebx='0x00000340' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000000' ecx_in='0x00' eax='0x8000001e' ebx='0x68747541' ecx='0x444d4163' edx='0x69746e65'/>
+  <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00600f12' ebx='0x30000000' ecx='0x01c9bfff' edx='0x2fd3fbff'/>
+  <cpuid eax_in='0x80000002' ecx_in='0x00' eax='0x20444d41' ebx='0x6574704f' ecx='0x286e6f72' edx='0x20294d54'/>
+  <cpuid eax_in='0x80000003' ecx_in='0x00' eax='0x636f7250' ebx='0x6f737365' ecx='0x32362072' edx='0x20203433'/>
+  <cpuid eax_in='0x80000004' ecx_in='0x00' eax='0x20202020' ebx='0x20202020' ecx='0x20202020' edx='0x00202020'/>
+  <cpuid eax_in='0x80000005' ecx_in='0x00' eax='0xff20ff18' ebx='0xff20ff30' ecx='0x10040140' edx='0x40020140'/>
+  <cpuid eax_in='0x80000006' ecx_in='0x00' eax='0x64000000' ebx='0x64004200' ecx='0x08008140' edx='0x0060e140'/>
+  <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x000003d9'/>
+  <cpuid eax_in='0x80000008' ecx_in='0x00' eax='0x00003030' ebx='0x00000000' ecx='0x0000500b' edx='0x00000000'/>
+  <cpuid eax_in='0x80000009' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x8000000a' ecx_in='0x00' eax='0x00000001' ebx='0x00010000' ecx='0x00000000' edx='0x000014ff'/>
+  <cpuid eax_in='0x8000000b' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x8000000c' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x8000000d' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x8000000e' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x8000000f' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000010' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000011' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000012' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000013' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000014' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000015' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000016' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000017' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000018' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x80000019' ecx_in='0x00' eax='0xf020f018' ebx='0x64000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x8000001a' ecx_in='0x00' eax='0x00000003' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x8000001b' ecx_in='0x00' eax='0x000000ff' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0x8000001c' ecx_in='0x00' eax='0x00000000' ebx='0x80032013' ecx='0x00010200' edx='0x8000000f'/>
+  <cpuid eax_in='0x8000001d' ecx_in='0x00' eax='0x00000121' ebx='0x00c0003f' ecx='0x0000003f' edx='0x00000000'/>
+  <cpuid eax_in='0x8000001e' ecx_in='0x00' eax='0x00000043' ebx='0x00000101' ecx='0x00000102' edx='0x00000000'/>
+  <cpuid eax_in='0x80860000' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
+  <cpuid eax_in='0xc0000000' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' 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]