qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "open list:Overall" <kvm@vger.kernel.org>,
	"Alexey Kardashevskiy" <aik@ozlabs.ru>,
	"Alexander Graf" <agraf@suse.de>,
	qemu-stable@nongnu.org, "open list:PowerPC" <qemu-ppc@nongnu.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH] Revert "target-ppc: Create versionless CPU class per family if KVM"
Date: Sun,  1 Mar 2015 01:31:35 +0100	[thread overview]
Message-ID: <1425169895-10783-1-git-send-email-afaerber@suse.de> (raw)

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@ozlabs.ru>
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 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

             reply	other threads:[~2015-03-01  0:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-01  0:31 Andreas Färber [this message]
     [not found] ` <54F4678D.20909@suse.de>
2015-03-02 13:42   ` [Qemu-devel] [PATCH] Revert "target-ppc: Create versionless CPU class per family if KVM" Andreas Färber
2015-03-02 13:51     ` Alexander Graf
2015-03-02 14:07       ` Andreas Färber
2015-03-03  0:42       ` Alexey Kardashevskiy
2015-03-03 20:43         ` Alexander Graf
2015-03-03 22:14           ` Alexey Kardashevskiy
2015-03-04 14:55             ` Andreas Färber
2015-03-04 23:50               ` Alexey Kardashevskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425169895-10783-1-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).