All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: "Jason J. Herne" <jjherne@us.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] [PATCH RFC v4] qemu-monitor: HMP cpu-add wrapper
Date: Mon, 16 Dec 2013 16:33:09 -0500	[thread overview]
Message-ID: <20131216163309.6ce584b6@redhat.com> (raw)
In-Reply-To: <1386786254-5640-1-git-send-email-jjherne@us.ibm.com>

On Wed, 11 Dec 2013 13:24:14 -0500
"Jason J. Herne" <jjherne@us.ibm.com> wrote:

> From: "Jason J. Herne" <jjherne@us.ibm.com>
> 
> Add HMP cpu-add wrapper to allow cpu hot plugging via monitor.
> 
> Signed-off-by: Jason J. Herne <jjherne@us.ibm.com>

Applied to the qmp branch, thanks.

> ---
>  hmp-commands.hx | 13 +++++++++++++
>  hmp.c           | 10 ++++++++++
>  hmp.h           |  1 +
>  3 files changed, 24 insertions(+)
> 
> diff --git a/hmp-commands.hx b/hmp-commands.hx
> index caae5ad..028a8a1 100644
> --- a/hmp-commands.hx
> +++ b/hmp-commands.hx
> @@ -1620,6 +1620,19 @@ Executes a qemu-io command on the given block device.
>  ETEXI
>  
>      {
> +        .name       = "cpu-add",
> +        .args_type  = "id:i",
> +        .params     = "id",
> +        .help       = "add cpu",
> +        .mhandler.cmd  = hmp_cpu_add,
> +    },
> +
> +STEXI
> +@item cpu-add @var{id}
> +Add CPU with id @var{id}
> +ETEXI
> +
> +    {
>          .name       = "info",
>          .args_type  = "item:s?",
>          .params     = "[subcommand]",
> diff --git a/hmp.c b/hmp.c
> index 32ee285..c513f9b 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -1525,6 +1525,16 @@ void hmp_nbd_server_stop(Monitor *mon, const QDict *qdict)
>      hmp_handle_error(mon, &errp);
>  }
>  
> +void hmp_cpu_add(Monitor *mon, const QDict *qdict)
> +{
> +    int cpuid;
> +    Error *err = NULL;
> +
> +    cpuid = 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 = qdict_get_str(qdict, "args");
> diff --git a/hmp.h b/hmp.h
> index 54cf71f..f92fc89 100644
> --- a/hmp.h
> +++ b/hmp.h
> @@ -89,5 +89,6 @@ void hmp_nbd_server_stop(Monitor *mon, const QDict *qdict);
>  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);
>  
>  #endif

      parent reply	other threads:[~2013-12-16 21:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 18:24 [Qemu-devel] [PATCH] [PATCH RFC v4] qemu-monitor: HMP cpu-add wrapper Jason J. Herne
2013-12-11 18:27 ` Jason J. Herne
2013-12-13 18:36 ` Igor Mammedov
2013-12-16 21:33 ` Luiz Capitulino [this message]

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=20131216163309.6ce584b6@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=jjherne@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.