All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, armbru@redhat.com, eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH v1 1/1] qmp: marking qmp_cpu as deprecated
Date: Mon, 18 Dec 2017 10:59:54 +0000	[thread overview]
Message-ID: <20171218105954.GE13493@redhat.com> (raw)
In-Reply-To: <20171218105318.30367-1-danielhb@linux.vnet.ibm.com>

On Mon, Dec 18, 2017 at 08:53:18AM -0200, Daniel Henrique Barboza wrote:
> qmp_cpu is a nop that was created a while ago in commit 755f196898
> ("qapi: Convert the cpu command") for the sake of compatibility,
> due to the existence of hmp_cpu.
> 
> Today, there is no need or requirement to keep it as is. QMP is
> meant to be as stateless as possible, thus any QMP command that
> needs a specific monitor CPU setup should provide it in its
> arguments, instead of relying in the current QMP monitor state.
> 
> This patch flags qmp_cpu as deprecated in qemu-doc.texi and changes
> qmp_cpu body to show a deprecation message if used.
> 
> Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
> ---
> Although I've changed the behavior of qmp_cpu to return an error
> instead of doing nothing, no errors were found in the Travis
> build of the patch. Code inspection confirms that qmp_cpu isn't
> being used in QEMU.
> 
> A quick inspection in Libvirt code shows that there is no reference
> to 'qmp_cpu' there either, but to be sure I've CCed Daniel here
> so he can comment/confirm if Libvirt does not care for this change.
> 
>  qemu-doc.texi | 6 ++++++
>  qmp.c         | 2 +-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/qemu-doc.texi b/qemu-doc.texi
> index f7317dfc66..2b63f9a325 100644
> --- a/qemu-doc.texi
> +++ b/qemu-doc.texi
> @@ -2516,6 +2516,12 @@ subsystem image.
>  The ``convert -s snapshot_id_or_name'' argument is obsoleted
>  by the ``convert -l snapshot_param'' argument instead.
>  
> +@section System emulator machine protocol commands
> +
> +@subsection qmp_cpu (since 2.12.0)
> +
> +The ``qmp_cpu'' command is deprecated. Do not use this command.

Just saying it is deprecated doesn't add any useful info, rather
explain why it is deprecated & what (if anything) to use instead.
e.g.

  The ``qmp_cpu'' command is a functional no-op. There is no reason
  to invoke this command and it will be removed with no replacement.

>  @subsection host_net_add (since 2.10.0)
> diff --git a/qmp.c b/qmp.c
> index e8c303116a..d8543d713d 100644
> --- a/qmp.c
> +++ b/qmp.c
> @@ -115,7 +115,7 @@ void qmp_system_powerdown(Error **erp)
>  
>  void qmp_cpu(int64_t index, Error **errp)
>  {
> -    /* Just do nothing */
> +    error_setg(errp, "qmp_cpu is deprecated, do not use this command");
>  }
>  
>  void qmp_cpu_add(int64_t id, Error **errp)

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2017-12-18 11:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 10:53 [Qemu-devel] [PATCH v1 1/1] qmp: marking qmp_cpu as deprecated Daniel Henrique Barboza
2017-12-18 10:59 ` Daniel P. Berrange [this message]
2017-12-18 11:55   ` Daniel Henrique Barboza
2017-12-18 12:01     ` Daniel P. Berrange
2017-12-18 15:05       ` satheesh rajendran

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=20171218105954.GE13493@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=danielhb@linux.vnet.ibm.com \
    --cc=eblake@redhat.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.