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

[libvirt] [PATCH] Cpu mapping cleanup



Using inheritance, this patch cleans up the cpu_map.xml file and also
sorts all CPU features according to the feature and registry
values. Model features are sorted the same way as foeatures in the
specification.
Also few models that are related were organized together and parts of
the XML are marked with comments
---
 src/cpu/cpu_map.xml |  455 +++++++++-----------------------------------------
 1 files changed, 82 insertions(+), 373 deletions(-)

diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
index 6af9c40..9a89e2e 100644
--- a/src/cpu/cpu_map.xml
+++ b/src/cpu/cpu_map.xml
@@ -268,6 +268,7 @@
       <feature name='pse'/>
     </model>

+    <!-- Intel-based QEMU generic CPU models -->
     <model name='pentium'>
       <model name='486'/>
       <feature name='de'/>
@@ -302,482 +303,190 @@
       <feature name='pse'/>
       <feature name='tsc'/>
       <feature name='msr'/>
+      <feature name='pae'/>
       <feature name='mce'/>
       <feature name='cx8'/>
+      <feature name='apic'/>
+      <feature name='sep'/>
       <feature name='pge'/>
       <feature name='cmov'/>
       <feature name='pat'/>
-      <feature name='fxsr'/>
       <feature name='mmx'/>
-      <feature name='sse'/>
-      <feature name='sse2'/>
-      <feature name='pae'/>
-      <feature name='sep'/>
-      <feature name='apic'/>
-    </model>
-
-    <model name='qemu32'>
-      <model name='pentiumpro'/>
-      <feature name='pni'/>
-    </model>
-
-    <model name='cpu64-rhel5'>
-      <feature name='apic'/>
-      <feature name='clflush'/>
-      <feature name='cmov'/>
-      <feature name='cx8'/>
-      <feature name='de'/>
-      <feature name='fpu'/>
       <feature name='fxsr'/>
-      <feature name='lm'/>
-      <feature name='mca'/>
-      <feature name='mce'/>
-      <feature name='mmx'/>
-      <feature name='msr'/>
-      <feature name='mtrr'/>
-      <feature name='nx'/>
-      <feature name='pae'/>
-      <feature name='pat'/>
-      <feature name='pge'/>
-      <feature name='pse'/>
-      <feature name='pse36'/>
-      <feature name='sep'/>
       <feature name='sse'/>
       <feature name='sse2'/>
-      <feature name='pni'/>
-      <feature name='syscall'/>
-      <feature name='tsc'/>
-    </model>
-
-    <model name='cpu64-rhel6'>
-      <feature name='apic'/>
-      <feature name='clflush'/>
-      <feature name='cmov'/>
-      <feature name='cx16'/>
-      <feature name='cx8'/>
-      <feature name='de'/>
-      <feature name='fpu'/>
-      <feature name='fxsr'/>
-      <feature name='lahf_lm'/>
-      <feature name='lm'/>
-      <feature name='mca'/>
-      <feature name='mce'/>
-      <feature name='mmx'/>
-      <feature name='msr'/>
-      <feature name='mtrr'/>
-      <feature name='nx'/>
-      <feature name='pae'/>
-      <feature name='pat'/>
-      <feature name='pge'/>
-      <feature name='pse'/>
-      <feature name='pse36'/>
-      <feature name='sep'/>
-      <feature name='sse'/>
-      <feature name='sse2'/>
-      <feature name='pni'/>
-      <feature name='syscall'/>
-      <feature name='tsc'/>
-    </model>
-
-    <model name='kvm32'>
-      <model name='pentiumpro'/>
-      <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
-      <feature name='pse36'/>
-      <feature name='pni'/>
     </model>

     <model name='coreduo'>
       <model name='pentiumpro'/>
+      <vendor name='Intel'/>
       <feature name='vme'/>
       <feature name='mtrr'/>
-      <feature name='clflush'/>
       <feature name='mca'/>
+      <feature name='clflush'/>
       <feature name='pni'/>
       <feature name='monitor'/>
       <feature name='nx'/>
     </model>

-    <model name='qemu64'>
-      <model name='pentiumpro'/>
-      <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
-      <feature name='pse36'/>
-      <feature name='pni'/>
-      <feature name='cx16'/>
-      <feature name='lm'/>
-      <feature name='syscall'/>
-      <feature name='nx'/>
-      <feature name='svm'/>
-      <!-- These are supported only by TCG.  KVM supports them only if the
-           host does.  So we leave them out:
-
-           <feature name='popcnt'/>
-           <feature name='lahf_lm'/>
-           <feature name='sse4a'/>
-           <feature name='abm'/>
-      -->
+    <model name='n270'>
+      <model name='coreduo'/>
+      <feature name='ssse3'/>
     </model>

