This reverts commit 5b79b1cadd3e565b6d1a5ba59764bd47af58b271 to avoid double-registration of types: Registering `POWER5+-powerpc64-cpu' which already exists Taking the textual description of a CPU type as part of a new type name is plain wrong, and so is unconditionally registering a new type here. Cc: Alexey Kardashevskiy <aik@xxxxxxxxx> Cc: qemu-stable@xxxxxxxxxx Signed-off-by: Andreas Färber <afaerber@xxxxxxx> --- target-ppc/kvm.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 1edf2b5..9d614ef 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -2160,18 +2160,6 @@ bool kvmppc_has_cap_fixup_hcalls(void) return cap_fixup_hcalls; } -static PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass *pcc) -{ - ObjectClass *oc = OBJECT_CLASS(pcc); - - while (oc && !object_class_is_abstract(oc)) { - oc = object_class_get_parent(oc); - } - assert(oc); - - return POWERPC_CPU_CLASS(oc); -} - static int kvm_ppc_register_host_cpu_type(void) { TypeInfo type_info = { @@ -2181,7 +2169,6 @@ static int kvm_ppc_register_host_cpu_type(void) }; uint32_t host_pvr = mfpvr(); PowerPCCPUClass *pvr_pcc; - DeviceClass *dc; pvr_pcc = ppc_cpu_class_by_pvr(host_pvr); if (pvr_pcc == NULL) { @@ -2192,14 +2179,6 @@ static int kvm_ppc_register_host_cpu_type(void) } type_info.parent = object_class_get_name(OBJECT_CLASS(pvr_pcc)); type_register(&type_info); - - /* Register generic family CPU class for a family */ - pvr_pcc = ppc_cpu_get_family_class(pvr_pcc); - dc = DEVICE_CLASS(pvr_pcc); - type_info.parent = object_class_get_name(OBJECT_CLASS(pvr_pcc)); - type_info.name = g_strdup_printf("%s-"TYPE_POWERPC_CPU, dc->desc); - type_register(&type_info); - return 0; } -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html