From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVlAe-0000Im-RL for qemu-devel@nongnu.org; Thu, 03 Apr 2014 13:11:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVlAY-0004nh-MX for qemu-devel@nongnu.org; Thu, 03 Apr 2014 13:11:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVlAY-0004nG-74 for qemu-devel@nongnu.org; Thu, 03 Apr 2014 13:11:14 -0400 Message-ID: <1396545081.24348.46.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Thu, 03 Apr 2014 20:11:21 +0300 In-Reply-To: <533D9361.9040906@suse.de> References: <1396257993-4036-1-git-send-email-marcel.a@redhat.com> <1396257993-4036-3-git-send-email-marcel.a@redhat.com> <533D9361.9040906@suse.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 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: Andreas =?ISO-8859-1?Q?F=E4rber?= Cc: peter.maydell@linaro.org, famz@redhat.com, stefanha@redhat.com, mst@redhat.com, rth@twiddle.net, stefano.stabellini@eu.citrix.com, qemu-devel@nongnu.org, armbru@redhat.com, agraf@suse.de, alex@alex.org.uk, pbonzini@redhat.com, lcapitulino@redhat.com, aliguori@amazon.com On Thu, 2014-04-03 at 18:59 +0200, Andreas F=C3=A4rber wrote: > 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; >=20 > 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 belo= w > 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= =20 boards.h), leaving the 4/5 as it is? Thanks, Marcel=20 >=20 > Regards, > Andreas >=20 > > + 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