aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2014-04-09 20:34:50 +0300
committerAndreas Färber <afaerber@suse.de>2014-05-05 19:08:49 +0200
commit00b4fbe27452ddc346f7f38d5690686166932588 (patch)
tree806a6a3cca1c571a340f2cf599f962c78e8cf935 /vl.c
parent9e1d668ba9783483284e081662b8a19fd48846b0 (diff)
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 'vl.c')
-rw-r--r--vl.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 236f95efd7..3229c2ff12 100644
--- a/vl.c
+++ b/vl.c
@@ -1588,8 +1588,31 @@ MachineState *current_machine;
static void machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_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;
}
int qemu_register_machine(QEMUMachine *m)