From: Luiz Capitulino <lcapitulino@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Lucas Meneghel Rodrigues <lmr@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
"libvir-list@redhat.com" <libvir-list@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>, Adam Litke <agl@us.ibm.com>
Subject: Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
Date: Thu, 15 Dec 2011 13:01:00 -0200 [thread overview]
Message-ID: <20111215130100.6410a464@doriath> (raw)
In-Reply-To: <4EE9FCDF.3080307@siemens.com>
On Thu, 15 Dec 2011 14:57:51 +0100
Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 2011-12-15 14:53, Stefan Hajnoczi wrote:
> > On Thu, Dec 15, 2011 at 1:49 PM, Kevin Wolf <kwolf@redhat.com> wrote:
> >> Am 15.12.2011 14:39, schrieb Jan Kiszka:
> >>> On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote:
> >>>> On 12/15/2011 11:33 AM, Kevin Wolf wrote:
> >>>>> Am 15.12.2011 14:18, schrieb Jan Kiszka:
> >>>>>> On 2011-12-15 14:02, Stefan Hajnoczi wrote:
> >>>>>>> What is the status of QEMU's transition from HMP to the QMP interface?
> >>>>>>>
> >>>>>>> My current understanding is that QEMU provides new HMP commands for
> >>>>>>> humans, but HMP is being phased out as an API. Management tools
> >>>>>>> should rely only on QMP for new commands. That would mean new HMP
> >>>>>>> commands are not guaranteed to produce backwards-compatible output
> >>>>>>> because tools are not supposed to parse the output.
> >>>>>>>
> >>>>>>> On the libvirt side, new QEMU features should only be supported via
> >>>>>>> the json monitor in the future (i.e. human monitor patches should not
> >>>>>>> be sent/merged)? Existing HMP commands will still need the human
> >>>>>>> monitor support in order to handle old QEMU versions gracefully, but
> >>>>>>> I'm thinking about new commands only.
> >>>>>>>
> >>>>>>> Does everyone agree on this? I think this is an important discussion
> >>>>>>> if we want our management interface to get better and more consistent
> >>>>>>> in the future.
> >>>>>>
> >>>>>> To phase out the classic HMP implementation, we need an internal
> >>>>>> HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console
> >>>>>> and gdbstub monitors continue to benefit from new commands. Those
> >>>>>> interfaces will stay for a long time, I'm sure.
> >>>>>
> >>>>> I think we're not talking about dropping HMP here, only about how long
> >>>>> to support it as a stable API for management tools. I believe that we
> >>>>> have been in a transitional phase for long enough now that we can start
> >>>>> changing the output format of HMP commands without considering it an API
> >>>>> breakage.
> >>>>
> >>>> Yes, I've got the same impression. But while we are at it, forgive my
> >>>> naiveness, but wouldn't be worthwhile to consider dropping the human
> >>>> monitor in the long run?
> >>>
> >>> Surely not the interface (for virtual console & gdbstub), but the
> >>> internal implementation I hope.
> >>
> >> Isn't HMP implemented in terms of QMP these days?
Yes, if you look at hmp.c you'll see that HMP is using QMP as a client. Of
course that there are a lot of commands to be converted, but it's just a
matter of time to get this done.
> >
> > Yes and no, I don't mean writing text manipulation code on to of QMP
> > command handlers the way we're doing now. It's a pain.
> >
> > I meant more along the lines of making qmp-shell more human-friendly.
> > You already can specify the command in a command-line fashion - you
> > don't need to write raw JSON. I think it's a question of improving
> > this and perhaps integrating the documentation for the QMP/QAPI
> > commands right at the prompt so that it's easy to learn about the
> > available commands. This would be a new interactive shell that stays
> > much closer to QMP so that we don't bother with maintaining
> > per-command text formatting functions like we do with HMP today.
>
> Monitor pass-through via gdbstub requires text formatting on QEMU side.
> We could start providing a python plugin for gdb at some point that does
> the pretty printing on the client side, but moving over will be a
> lengthy process as well.
Yes, I expect some HMP commands to be difficult to port and that will
require time. But if anyone is interested, we could start making qmp-shell
a decent shell as Stefan suggests above. In the beginning it won't have
all commands HMP has today, but in the future it could replace it.
>
> Jan
>
next prev parent reply other threads:[~2011-12-15 15:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 13:02 [Qemu-devel] Transitioning from HMP to QMP for QEMU Stefan Hajnoczi
2011-12-15 13:18 ` Jan Kiszka
2011-12-15 13:33 ` Kevin Wolf
2011-12-15 13:37 ` Jan Kiszka
2011-12-15 13:38 ` Lucas Meneghel Rodrigues
2011-12-15 13:39 ` Jan Kiszka
2011-12-15 13:45 ` Stefan Hajnoczi
2011-12-15 13:49 ` Kevin Wolf
2011-12-15 13:53 ` Stefan Hajnoczi
2011-12-15 13:57 ` Jan Kiszka
2011-12-15 15:01 ` Luiz Capitulino [this message]
2011-12-15 13:31 ` [Qemu-devel] [libvirt] " Stefan Berger
2011-12-15 13:57 ` [Qemu-devel] " Luiz Capitulino
2011-12-15 14:06 ` Anthony Liguori
2011-12-15 14:52 ` Luiz Capitulino
2011-12-15 14:57 ` Anthony Liguori
2011-12-15 14:23 ` 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=20111215130100.6410a464@doriath \
--to=lcapitulino@redhat.com \
--cc=agl@us.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=kwolf@redhat.com \
--cc=libvir-list@redhat.com \
--cc=lmr@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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 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.