qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.a@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, famz@redhat.com, stefanha@redhat.com,
	kvm@vger.kernel.org, mst@redhat.com, alex@alex.org.uk,
	armbru@redhat.com, stefano.stabellini@eu.citrix.com,
	agraf@suse.de, lcapitulino@redhat.com, qemu-ppc@nongnu.org,
	aliguori@amazon.com, pbonzini@redhat.com, afaerber@suse.de,
	rth@twiddle.net
Subject: [Qemu-devel]  [PATCH 4/5] hw/ppc: remove QEMUMachine indirection
Date: Tue, 25 Mar 2014 15:46:53 +0200	[thread overview]
Message-ID: <1395755214-8957-5-git-send-email-marcel.a@redhat.com> (raw)
In-Reply-To: <1395755214-8957-1-git-send-email-marcel.a@redhat.com>

No need for QEMUMachine anymore because
its fields are passed to MachineClass.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
---
 hw/ppc/spapr.c | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index a11e121..4498fc2 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1419,19 +1419,6 @@ static int spapr_kvm_type(const char *vm_type)
     exit(1);
 }
 
-static QEMUMachine spapr_machine = {
-    .name = "pseries",
-    .desc = "pSeries Logical Partition (PAPR compliant)",
-    .is_default = 1,
-    .init = ppc_spapr_init,
-    .reset = ppc_spapr_reset,
-    .block_default_type = IF_SCSI,
-    .max_cpus = MAX_CPUS,
-    .no_parallel = 1,
-    .default_boot_order = NULL,
-    .kvm_type = spapr_kvm_type,
-};
-
 /*
  * Implementation of an interface to adjust firmware patch
  * for the bootindex property handling.
@@ -1494,7 +1481,17 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
     MachineClass *mc = MACHINE_CLASS(oc);
     FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(oc);
 
-    mc->qemu_machine = data;
+    mc->name = "pseries",
+    mc->desc = "pSeries Logical Partition (PAPR compliant)",
+    mc->is_default = 1,
+    mc->init = ppc_spapr_init,
+    mc->reset = ppc_spapr_reset,
+    mc->block_default_type = IF_SCSI,
+    mc->max_cpus = MAX_CPUS,
+    mc->no_parallel = 1,
+    mc->default_boot_order = NULL,
+    mc->kvm_type = spapr_kvm_type,
+
     fwc->get_dev_path = spapr_get_fw_dev_path;
 }
 
@@ -1502,7 +1499,6 @@ static const TypeInfo spapr_machine_info = {
     .name          = TYPE_SPAPR_MACHINE,
     .parent        = TYPE_MACHINE,
     .class_init    = spapr_machine_class_init,
-    .class_data    = &spapr_machine,
     .interfaces = (InterfaceInfo[]) {
         { TYPE_FW_PATH_PROVIDER },
         { }
-- 
1.8.3.1

  parent reply	other threads:[~2014-03-25 18:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25 13:46 [Qemu-devel] [PATCH 0/5] remove QEMUMachine indirection from MachineClass Marcel Apfelbaum
2014-03-25 13:46 ` [Qemu-devel] [PATCH 1/5] hw/boards.h: add QEMUMachine's fields to MachineClass Marcel Apfelbaum
2014-03-25 13:46 ` [Qemu-devel] [PATCH 2/5] machine: remove QEMUMachine indirection from MachineClass Marcel Apfelbaum
2014-03-25 13:46 ` [Qemu-devel] [PATCH 3/5] machine: replace QEMUMachine by MachineClass in accelerator configuration Marcel Apfelbaum
2014-03-25 13:46 ` Marcel Apfelbaum [this message]
2014-03-25 14:00   ` [Qemu-devel] [PATCH 4/5] hw/ppc: remove QEMUMachine indirection Paolo Bonzini
2014-03-25 20:11     ` Marcel Apfelbaum
2014-03-25 13:46 ` [Qemu-devel] [PATCH 5/5] vl.c: Remove QEMUMachine usage Marcel Apfelbaum
  -- strict thread matches above, loose matches on Subject: below --
2014-03-25 14:53 [Qemu-devel] [PATCH 0/5] remove QEMUMachine indirection from MachineClass Marcel Apfelbaum
2014-03-25 14:53 ` [Qemu-devel] [PATCH 4/5] hw/ppc: remove QEMUMachine indirection Marcel Apfelbaum

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=1395755214-8957-5-git-send-email-marcel.a@redhat.com \
    --to=marcel.a@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=alex@alex.org.uk \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lcapitulino@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    --cc=stefano.stabellini@eu.citrix.com \
    /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).