[PATCH 14/18] cpu: Simplify ppc64 part of CPU map XML

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

 



Use multiple PVRs per CPU model to reduce the number of models we
need to keep track of.

Remove specific CPU models (eg. POWER7+_v2.1): the corresponding
generic CPU model (eg. POWER7) should be used instead to ensure
the guest can be booted on any compatible host.

Get rid of all the entries that did not match any of the CPU
models supported by QEMU, like power8 and power8e.
---
 src/cpu/cpu_map.xml                                | 39 ++--------------------
 tests/cputest.c                                    |  4 +--
 .../ppc64-baseline-incompatible-vendors.xml        |  4 +--
 .../ppc64-baseline-no-vendor-result.xml            |  2 +-
 tests/cputestdata/ppc64-baseline-no-vendor.xml     |  2 +-
 tests/cputestdata/ppc64-exact.xml                  |  2 +-
 tests/cputestdata/ppc64-guest-nofallback.xml       |  2 +-
 tests/cputestdata/ppc64-guest.xml                  |  2 +-
 .../ppc64-host+guest,ppc_models-result.xml         |  2 +-
 tests/cputestdata/ppc64-host.xml                   |  2 +-
 tests/cputestdata/ppc64-strict.xml                 |  4 +--
 11 files changed, 16 insertions(+), 49 deletions(-)

diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
index 6387ce4..b3c4477 100644
--- a/src/cpu/cpu_map.xml
+++ b/src/cpu/cpu_map.xml
@@ -1358,53 +1358,20 @@
     <vendor name='Freescale'/>
 
     <!-- IBM-based CPU models -->
-    <model name='POWER7'>
-      <vendor name='IBM'/>
-      <pvr value='0x003f0200'/>
-    </model>
-
-    <model name='POWER7_v2.1'>
-      <vendor name='IBM'/>
-      <pvr value='0x003f0201'/>
-    </model>
-
-    <model name='POWER7_v2.3'>
-      <vendor name='IBM'/>
-      <pvr value='0x003f0203'/>
-    </model>
-
-    <model name='POWER7+_v2.1'>
-      <vendor name='IBM'/>
-      <pvr value='0x004a0201'/>
-    </model>
-
-    <model name='POWER8_v1.0'>
-      <vendor name='IBM'/>
-      <pvr value='0x004b0100'/>
-    </model>
-
-    <model name='power6'>
+    <model name='POWER6'>
       <vendor name='IBM'/>
       <pvr value='0x003e0000'/>
     </model>
 
-    <model name='power7'>
+    <model name='POWER7'>
       <vendor name='IBM'/>
       <pvr value='0x003f0000'/>
-    </model>
-
-    <model name='power7+'>
-      <vendor name='IBM'/>
       <pvr value='0x004a0000'/>
     </model>
 
-    <model name='power8e'>
+    <model name='POWER8'>
       <vendor name='IBM'/>
       <pvr value='0x004b0000'/>
-    </model>
-
-    <model name='power8'>
-      <vendor name='IBM'/>
       <pvr value='0x004d0000'/>
     </model>
 
diff --git a/tests/cputest.c b/tests/cputest.c
index ec867a7..82999f8 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -493,7 +493,7 @@ static const char *model486[]   = { "486" };
 static const char *nomodel[]    = { "nomodel" };
 static const char *models[]     = { "qemu64", "core2duo", "Nehalem" };
 static const char *haswell[]    = { "SandyBridge", "Haswell" };
-static const char *ppc_models[] = { "POWER7", "POWER7_v2.1", "POWER7_v2.3", "POWER8_v1.0"};
+static const char *ppc_models[] = { "POWER6", "POWER7", "POWER8" };
 
 static int
 mymain(void)
@@ -654,7 +654,7 @@ mymain(void)
                       NULL, "Haswell-noTSX", 0);
 
     DO_TEST_GUESTDATA("ppc64", "host", "guest", ppc_models, NULL, 0);
-    DO_TEST_GUESTDATA("ppc64", "host", "guest-nofallback", ppc_models, "POWER7_v2.1", -1);
+    DO_TEST_GUESTDATA("ppc64", "host", "guest-nofallback", ppc_models, "POWER6", -1);
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
diff --git a/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml b/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml
index 97d3c9c..9e67e9d 100644
--- a/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml
+++ b/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml
@@ -1,13 +1,13 @@
 <cpuTest>
 <cpu>
   <arch>ppc64</arch>
-  <model>POWER7+_v2.1</model>
+  <model>POWER7</model>
   <vendor>Intel</vendor>
   <topology sockets='2' cores='4' threads='1'/>
 </cpu>
 <cpu>
   <arch>ppc64</arch>
