diff --git a/tests/cputest.c b/tests/cputest.c
index 09f690abca..5992dd0cec 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -571,6 +571,13 @@ mymain(void)
DO_TEST_COMPARE("x86", "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL);
DO_TEST_COMPARE("x86", "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE);
+ DO_TEST_COMPARE("ppc64", "host", "host", VIR_CPU_COMPARE_IDENTICAL);
+ DO_TEST_COMPARE("ppc64", "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE);
+ DO_TEST_COMPARE("ppc64", "host", "host-worse", VIR_CPU_COMPARE_INCOMPATIBLE);
+ DO_TEST_COMPARE("ppc64", "host", "host-incomp-arch", VIR_CPU_COMPARE_INCOMPATIBLE);
+ DO_TEST_COMPARE("ppc64", "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL);
+ DO_TEST_COMPARE("ppc64", "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE);
+
/* guest to host comparison */
DO_TEST_COMPARE("x86", "host", "bogus-model", VIR_CPU_COMPARE_ERROR);
DO_TEST_COMPARE("x86", "host", "bogus-feature", VIR_CPU_COMPARE_ERROR);
@@ -597,6 +604,9 @@ mymain(void)
DO_TEST_COMPARE("ppc64", "host", "guest-strict", VIR_CPU_COMPARE_IDENTICAL);
DO_TEST_COMPARE("ppc64", "host", "guest-exact", VIR_CPU_COMPARE_INCOMPATIBLE);
+ DO_TEST_COMPARE("ppc64", "host", "guest-legacy", VIR_CPU_COMPARE_IDENTICAL);
+ DO_TEST_COMPARE("ppc64", "host", "guest-legacy-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE);
+ DO_TEST_COMPARE("ppc64", "host", "guest-legacy-invalid", VIR_CPU_COMPARE_ERROR);
/* guest updates for migration
* automatically compares host CPU with the result */
@@ -627,6 +637,9 @@ mymain(void)
DO_TEST_BASELINE("ppc64", "incompatible-vendors", 0, -1);
DO_TEST_BASELINE("ppc64", "no-vendor", 0, 0);
+ DO_TEST_BASELINE("ppc64", "incompatible-models", 0, -1);
+ DO_TEST_BASELINE("ppc64", "same-model", 0, 0);
+ DO_TEST_BASELINE("ppc64", "legacy", 0, -1);
/* CPU features */
DO_TEST_HASFEATURE("x86", "host", "vmx", YES);
@@ -664,6 +677,9 @@ mymain(void)
DO_TEST_GUESTDATA("ppc64", "host", "guest", ppc_models, NULL, 0);
DO_TEST_GUESTDATA("ppc64", "host", "guest-nofallback", ppc_models, "POWER8", -1);
+ DO_TEST_GUESTDATA("ppc64", "host", "guest-legacy", ppc_models, NULL, 0);
+ DO_TEST_GUESTDATA("ppc64", "host", "guest-legacy-incompatible", ppc_models, NULL, -1);
+ DO_TEST_GUESTDATA("ppc64", "host", "guest-legacy-invalid", ppc_models, NULL, -1);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/cputestdata/ppc64-baseline-incompatible-models.xml b/tests/cputestdata/ppc64-baseline-incompatible-models.xml
new file mode 100644
index 0000000000..7e7b9a6f3a
--- /dev/null
+++ b/tests/cputestdata/ppc64-baseline-incompatible-models.xml
@@ -0,0 +1,14 @@
+
+
+ ppc64
+ POWER7
+ IBM
+
+
+
+ ppc64
+ POWER8
+ IBM
+
+
+
diff --git a/tests/cputestdata/ppc64-baseline-legacy.xml b/tests/cputestdata/ppc64-baseline-legacy.xml
new file mode 100644
index 0000000000..b6524970fd
--- /dev/null
+++ b/tests/cputestdata/ppc64-baseline-legacy.xml
@@ -0,0 +1,14 @@
+
+
+ ppc64
+ POWER8
+ IBM
+
+
+
+ ppc64
+ power8e
+ IBM
+
+
+
diff --git a/tests/cputestdata/ppc64-baseline-same-model-result.xml b/tests/cputestdata/ppc64-baseline-same-model-result.xml
new file mode 100644
index 0000000000..0223018758
--- /dev/null
+++ b/tests/cputestdata/ppc64-baseline-same-model-result.xml
@@ -0,0 +1,3 @@
+
+ POWER8
+
diff --git a/tests/cputestdata/ppc64-baseline-same-model.xml b/tests/cputestdata/ppc64-baseline-same-model.xml
new file mode 100644
index 0000000000..dceae83ba3
--- /dev/null
+++ b/tests/cputestdata/ppc64-baseline-same-model.xml
@@ -0,0 +1,14 @@
+
+
+ ppc64
+ POWER8
+ IBM
+
+
+
+ ppc64
+ POWER8
+ IBM
+
+
+
diff --git a/tests/cputestdata/ppc64-guest-legacy-incompatible.xml b/tests/cputestdata/ppc64-guest-legacy-incompatible.xml
new file mode 100644
index 0000000000..f5b83843e6
--- /dev/null
+++ b/tests/cputestdata/ppc64-guest-legacy-incompatible.xml
@@ -0,0 +1,3 @@
+
+ POWER8_v1.0
+
diff --git a/tests/cputestdata/ppc64-guest-legacy-invalid.xml b/tests/cputestdata/ppc64-guest-legacy-invalid.xml
new file mode 100644
index 0000000000..be059c3db7
--- /dev/null
+++ b/tests/cputestdata/ppc64-guest-legacy-invalid.xml
@@ -0,0 +1,3 @@
+
+ POWER8E_v1.0
+
diff --git a/tests/cputestdata/ppc64-guest-legacy.xml b/tests/cputestdata/ppc64-guest-legacy.xml
new file mode 100644
index 0000000000..36bae52508
--- /dev/null
+++ b/tests/cputestdata/ppc64-guest-legacy.xml
@@ -0,0 +1,3 @@
+
+ POWER7_v2.3
+
diff --git a/tests/cputestdata/ppc64-host+guest-legacy,ppc_models-result.xml b/tests/cputestdata/ppc64-host+guest-legacy,ppc_models-result.xml
new file mode 100644
index 0000000000..3548c0ef67
--- /dev/null
+++ b/tests/cputestdata/ppc64-host+guest-legacy,ppc_models-result.xml
@@ -0,0 +1,5 @@
+
+ ppc64
+ POWER7
+ IBM
+
diff --git a/tests/cputestdata/ppc64-host-better.xml b/tests/cputestdata/ppc64-host-better.xml
new file mode 100644
index 0000000000..af87412eb0
--- /dev/null
+++ b/tests/cputestdata/ppc64-host-better.xml
@@ -0,0 +1,6 @@
+
+ ppc64
+ POWER8
+ IBM
+
+
diff --git a/tests/cputestdata/ppc64-host-incomp-arch.xml b/tests/cputestdata/ppc64-host-incomp-arch.xml
new file mode 100644
index 0000000000..195f436aa2
--- /dev/null
+++ b/tests/cputestdata/ppc64-host-incomp-arch.xml
@@ -0,0 +1,6 @@
+
+ x86_64
+ POWER7
+ IBM
+
+
diff --git a/tests/cputestdata/ppc64-host-no-vendor.xml b/tests/cputestdata/ppc64-host-no-vendor.xml
new file mode 100644
index 0000000000..de730065dd
--- /dev/null
+++ b/tests/cputestdata/ppc64-host-no-vendor.xml
@@ -0,0 +1,5 @@
+
+ ppc64
+ POWER7
+
+
diff --git a/tests/cputestdata/ppc64-host-worse.xml b/tests/cputestdata/ppc64-host-worse.xml
new file mode 100644
index 0000000000..ba1806bbf8
--- /dev/null
+++ b/tests/cputestdata/ppc64-host-worse.xml
@@ -0,0 +1,6 @@
+
+ ppc64
+ POWER6
+ IBM
+
+