-    <model name='kvm64'>
-      <model name='pentiumpro'/>
-      <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
+    <model name='core2duo'>
+      <model name='n270'/>
       <feature name='pse36'/>
-      <feature name='pni'/>
-      <feature name='cx16'/>
-      <feature name='lm'/>
       <feature name='syscall'/>
-      <feature name='nx'/>
+      <feature name='lm'/>
     </model>

-    <model name='core2duo'>
+    <!-- Generic QEMU CPU models -->
+    <model name='qemu32'>
       <model name='pentiumpro'/>
-      <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
-      <feature name='vme'/>
-      <feature name='pse36'/>
       <feature name='pni'/>
-      <feature name='monitor'/>
-      <feature name='ssse3'/>
-      <feature name='lm'/>
-      <feature name='syscall'/>
-      <feature name='nx'/>
     </model>

-    <model name='phenom'>
-      <model name='pentiumpro'/>
-      <vendor name='AMD'/>
+    <model name='kvm32'>
+      <model name='qemu32'/>
       <feature name='mtrr'/>
-      <feature name='clflush'/>
       <feature name='mca'/>
       <feature name='pse36'/>
-      <feature name='pni'/>
-      <feature name='monitor'/>
-      <feature name='lm'/>
+      <feature name='clflush'/>
+    </model>
+
+    <model name='cpu64-rhel5'>
+      <model name='kvm32'/>
       <feature name='syscall'/>
       <feature name='nx'/>
-      <feature name='3dnow'/>
-      <feature name='3dnowext'/>
-      <feature name='mmxext'/>
-      <feature name='fxsr_opt'/>
-      <feature name='svm'/>
+      <feature name='lm'/>
     </model>

-    <model name='athlon'>
-      <model name='pentiumpro'/>
-      <vendor name='AMD'/>
-      <feature name='pse36'/>
-      <feature name='vme'/>
-      <feature name='mtrr'/>
-      <feature name='mmxext'/>
-      <feature name='3dnow'/>
-      <feature name='3dnowext'/>
+    <model name='cpu64-rhel6'>
+      <model name='cpu64-rhel5'/>
+      <feature name='cx16'/>
+      <feature name='lahf_lm'/>
     </model>

-    <model name='n270'>
-      <model name='pentiumpro'/>
-      <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
-      <feature name='vme'/>
-      <feature name='monitor'/>
-      <feature name='pni'/>
-      <feature name='ssse3'/>
-      <feature name='nx'/>
+    <model name='kvm64'>
+      <model name='cpu64-rhel5'/>
+      <feature name='cx16'/>
     </model>

+    <model name='qemu64'>
+      <model name='kvm64'/>
+      <!-- These are supported only by TCG.  KVM supports them only if the
+           host does.  So we leave them out:
+
+           <feature name='popcnt'/>
+           <feature name='lahf_lm'/>
+           <feature name='sse4a'/>
+           <feature name='abm'/>
+      -->
+      <feature name='svm'/>
+    </model>
+
+    <!-- Intel CPU models -->
     <model name='Conroe'>
+      <model name='pentiumpro'/>
       <vendor name='Intel'/>
-      <feature name='sse2'/>
-      <feature name='sse'/>
-      <feature name='fxsr'/>
-      <feature name='mmx'/>
-      <feature name='pat'/>
-      <feature name='cmov'/>
-      <feature name='pge'/>
-      <feature name='sep'/>
-      <feature name='apic'/>
-      <feature name='cx8'/>
-      <feature name='mce'/>
-      <feature name='pae'/>
-      <feature name='msr'/>
-      <feature name='tsc'/>
-      <feature name='pse'/>
-      <feature name='de'/>
-      <feature name='fpu'/>
       <feature name='mtrr'/>
-      <feature name='clflush'/>
       <feature name='mca'/>
       <feature name='pse36'/>
+      <feature name='clflush'/>
       <feature name='pni'/>
       <feature name='ssse3'/>
-      <feature name='lm'/>
       <feature name='syscall'/>
       <feature name='nx'/>
+      <feature name='lm'/>
       <feature name='lahf_lm'/>
     </model>

     <model name='Penryn'>
