From patchwork Sun Mar 1 00:31:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 5906431 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B40D09F37F for ; Sun, 1 Mar 2015 00:32:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE78820351 for ; Sun, 1 Mar 2015 00:32:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 748ED2034E for ; Sun, 1 Mar 2015 00:32:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752010AbbCAAbr (ORCPT ); Sat, 28 Feb 2015 19:31:47 -0500 Received: from cantor2.suse.de ([195.135.220.15]:41718 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305AbbCAAbq (ORCPT ); Sat, 28 Feb 2015 19:31:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1A0C3ABED; Sun, 1 Mar 2015 00:31:44 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Alexey Kardashevskiy , qemu-stable@nongnu.org, Alexander Graf , Paolo Bonzini , qemu-ppc@nongnu.org (open list:PowerPC), kvm@vger.kernel.org (open list:Overall) Subject: [PATCH] Revert "target-ppc: Create versionless CPU class per family if KVM" Date: Sun, 1 Mar 2015 01:31:35 +0100 Message-Id: <1425169895-10783-1-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 2.3.0 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber --- 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; }