[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'/
Re: [libvirt] [PATCH] Cpu mapping cleanup
On 03/19/2012 06:29 AM, Martin Kletzander wrote: 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 s/foeatures/features/ 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(-) The inheritance is definitely an improvement for reducing lines of code. The patch was a bit hard to read (splitting things into three patches: reordering options, reordering CPU models into groups, then taking advantage of inheritance; rather than doing all three actions in one patch, might have been easier), but seems correct after the few minutes I've spent on it, and isn't worth the time to respin the series just to split the patch. ACK. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Cpu mapping cleanup
On 03/19/2012 06:10 PM, Eric Blake wrote: On 03/19/2012 06:29 AM, Martin Kletzander wrote: 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 s/foeatures/features/ 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(-) The inheritance is definitely an improvement for reducing lines of code. The patch was a bit hard to read (splitting things into three patches: reordering options, reordering CPU models into groups, then taking advantage of inheritance; rather than doing all three actions in one patch, might have been easier), but seems correct after the few minutes I've spent on it, and isn't worth the time to respin the series just to split the patch. I was thinking how to split the patch and this variant didn't cross my mind. Definitely next time =) ACK. Could you also push it, please (I don't have permissions for that)? Thanks -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list