[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2 2/5] machine: remove QEMUMachine indirection
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH V2 2/5] machine: remove QEMUMachine indirection from MachineClass |
Date: |
Thu, 03 Apr 2014 18:59:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
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.
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)
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- Re: [Qemu-devel] [PATCH V2 2/5] machine: remove QEMUMachine indirection from MachineClass,
Andreas Färber <=