summaryrefslogtreecommitdiff
path: root/target/ppc/kvm.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-08-30 15:24:34 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2017-09-08 09:30:55 +1000
commit2527cb9109f5bac0a6c3260927923a6c06c0fe11 (patch)
treee03b0fea59f42a084d68c69151dcba1c022927a8 /target/ppc/kvm.c
parentb376db777563ec6f9fd57255506418b500151a3d (diff)
downloadqemu-2527cb9109f5bac0a6c3260927923a6c06c0fe11.tar.gz
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>
Diffstat (limited to 'target/ppc/kvm.c')
-rw-r--r--target/ppc/kvm.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 6861f2f585..6442dfcb95 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -2533,7 +2533,6 @@ static int kvm_ppc_register_host_cpu_type(void)
if (suffix) {
*suffix = 0;
}
- ppc_cpu_aliases[i].oc = oc;
break;
}
}