[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2 2/5] machine: remove QEMUMachine indirection
From: |
Marcel Apfelbaum |
Subject: |
Re: [Qemu-devel] [PATCH V2 2/5] machine: remove QEMUMachine indirection from MachineClass |
Date: |
Thu, 03 Apr 2014 20:11:21 +0300 |
On Thu, 2014-04-03 at 18:59 +0200, Andreas Färber wrote:
> Am 31.03.2014 11:26, schrieb Marcel Apfelbaum:
> > No need to go through qemu_machine field. Use
> > MachineClass fields directly.
> >
> > Signed-off-by: Marcel Apfelbaum <address@hidden>
> > ---
> > device-hotplug.c | 2 +-
> > qmp.c | 4 +--
> > vl.c | 103
> > ++++++++++++++++++++++++++++++++-----------------------
> > 3 files changed, 63 insertions(+), 46 deletions(-)
> [...]
> > diff --git a/vl.c b/vl.c
> > index 9975e5a..96155ca 100644
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -1583,8 +1583,29 @@ MachineState *current_machine;
> > static void machine_class_init(ObjectClass *oc, void *data)
> > {
> > MachineClass *mc = MACHINE_CLASS(oc);
> > -
> > - mc->qemu_machine = data;
>
> This looks incomplete. You should drop the qemu_machine field from
> boards.h to assure that no one is using it - pseries still is, so 4/5
> needs to be be squashed into this commit, otherwise the new fields below
> remain empty for it.
Yes, indeed, otherwise it will break bisection.
I was looking for a way to separate the changes for hw/ppc/spapr.c
into a separate patch.
Maybe I will leave both assignments (of the qemu_machine pointer and the fields)
in this patch and remove it on 5/5 (together with qemu_machine field from
boards.h), leaving the 4/5 as it is?
Thanks,
Marcel
>
> Regards,
> Andreas
>
> > + QEMUMachine *qm = 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)
>