-  <model>POWER8_v1.0</model>
+  <model>POWER8</model>
   <vendor>Intel</vendor>
   <topology sockets='1' cores='1' threads='1'/>
 </cpu>
diff --git a/tests/cputestdata/ppc64-baseline-no-vendor-result.xml b/tests/cputestdata/ppc64-baseline-no-vendor-result.xml
index 36bae52..7fac4b7 100644
--- a/tests/cputestdata/ppc64-baseline-no-vendor-result.xml
+++ b/tests/cputestdata/ppc64-baseline-no-vendor-result.xml
@@ -1,3 +1,3 @@
 <cpu mode='custom' match='exact'>
-  <model fallback='allow'>POWER7_v2.3</model>
+  <model fallback='allow'>POWER7</model>
 </cpu>
diff --git a/tests/cputestdata/ppc64-baseline-no-vendor.xml b/tests/cputestdata/ppc64-baseline-no-vendor.xml
index 5e69a62..6d8dd0d 100644
--- a/tests/cputestdata/ppc64-baseline-no-vendor.xml
+++ b/tests/cputestdata/ppc64-baseline-no-vendor.xml
@@ -1,7 +1,7 @@
 <cpuTest>
 <cpu>
   <arch>ppc64</arch>
-  <model>POWER7_v2.3</model>
+  <model>POWER7</model>
   <topology sockets='2' cores='4' threads='1'/>
 </cpu>
 </cpuTest>
diff --git a/tests/cputestdata/ppc64-exact.xml b/tests/cputestdata/ppc64-exact.xml
index c84f16a..f416a59 100644
--- a/tests/cputestdata/ppc64-exact.xml
+++ b/tests/cputestdata/ppc64-exact.xml
@@ -1,3 +1,3 @@
 <cpu match='exact'>
-  <model>POWER8_v1.0</model>
+  <model>POWER8</model>
 </cpu>
diff --git a/tests/cputestdata/ppc64-guest-nofallback.xml b/tests/cputestdata/ppc64-guest-nofallback.xml
index 42026b4..603a3ab 100644
--- a/tests/cputestdata/ppc64-guest-nofallback.xml
+++ b/tests/cputestdata/ppc64-guest-nofallback.xml
@@ -1,4 +1,4 @@
 <cpu match='exact'>
-  <model fallback='forbid'>POWER7_v2.1</model>
+  <model fallback='forbid'>POWER6</model>
   <topology sockets='2' cores='4' threads='1'/>
 </cpu>
diff --git a/tests/cputestdata/ppc64-guest.xml b/tests/cputestdata/ppc64-guest.xml
index 9e91501..210f96d 100644
--- a/tests/cputestdata/ppc64-guest.xml
+++ b/tests/cputestdata/ppc64-guest.xml
@@ -1,4 +1,4 @@
 <cpu match='exact'>
-  <model>POWER7_v2.3</model>
+  <model>POWER7</model>
   <topology sockets='2' cores='4' threads='1'/>
 </cpu>
diff --git a/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml b/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
index 3e55f68..3548c0e 100644
--- a/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
+++ b/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
@@ -1,5 +1,5 @@
 <cpu mode='custom' match='exact'>
   <arch>ppc64</arch>
-  <model fallback='allow'>POWER7_v2.3</model>
+  <model fallback='allow'>POWER7</model>
   <vendor>IBM</vendor>
 </cpu>
diff --git a/tests/cputestdata/ppc64-host.xml b/tests/cputestdata/ppc64-host.xml
index 39cb741..0ac5c4e 100644
--- a/tests/cputestdata/ppc64-host.xml
+++ b/tests/cputestdata/ppc64-host.xml
@@ -1,6 +1,6 @@
 <cpu>
   <arch>ppc64</arch>
-  <model>POWER7_v2.3</model>
+  <model>POWER7</model>
   <vendor>IBM</vendor>
   <topology sockets='1' cores='64' threads='1'/>
 </cpu>
diff --git a/tests/cputestdata/ppc64-strict.xml b/tests/cputestdata/ppc64-strict.xml
index e91c6e7..217dfc7 100644
--- a/tests/cputestdata/ppc64-strict.xml
+++ b/tests/cputestdata/ppc64-strict.xml
@@ -1,3 +1,3 @@
-<cpu match='exact'>
-  <model>POWER7_v2.3</model>
+<cpu match='strict'>
+  <model>POWER7</model>
 </cpu>
-- 
2.4.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]