ppc: drop caching ObjectClass from PowerPCCPUAlias
commit2527cb9109f5bac0a6c3260927923a6c06c0fe11
authorIgor Mammedov <imammedo@redhat.com>
Wed, 30 Aug 2017 13:24:34 +0000 (30 15:24 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 Sep 2017 23:30:55 +0000 (8 09:30 +1000)
treee03b0fea59f42a084d68c69151dcba1c022927a8
parentb376db777563ec6f9fd57255506418b500151a3d
ppc: drop caching ObjectClass from PowerPCCPUAlias

Caching there practically doesn't give any benefits
and that at slow path druring querying supported CPU list.
But it introduces non conventional path of where from
comes used CPU type name (kvm_ppc_register_host_cpu_type).

Taking in account that kvm_ppc_register_host_cpu_type()
fixes up models the aliases point to, it's sufficient to
make ppc_cpu_class_by_name() translate cpu alias to
correct cpu type name.
So drop PowerPCCPUAlias::oc field + ppc_cpu_class_by_alias()
and let ppc_cpu_class_by_name() do conversion to cpu type name,
which simplifies code a little bit saving ~20LOC and trouble
wondering why ppc_cpu_class_by_alias() is necessary.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/cpu-models.h
target/ppc/kvm.c
target/ppc/translate_init.c