From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVkz7-00038h-Cb for qemu-devel@nongnu.org; Thu, 03 Apr 2014 12:59:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVkyz-0000Tu-Jb for qemu-devel@nongnu.org; Thu, 03 Apr 2014 12:59:25 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60908 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVkyz-0000St-5J for qemu-devel@nongnu.org; Thu, 03 Apr 2014 12:59:17 -0400 Message-ID: <533D9361.9040906@suse.de> Date: Thu, 03 Apr 2014 18:59:13 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1396257993-4036-1-git-send-email-marcel.a@redhat.com> <1396257993-4036-3-git-send-email-marcel.a@redhat.com> In-Reply-To: <1396257993-4036-3-git-send-email-marcel.a@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V2 2/5] machine: remove QEMUMachine indirection from MachineClass List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum , 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 Am 31.03.2014 11:26, schrieb Marcel Apfelbaum: > No need to go through qemu_machine field. Use > MachineClass fields directly. >=20 > Signed-off-by: Marcel Apfelbaum > --- > 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 =3D MACHINE_CLASS(oc); > - > - mc->qemu_machine =3D 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 =3D data; > + > + mc->name =3D qm->name; > + mc->alias =3D qm->alias; > + mc->desc =3D qm->desc; > + mc->init =3D qm->init; > + mc->reset =3D qm->reset; > + mc->hot_add_cpu =3D qm->hot_add_cpu; > + mc->kvm_type =3D qm->kvm_type; > + mc->block_default_type =3D qm->block_default_type; > + mc->max_cpus =3D qm->max_cpus; > + mc->no_serial =3D qm->no_serial; > + mc->no_parallel =3D qm->no_parallel; > + mc->use_virtcon =3D qm->use_virtcon; > + mc->use_sclp =3D qm->use_sclp; > + mc->no_floppy =3D qm->no_floppy; > + mc->no_cdrom =3D qm->no_cdrom; > + mc->no_sdcard =3D qm->no_sdcard; > + mc->is_default =3D qm->is_default; > + mc->default_machine_opts =3D qm->default_machine_opts; > + mc->default_boot_order =3D qm->default_boot_order; > + mc->compat_props =3D qm->compat_props; > + mc->hw_version =3D qm->hw_version; > } > =20 > int qemu_register_machine(QEMUMachine *m) --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg