qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 16/16] Make qemu-io commands available in the monitor
Date: Tue, 4 Jun 2013 14:49:55 +0200	[thread overview]
Message-ID: <20130604124955.GI2642@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <20130604084025.3fcf1a70@redhat.com>

Am 04.06.2013 um 14:40 hat Luiz Capitulino geschrieben:
> On Tue, 4 Jun 2013 12:08:23 +0200
> Kevin Wolf <kwolf@redhat.com> wrote:
> 
> > Am 29.05.2013 um 19:51 hat Luiz Capitulino geschrieben:
> > > On Wed, 29 May 2013 10:13:42 +0200
> > > Kevin Wolf <kwolf@redhat.com> wrote:
> > > 
> > > > Am 28.05.2013 um 18:07 hat Eric Blake geschrieben:
> > > > > On 05/28/2013 09:27 AM, Kevin Wolf wrote:
> > > > > > The QMP version is flagged with a __org.qemu.debug- prefix in order to
> > > > > > reinforce the statement that qemu-io is for testing and debugging only,
> > > > > > with no API guarantees.
> > > > > 
> > > > > Correct use of naming conventions.
> > > > > 
> > > > > Hmm, I wonder if the recent addition of an 'abort' action to
> > > > > 'transaction' should be renamed __org.qemu.debug-abort, to make it
> > > > > obvious that it is another case of a QMP command useful mainly for
> > > > > testing, and not real-life use.
> > > > 
> > > > Makes sense to me.
> > > > 
> > > > But first I'd like to get Luiz's ack for this, because I think I'm the
> > > > first one to use an __org.qemu prefix, and I'm the first one trying to
> > > > introduce a QMP command without API stability.
> > > 
> > > I think that should be fine. However, it's not a perfect match for QMP
> > > as you don't expect mngt to use it anytime soon and that the command's
> > > syntax is not QMP friendly:
> > > 
> > > > { "execute": "__org.qemu.debug-qemu-io-command", "arguments":
> > > >     { "device": "ide0-hd0", "command": "write -P 0x12 4M 512k" } }
> > > 
> > > What about adding a HMP-only command (the good old way) and use it
> > > through human-monitor-command?
> > > 
> > > IMO, this matches better your current use-case and the API instability
> > > of the command.
> > 
> > Works for me, but wasn't the plan to make HMP purely a wrapper around
> > QMP? Then adding HMP-only commands would be counterproductive. So I
> > assumed that QMP is a must. I didn't even know that the code still
> > allows you to have HMP-only commands. :-)
> 
> Yes, the long term plan is to have all HMP commands calling QMP
> counterparts. But the command you're adding doesn't fit QMP's design
> very well.

It fits the design about as well as human-monitor-command. Both are
passthrough commands, one to HMP, the other one to qemu-io.

> I suggested adding it as HMP-only for now because it's the simplest
> thing to do for this very specific case.
> 
> If more test-only non-QMP-friendly commands appear, then we'll need
> to think of a more general solution.

What does "for now" mean, and what will the proper long-term solution
look like?

> Now, something has just occurred to me. Why isn't it a good idea having
> this command as a stable API? Wouldn't it be a good idea to allow
> out-of-tree test tools like autotest to use it?

Because qemu-io exposes internals of the block layer that we don't want
to make a stable API. Autotest can have test cases using this, but
they'd have to be against a specific qemu version.

> > So you prefer a respin with the QMP part dropped?
> 
> Yes.

Okay, I'll do that.

Kevin

  reply	other threads:[~2013-06-04 12:50 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 15:27 [Qemu-devel] [PATCH 00/16] Make qemu-io commands available in the monitor Kevin Wolf
2013-05-28 15:27 ` [Qemu-devel] [PATCH 01/16] qemu-io: Remove unused args_command Kevin Wolf
2013-05-28 16:18   ` Eric Blake
2013-05-28 15:27 ` [Qemu-devel] [PATCH 02/16] cutils: Support 'P' and 'E' suffixes in strtosz() Kevin Wolf
2013-05-28 16:29   ` Eric Blake
2013-05-28 15:27 ` [Qemu-devel] [PATCH 03/16] qemu-io: Make cvtnum() a wrapper around strtosz_suffix() Kevin Wolf
2013-05-28 16:42   ` Eric Blake
2013-05-28 15:27 ` [Qemu-devel] [PATCH 04/16] qemu-io: Handle cvtnum() errors in 'alloc' Kevin Wolf
2013-05-28 16:53   ` Eric Blake
2013-05-28 15:27 ` [Qemu-devel] [PATCH 05/16] qemu-io: Don't use global bs in command implementations Kevin Wolf
2013-05-28 15:37   ` Kevin Wolf
2013-05-28 17:02     ` Eric Blake
2013-06-05 12:28   ` Stefan Hajnoczi
2013-06-05 12:39     ` Kevin Wolf
2013-05-28 15:27 ` [Qemu-devel] [PATCH 06/16] qemu-io: Split off commands to qemu-io-cmds.c Kevin Wolf
2013-05-29 20:29   ` Eric Blake
2013-06-04 10:11     ` Kevin Wolf
2013-05-28 15:27 ` [Qemu-devel] [PATCH 07/16] qemu-io: Factor out qemuio_command Kevin Wolf
2013-05-29 21:11   ` Eric Blake
2013-06-05 12:33   ` Stefan Hajnoczi
2013-05-28 15:27 ` [Qemu-devel] [PATCH 08/16] qemu-io: Move 'help' function Kevin Wolf
2013-05-29 21:25   ` Eric Blake
2013-06-04 10:20     ` Kevin Wolf
2013-06-05 12:37   ` Stefan Hajnoczi
2013-05-28 15:27 ` [Qemu-devel] [PATCH 09/16] qemu-io: Move 'quit' function Kevin Wolf
2013-05-29 22:11   ` Eric Blake
2013-05-28 15:27 ` [Qemu-devel] [PATCH 10/16] qemu-io: Move qemu_strsep() to cutils.c Kevin Wolf
2013-05-29 22:12   ` Eric Blake
2013-05-28 15:27 ` [Qemu-devel] [PATCH 11/16] qemu-io: Move functions for registering and running commands Kevin Wolf
2013-05-30  2:27   ` Eric Blake
2013-06-05 12:42   ` Stefan Hajnoczi
2013-05-28 15:27 ` [Qemu-devel] [PATCH 12/16] qemu-io: Move command_loop() and friends Kevin Wolf
2013-05-28 15:27 ` [Qemu-devel] [PATCH 13/16] qemu-io: Move remaining helpers from cmd.c Kevin Wolf
2013-05-28 15:27 ` [Qemu-devel] [PATCH 14/16] qemu-io: Interface cleanup Kevin Wolf
2013-05-28 15:27 ` [Qemu-devel] [PATCH 15/16] qemu-io: Use the qemu version for -V Kevin Wolf
2013-05-28 15:27 ` [Qemu-devel] [PATCH 16/16] Make qemu-io commands available in the monitor Kevin Wolf
2013-05-28 16:07   ` Eric Blake
2013-05-29  8:13     ` Kevin Wolf
2013-05-29 12:05       ` Eric Blake
2013-05-29 17:51       ` Luiz Capitulino
2013-06-04 10:08         ` Kevin Wolf
2013-06-04 12:40           ` Luiz Capitulino
2013-06-04 12:49             ` Kevin Wolf [this message]
2013-06-04 13:09               ` Luiz Capitulino
2013-06-05 13:02 ` [Qemu-devel] [PATCH 00/16] " Stefan Hajnoczi

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=20130604124955.GI2642@dhcp-200-207.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).