On Tue, Nov 19, 2024 at 07:49:45PM +0100, Jiri Denemark wrote: > We already visually group the included models according to vendor using > comments. This patch introduces a new <group> element for doing it > properly in a machine friendly way. AFAICT the <group> has no functional effect > > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> > --- > src/cpu/cpu_map.c | 2 +- > src/cpu_map/index.xml | 226 ++++++++++++++++++++++-------------------- > 2 files changed, 121 insertions(+), 107 deletions(-) > diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml > index 15cb63afe5..2cb97a83ba 100644 > --- a/src/cpu_map/index.xml > +++ b/src/cpu_map/index.xml > @@ -3,122 +3,136 @@ > <include filename='x86_vendors.xml'/> > <include filename='x86_features.xml'/> > + > + <group name='Intel-based QEMU generic CPU models'> > + <include filename='x86_pentium.xml'/> > + <include filename='x86_pentium2.xml'/> > + <include filename='x86_pentium3.xml'/> > + <include filename='x86_pentiumpro.xml'/> > + <include filename='x86_coreduo.xml'/> > + <include filename='x86_n270.xml'/> > + <include filename='x86_core2duo.xml'/> > + </group> > + > + <group name='Generic QEMU CPU models'> > + <include filename='x86_qemu32.xml'/> > + <include filename='x86_kvm32.xml'/> > + <include filename='x86_cpu64-rhel5.xml'/> > + <include filename='x86_cpu64-rhel6.xml'/> > + <include filename='x86_qemu64.xml'/> > + <include filename='x86_kvm64.xml'/> > + </group> > + > + <group vendor='Intel'> In some cases youve used 'name' and some 'vendor', which seems fairly arbitrary, but I guess we're ignoring this attrbiute entirely. Still all the CPUs above have either 'Intel' or 'AMD' set as their vendor in QEMU, so separating them off feels a bit odd. If we're just going to group everything based on vendor, why not just call the tag <vendor name=...> ? > + <include filename='x86_Conroe.xml'/> > + <include filename='x86_Penryn.xml'/> > + <include filename='x86_Nehalem.xml'/> > + <include filename='x86_Nehalem-IBRS.xml'/> > + <include filename='x86_Westmere.xml'/> > + <include filename='x86_Westmere-IBRS.xml'/> > + <include filename='x86_SandyBridge.xml'/> > + <include filename='x86_SandyBridge-IBRS.xml'/> > + <include filename='x86_IvyBridge.xml'/> > + <include filename='x86_IvyBridge-IBRS.xml'/> > + <include filename='x86_Haswell-noTSX.xml'/> > + <include filename='x86_Haswell-noTSX-IBRS.xml'/> > + <include filename='x86_Haswell.xml'/> > + <include filename='x86_Haswell-IBRS.xml'/> > + <include filename='x86_Broadwell-noTSX.xml'/> > + <include filename='x86_Broadwell-noTSX-IBRS.xml'/> > + <include filename='x86_Broadwell.xml'/> > + <include filename='x86_Broadwell-IBRS.xml'/> > + <include filename='x86_Skylake-Client.xml'/> > + <include filename='x86_Skylake-Client-IBRS.xml'/> > + <include filename='x86_Skylake-Client-noTSX-IBRS.xml'/> > + <include filename='x86_Skylake-Server.xml'/> > + <include filename='x86_Skylake-Server-IBRS.xml'/> > + <include filename='x86_Skylake-Server-noTSX-IBRS.xml'/> > + <include filename='x86_Cascadelake-Server.xml'/> > + <include filename='x86_Cascadelake-Server-noTSX.xml'/> > + <include filename='x86_Icelake-Client.xml'/> > + <include filename='x86_Icelake-Client-noTSX.xml'/> > + <include filename='x86_Icelake-Server.xml'/> > + <include filename='x86_Icelake-Server-noTSX.xml'/> > + <include filename='x86_Cooperlake.xml'/> > + <include filename='x86_Snowridge.xml'/> > + <include filename='x86_SapphireRapids.xml'/> > + <include filename='x86_GraniteRapids.xml'/> > + <include filename='x86_SierraForest.xml'/> > + </group> > + > + <group vendor='AMD'> > + <include filename='x86_athlon.xml'/> > + <include filename='x86_phenom.xml'/> > + <include filename='x86_Opteron_G1.xml'/> > + <include filename='x86_Opteron_G2.xml'/> > + <include filename='x86_Opteron_G3.xml'/> > + <include filename='x86_Opteron_G4.xml'/> > + <include filename='x86_Opteron_G5.xml'/> > + <include filename='x86_EPYC.xml'/> > + <include filename='x86_EPYC-IBPB.xml'/> > + <include filename='x86_EPYC-Rome.xml'/> > + <include filename='x86_EPYC-Milan.xml'/> > + <include filename='x86_EPYC-Genoa.xml'/> > + </group> > + > + <group vendor='Hygon'> > + <include filename='x86_Dhyana.xml'/> > + </group> > </arch> > > <arch name='ppc64'> > <include filename='ppc64_vendors.xml'/> > > - <!-- IBM-based CPU models --> > - <include filename='ppc64_POWER6.xml'/> > - <include filename='ppc64_POWER7.xml'/> > - <include filename='ppc64_POWER8.xml'/> > - <include filename='ppc64_POWER9.xml'/> > - <include filename='ppc64_POWER10.xml'/> > - > - <!-- Freescale-based CPU models --> > - <include filename='ppc64_POWERPC_e5500.xml'/> > - <include filename='ppc64_POWERPC_e6500.xml'/> > + <group name='IBM-based CPU models'> > + <include filename='ppc64_POWER6.xml'/> > + <include filename='ppc64_POWER7.xml'/> > + <include filename='ppc64_POWER8.xml'/> > + <include filename='ppc64_POWER9.xml'/> > + <include filename='ppc64_POWER10.xml'/> > + </group> > + > + <group name='Freescale-based CPU models'> > + <include filename='ppc64_POWERPC_e5500.xml'/> > + <include filename='ppc64_POWERPC_e6500.xml'/> > + </group> > </arch> > > <arch name='arm'> > <include filename='arm_vendors.xml'/> > <include filename='arm_features.xml'/> > > - <!-- ARM-based CPU models --> > - <include filename='arm_cortex-a53.xml'/> > - <include filename='arm_cortex-a57.xml'/> > - <include filename='arm_cortex-a72.xml'/> > - <include filename='arm_Neoverse-N1.xml'/> > - <include filename='arm_Neoverse-N2.xml'/> > - <include filename='arm_Neoverse-V1.xml'/> > - > - <!-- Qualcomm-based CPU models --> > - <include filename='arm_Falkor.xml'/> > - > - <!-- Cavium-based CPU models --> > - <include filename='arm_ThunderX299xx.xml'/> > - > - <!-- Fujitsu-based CPU models --> > - <include filename='arm_a64fx.xml'/> > - > - <!-- Hisilicon-based CPU models --> > - <include filename='arm_Kunpeng-920.xml'/> > - > - <!-- Phytium-based CPU models --> > - <include filename='arm_FT-2000plus.xml'/> > - <include filename='arm_Tengyun-S2500.xml'/> > + <group name='ARM-based CPU models'> > + <include filename='arm_cortex-a53.xml'/> > + <include filename='arm_cortex-a57.xml'/> > + <include filename='arm_cortex-a72.xml'/> > + <include filename='arm_Neoverse-N1.xml'/> > + <include filename='arm_Neoverse-N2.xml'/> > + <include filename='arm_Neoverse-V1.xml'/> > + </group> > + > + <group name='Qualcomm-based CPU models'> > + <include filename='arm_Falkor.xml'/> > + </group> > + > + <group name='Cavium-based CPU models'> > + <include filename='arm_ThunderX299xx.xml'/> > + </group> > + > + <group name='Fujitsu-based CPU models'> > + <include filename='arm_a64fx.xml'/> > + </group> > + > + <group name='Hisilicon-based CPU models'> > + <include filename='arm_Kunpeng-920.xml'/> > + </group> > + > + <group name='Phytium-based CPU models'> > + <include filename='arm_FT-2000plus.xml'/> > + <include filename='arm_Tengyun-S2500.xml'/> > + </group> > </arch> > </cpus> > -- > 2.47.0 > With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|