-      <vendor name='Intel'/>
-      <feature name='sse2'/>
-      <feature name='sse'/>
-      <feature name='fxsr'/>
-      <feature name='mmx'/>
-      <feature name='pat'/>
-      <feature name='cmov'/>
-      <feature name='pge'/>
-      <feature name='sep'/>
-      <feature name='apic'/>
-      <feature name='cx8'/>
-      <feature name='mce'/>
-      <feature name='pae'/>
-      <feature name='msr'/>
-      <feature name='tsc'/>
-      <feature name='pse'/>
-      <feature name='de'/>
-      <feature name='fpu'/>
-      <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
-      <feature name='pse36'/>
-      <feature name='pni'/>
+      <model name='Conroe'/>
       <feature name='cx16'/>
-      <feature name='ssse3'/>
       <feature name='sse4.1'/>
-      <feature name='lm'/>
-      <feature name='syscall'/>
-      <feature name='nx'/>
-      <feature name='lahf_lm'/>
     </model>

     <model name='Nehalem'>
-      <vendor name='Intel'/>
-      <feature name='sse2'/>
-      <feature name='sse'/>
-      <feature name='fxsr'/>
-      <feature name='mmx'/>
-      <feature name='pat'/>
-      <feature name='cmov'/>
-      <feature name='pge'/>
-      <feature name='sep'/>
-      <feature name='apic'/>
-      <feature name='cx8'/>
-      <feature name='mce'/>
-      <feature name='pae'/>
-      <feature name='msr'/>
-      <feature name='tsc'/>
-      <feature name='pse'/>
-      <feature name='de'/>
-      <feature name='fpu'/>
-      <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
-      <feature name='pse36'/>
-      <feature name='pni'/>
-      <feature name='cx16'/>
-      <feature name='ssse3'/>
-      <feature name='sse4.1'/>
+      <model name='Penryn'/>
       <feature name='sse4.2'/>
       <feature name='popcnt'/>
-      <feature name='lm'/>
-      <feature name='syscall'/>
-      <feature name='nx'/>
-      <feature name='lahf_lm'/>
     </model>

     <model name='Westmere'>
-      <vendor name='Intel'/>
       <model name='Nehalem'/>
       <feature name='aes'/>
     </model>

     <model name='SandyBridge'>
-      <vendor name='Intel'/>
-      <feature name='aes'/>
-      <feature name='apic'/>
-      <feature name='avx'/>
-      <feature name='clflush'/>
-      <feature name='cmov'/>
-      <feature name='cx16'/>
-      <feature name='cx8'/>
-      <feature name='de'/>
-      <feature name='fpu'/>
-      <feature name='fxsr'/>
-      <feature name='lahf_lm'/>
-      <feature name='lm'/>
-      <feature name='mca'/>
-      <feature name='mce'/>
-      <feature name='mmx'/>
-      <feature name='msr'/>
-      <feature name='mtrr'/>
-      <feature name='nx'/>
-      <feature name='pae'/>
-      <feature name='pat'/>
+      <model name='Westmere'/>
       <feature name='pclmuldq'/>
-      <feature name='pge'/>
-      <feature name='pni'/>
-      <feature name='popcnt'/>
-      <feature name='pse'/>
-      <feature name='pse36'/>
-      <feature name='rdtscp'/>
-      <feature name='sep'/>
-      <feature name='sse'/>
-      <feature name='sse2'/>
-      <feature name='sse4.1'/>
-      <feature name='sse4.2'/>
-      <feature name='ssse3'/>
-      <feature name='syscall'/>
-      <feature name='tsc'/>
-      <feature name='tsc-deadline'/>
       <feature name='x2apic'/>
+      <feature name='tsc-deadline'/>
       <feature name='xsave'/>
+      <feature name='avx'/>
+      <feature name='rdtscp'/>
     </model>

-    <model name='Opteron_G1'>
+    <!-- AMD CPUs -->
+    <model name='athlon'>
+      <model name='pentiumpro'/>
       <vendor name='AMD'/>
-      <feature name='sse2'/>
-      <feature name='sse'/>
-      <feature name='fxsr'/>
-      <feature name='mmx'/>
-      <feature name='pat'/>
-      <feature name='cmov'/>
-      <feature name='pge'/>
-      <feature name='sep'/>
-      <feature name='apic'/>
-      <feature name='cx8'/>
-      <feature name='mce'/>
-      <feature name='pae'/>
-      <feature name='msr'/>
-      <feature name='tsc'/>
-      <feature name='pse'/>
-      <feature name='de'/>
-      <feature name='fpu'/>
+      <feature name='vme'/>
       <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
       <feature name='pse36'/>
-      <feature name='pni'/>
-      <feature name='lm'/>
-      <feature name='syscall'/>
-      <feature name='nx'/>
+      <feature name='mmxext'/>
+      <feature name='3dnowext'/>
+      <feature name='3dnow'/>
     </model>

