summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorMarcel Apfelbaum2014-04-09 19:34:50 +0200
committerAndreas Färber2014-05-05 19:08:49 +0200
commit00b4fbe27452ddc346f7f38d5690686166932588 (patch)
tree806a6a3cca1c571a340f2cf599f962c78e8cf935 /hw
parentmachine: Remove obsoleted field from QEMUMachine (diff)
downloadqemu-00b4fbe27452ddc346f7f38d5690686166932588.tar.gz
qemu-00b4fbe27452ddc346f7f38d5690686166932588.tar.xz
qemu-00b4fbe27452ddc346f7f38d5690686166932588.zip
machine: Copy QEMUMachine's fields to MachineClass
In order to eliminate the QEMUMachine indirection, add its fields directly to MachineClass. Do not yet remove qemu_machine field because it is still in use by sPAPR. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> [AF: Copied fields for sPAPR, too] Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/spapr.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index a11e1217b9..5192702504 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1493,8 +1493,32 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(oc);
+ QEMUMachine *qm = data;
mc->qemu_machine = data;
+
+ mc->name = qm->name;
+ mc->alias = qm->alias;
+ mc->desc = qm->desc;
+ mc->init = qm->init;
+ mc->reset = qm->reset;
+ mc->hot_add_cpu = qm->hot_add_cpu;
+ mc->kvm_type = qm->kvm_type;
+ mc->block_default_type = qm->block_default_type;
+ mc->max_cpus = qm->max_cpus;
+ mc->no_serial = qm->no_serial;
+ mc->no_parallel = qm->no_parallel;
+ mc->use_virtcon = qm->use_virtcon;
+ mc->use_sclp = qm->use_sclp;
+ mc->no_floppy = qm->no_floppy;
+ mc->no_cdrom = qm->no_cdrom;
+ mc->no_sdcard = qm->no_sdcard;
+ mc->is_default = qm->is_default;
+ mc->default_machine_opts = qm->default_machine_opts;
+ mc->default_boot_order = qm->default_boot_order;
+ mc->compat_props = qm->compat_props;
+ mc->hw_version = qm->hw_version;
+
fwc->get_dev_path = spapr_get_fw_dev_path;
}