From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4wbS-0000iB-Hu for qemu-devel@nongnu.org; Thu, 01 Aug 2013 13:23:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4wbN-0008Gv-HM for qemu-devel@nongnu.org; Thu, 01 Aug 2013 13:23:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4wbN-0008GS-6S for qemu-devel@nongnu.org; Thu, 01 Aug 2013 13:23:49 -0400 Date: Thu, 1 Aug 2013 13:23:41 -0400 From: Luiz Capitulino Message-ID: <20130801132341.170985de@redhat.com> In-Reply-To: <51FA8680.5020109@suse.de> References: <1375366359-11553-1-git-send-email-jjherne@us.ibm.com> <1375366359-11553-9-git-send-email-jjherne@us.ibm.com> <51FA8680.5020109@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 8/8] [PATCH RFC v3] qemu-monitor: HMP cpu-add wrapper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?UTF-8?B?RsOkcmJlcg==?= Cc: agraf@suse.de, ehabkost@redhat.com, Markus Armbruster , qemu-devel@nongnu.org, "Jason J. Herne" , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, imammedo@redhat.com On Thu, 01 Aug 2013 18:02:08 +0200 Andreas F=C3=A4rber wrote: > Luiz, >=20 > Am 01.08.2013 16:12, schrieb Jason J. Herne: > > From: "Jason J. Herne" > >=20 > > Add HMP cpu-add wrapper to allow cpu hot plugging via monitor. > >=20 > > Signed-off-by: Jason J. Herne >=20 > What are your thoughts on this? Looks good: Reviewed-by: Luiz Capitulino >=20 > Thanks, > Andreas >=20 > > --- > > hmp-commands.hx | 13 +++++++++++++ > > hmp.c | 10 ++++++++++ > > hmp.h | 1 + > > 3 files changed, 24 insertions(+) > >=20 > > diff --git a/hmp-commands.hx b/hmp-commands.hx > > index 8c6b91a..cb8712b 100644 > > --- a/hmp-commands.hx > > +++ b/hmp-commands.hx > > @@ -1587,6 +1587,19 @@ Executes a qemu-io command on the given block de= vice. > > ETEXI > > =20 > > { > > + .name =3D "cpu-add", > > + .args_type =3D "id:i", > > + .params =3D "id", > > + .help =3D "add cpu", > > + .mhandler.cmd =3D hmp_cpu_add, > > + }, > > + > > +STEXI > > +@item cpu-add @var{id} > > +Add CPU with id @var{id} > > +ETEXI > > + > > + { > > .name =3D "info", > > .args_type =3D "item:s?", > > .params =3D "[subcommand]", > > diff --git a/hmp.c b/hmp.c > > index c45514b..9465bd4 100644 > > --- a/hmp.c > > +++ b/hmp.c > > @@ -1475,6 +1475,16 @@ void hmp_nbd_server_stop(Monitor *mon, const QDi= ct *qdict) > > hmp_handle_error(mon, &errp); > > } > > =20 > > +void hmp_cpu_add(Monitor *mon, const QDict *qdict) > > +{ > > + int cpuid; > > + Error *err =3D NULL; > > + > > + cpuid =3D qdict_get_int(qdict, "id"); > > + qmp_cpu_add(cpuid, &err); > > + hmp_handle_error(mon, &err); > > +} > > + > > void hmp_chardev_add(Monitor *mon, const QDict *qdict) > > { > > const char *args =3D qdict_get_str(qdict, "args"); > > diff --git a/hmp.h b/hmp.h > > index 6c3bdcd..9effca5 100644 > > --- a/hmp.h > > +++ b/hmp.h > > @@ -87,5 +87,6 @@ void hmp_nbd_server_stop(Monitor *mon, const QDict *q= dict); > > void hmp_chardev_add(Monitor *mon, const QDict *qdict); > > void hmp_chardev_remove(Monitor *mon, const QDict *qdict); > > void hmp_qemu_io(Monitor *mon, const QDict *qdict); > > +void hmp_cpu_add(Monitor *mon, const QDict *qdict); > > =20 > > #endif > >=20 >=20 >=20