From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4vKW-0002Io-BS for qemu-devel@nongnu.org; Thu, 01 Aug 2013 12:02:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4vKP-0005BA-1V for qemu-devel@nongnu.org; Thu, 01 Aug 2013 12:02:20 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38761 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4vKO-0005Ay-OU for qemu-devel@nongnu.org; Thu, 01 Aug 2013 12:02:12 -0400 Message-ID: <51FA8680.5020109@suse.de> Date: Thu, 01 Aug 2013 18:02:08 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1375366359-11553-1-git-send-email-jjherne@us.ibm.com> <1375366359-11553-9-git-send-email-jjherne@us.ibm.com> In-Reply-To: <1375366359-11553-9-git-send-email-jjherne@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 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: Luiz Capitulino 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 Luiz, 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 What are your thoughts on this? Thanks, Andreas > --- > 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 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg