qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Marcel Apfelbaum <marcel.a@redhat.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, famz@redhat.com, stefanha@redhat.com,
	mst@redhat.com, rth@twiddle.net,
	stefano.stabellini@eu.citrix.com, armbru@redhat.com,
	agraf@suse.de, alex@alex.org.uk, pbonzini@redhat.com,
	lcapitulino@redhat.com, aliguori@amazon.com
Subject: Re: [Qemu-devel] [PATCH V2 2/5] machine: remove QEMUMachine indirection from MachineClass
Date: Thu, 03 Apr 2014 18:59:13 +0200	[thread overview]
Message-ID: <533D9361.9040906@suse.de> (raw)
In-Reply-To: <1396257993-4036-3-git-send-email-marcel.a@redhat.com>

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 <marcel.a@redhat.com>
> ---
>  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

  reply	other threads:[~2014-04-03 16:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31  9:26 [Qemu-devel] [PATCH V2 0/5] remove QEMUMachine indirection from MachineClass Marcel Apfelbaum
2014-03-31  9:26 ` [Qemu-devel] [PATCH V2 1/5] hw/boards.h: add QEMUMachine's fields to MachineClass Marcel Apfelbaum
2014-03-31  9:26 ` [Qemu-devel] [PATCH V2 2/5] machine: remove QEMUMachine indirection from MachineClass Marcel Apfelbaum
2014-04-03 16:59   ` Andreas Färber [this message]
2014-04-03 17:11     ` Marcel Apfelbaum
2014-04-03 17:36       ` Andreas Färber
2014-04-03 17:40         ` Marcel Apfelbaum
2014-03-31  9:26 ` [Qemu-devel] [PATCH V2 3/5] machine: replace QEMUMachine by MachineClass in accelerator configuration Marcel Apfelbaum
2014-03-31  9:26 ` [Qemu-devel] [PATCH V2 4/5] hw/ppc: remove QEMUMachine indirection Marcel Apfelbaum
2014-04-03 17:25   ` Andreas Färber
2014-04-03 17:46     ` Marcel Apfelbaum
2014-04-03 17:57       ` Andreas Färber
2014-04-03 18:08         ` Marcel Apfelbaum
2014-03-31  9:26 ` [Qemu-devel] [PATCH V2 5/5] vl.c: Remove QEMUMachine usage Marcel Apfelbaum
2014-04-03 17:09   ` Andreas Färber
2014-04-03 17:12     ` 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=533D9361.9040906@suse.de \
    --to=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=lcapitulino@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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).