-    <model name='Opteron_G2'>
+    <model name='phenom'>
+      <model name='cpu64-rhel5'/>
       <vendor name='AMD'/>
-      <feature name='sse2'/>
-      <feature name='sse'/>
-      <feature name='fxsr'/>
-      <feature name='mmx'/>
-      <feature name='pat'/>
-      <feature name='cmov'/>
-      <feature name='pge'/>
-      <feature name='sep'/>
-      <feature name='apic'/>
-      <feature name='cx8'/>
-      <feature name='mce'/>
-      <feature name='pae'/>
-      <feature name='msr'/>
-      <feature name='tsc'/>
-      <feature name='pse'/>
-      <feature name='de'/>
-      <feature name='fpu'/>
-      <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
-      <feature name='pse36'/>
-      <feature name='pni'/>
+      <feature name='monitor'/>
+      <feature name='mmxext'/>
+      <feature name='fxsr_opt'/>
+      <feature name='3dnowext'/>
+      <feature name='3dnow'/>
+      <feature name='svm'/>
+    </model>
+
+    <model name='Opteron_G1'>
+      <model name='cpu64-rhel5'/>
+      <vendor name='AMD'/>
+    </model>
+
+    <model name='Opteron_G2'>
+      <model name='Opteron_G1'/>
       <feature name='cx16'/>
-      <feature name='lm'/>
-      <feature name='syscall'/>
-      <feature name='nx'/>
       <feature name='rdtscp'/>
-      <feature name='svm'/>
       <feature name='lahf_lm'/>
+      <feature name='svm'/>
     </model>

     <model name='Opteron_G3'>
-      <vendor name='AMD'/>
-      <feature name='sse2'/>
-      <feature name='sse'/>
-      <feature name='fxsr'/>
-      <feature name='mmx'/>
-      <feature name='pat'/>
-      <feature name='cmov'/>
-      <feature name='pge'/>
-      <feature name='sep'/>
-      <feature name='apic'/>
-      <feature name='cx8'/>
-      <feature name='mce'/>
-      <feature name='pae'/>
-      <feature name='msr'/>
-      <feature name='tsc'/>
-      <feature name='pse'/>
-      <feature name='de'/>
-      <feature name='fpu'/>
-      <feature name='mtrr'/>
-      <feature name='clflush'/>
-      <feature name='mca'/>
-      <feature name='pse36'/>
-      <feature name='pni'/>
-      <feature name='cx16'/>
+      <model name='Opteron_G2'/>
       <feature name='monitor'/>
       <feature name='popcnt'/>
-      <feature name='lm'/>
-      <feature name='syscall'/>
-      <feature name='nx'/>
-      <feature name='rdtscp'/>
-      <feature name='svm'/>
-      <feature name='sse4a'/>
       <feature name='abm'/>
+      <feature name='sse4a'/>
       <feature name='misalignsse'/>
-      <feature name='lahf_lm'/>
     </model>

     <model name='Opteron_G4'>
-      <vendor name='AMD'/>
-      <feature name='fpu'/>
-      <feature name='de'/>
-      <feature name='pse'/>
-      <feature name='tsc'/>
-      <feature name='msr'/>
-      <feature name='pae'/>
-      <feature name='mce'/>
-      <feature name='cx8'/>
-      <feature name='apic'/>
-      <feature name='sep'/>
-      <feature name='mtrr'/>
-      <feature name='pge'/>
-      <feature name='mca'/>
-      <feature name='cmov'/>
-      <feature name='pat'/>
-      <feature name='pse36'/>
-      <feature name='clflush'/>
-      <feature name='mmx'/>
-      <feature name='fxsr'/>
-      <feature name='sse'/>
-      <feature name='sse2'/>
-      <feature name='pni'/>
+      <model name='Opteron_G2'/>
+      <!-- Can't inherit from G3 because of missing "monitor"
+           feature -->
       <feature name='pclmuldq'/>
       <feature name='ssse3'/>
-      <feature name='cx16'/>
       <feature name='sse4.1'/>
       <feature name='sse4.2'/>
       <feature name='popcnt'/>
       <feature name='aes'/>
       <feature name='xsave'/>
       <feature name='avx'/>
-      <feature name='syscall'/>
-      <feature name='nx'/>
       <feature name='pdpe1gb'/>
-      <feature name='rdtscp'/>
-      <feature name='lm'/>
-      <feature name='lahf_lm'/>
-      <feature name='svm'/>
       <feature name='abm'/>
       <feature name='sse4a'/>
       <feature name='misalignsse'/>
-- 
1.7.3.4


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