* [Qemu-devel] Transitioning from HMP to QMP for QEMU
@ 2011-12-15 13:02 Stefan Hajnoczi
2011-12-15 13:18 ` Jan Kiszka
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Stefan Hajnoczi @ 2011-12-15 13:02 UTC (permalink / raw)
To: libvir-list, qemu-devel
Cc: Kevin Wolf, Anthony Liguori, Adam Litke, Luiz Capitulino
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.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
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:31 ` [Qemu-devel] [libvirt] " Stefan Berger
2011-12-15 13:57 ` [Qemu-devel] " Luiz Capitulino
2 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2011-12-15 13:18 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Kevin Wolf, Anthony Liguori, libvir-list, qemu-devel,
Luiz Capitulino, Adam Litke
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.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [libvirt] Transitioning from HMP to QMP for QEMU
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:31 ` Stefan Berger
2011-12-15 13:57 ` [Qemu-devel] " Luiz Capitulino
2 siblings, 0 replies; 17+ messages in thread
From: Stefan Berger @ 2011-12-15 13:31 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: libvir-list, Kevin Wolf, Anthony Liguori, qemu-devel
On 12/15/2011 08:02 AM, 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.
>
HMP is good for a human to interaction with Qemu, QMP mostly for a
machine. At least that's my impression. If there are no new HMP commands
hopefully there is an alternative for human interaction.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
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
0 siblings, 2 replies; 17+ messages in thread
From: Kevin Wolf @ 2011-12-15 13:33 UTC (permalink / raw)
To: Jan Kiszka
Cc: Anthony Liguori, libvir-list, Stefan Hajnoczi, qemu-devel,
Luiz Capitulino, Adam Litke
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.
Kevin
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
2011-12-15 13:33 ` Kevin Wolf
@ 2011-12-15 13:37 ` Jan Kiszka
2011-12-15 13:38 ` Lucas Meneghel Rodrigues
1 sibling, 0 replies; 17+ messages in thread
From: Jan Kiszka @ 2011-12-15 13:37 UTC (permalink / raw)
To: Kevin Wolf
Cc: Anthony Liguori, libvir-list@redhat.com, Stefan Hajnoczi,
qemu-devel, Luiz Capitulino, Adam Litke
On 2011-12-15 14:33, 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.
We are also talking about introducing new commands twice, which is a
PITA. Also, peoples interest in HMP vs. QMP varies. Some focus on
management usability, others on human-machine interaction. So you get
suggestions for new command typical either for one, not for both.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
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
1 sibling, 1 reply; 17+ messages in thread
From: Lucas Meneghel Rodrigues @ 2011-12-15 13:38 UTC (permalink / raw)
To: Kevin Wolf
Cc: Anthony Liguori, libvir-list, Jan Kiszka, Adam Litke, qemu-devel,
Luiz Capitulino, Stefan Hajnoczi
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?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
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
0 siblings, 2 replies; 17+ messages in thread
From: Jan Kiszka @ 2011-12-15 13:39 UTC (permalink / raw)
To: Lucas Meneghel Rodrigues
Cc: Kevin Wolf, Anthony Liguori, libvir-list@redhat.com,
Stefan Hajnoczi, qemu-devel, Luiz Capitulino, Adam Litke
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.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
2011-12-15 13:39 ` Jan Kiszka
@ 2011-12-15 13:45 ` Stefan Hajnoczi
2011-12-15 13:49 ` Kevin Wolf
1 sibling, 0 replies; 17+ messages in thread
From: Stefan Hajnoczi @ 2011-12-15 13:45 UTC (permalink / raw)
To: Jan Kiszka
Cc: Lucas Meneghel Rodrigues, Kevin Wolf, Anthony Liguori,
libvir-list@redhat.com, qemu-devel, Luiz Capitulino, Adam Litke
On Thu, Dec 15, 2011 at 1:39 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> 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.
I wonder if we could shape up qemu/QMP/qmp-shell.py to the level where
it provides HMP human-friendliness and then drop HMP.
This is a side-discussion though. The main point was to assert that
HMP is not a management interface and that we don't add text monitor
support new commands to libvirt. It doesn't solve the problem of
having to implement each command twice today in libvirt but it at
least establishes the flexibility to morph HMP into a layer on top of
QMP in the future in QEMU.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
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
1 sibling, 1 reply; 17+ messages in thread
From: Kevin Wolf @ 2011-12-15 13:49 UTC (permalink / raw)
To: Jan Kiszka
Cc: Lucas Meneghel Rodrigues, Anthony Liguori, libvir-list@redhat.com,
Stefan Hajnoczi, qemu-devel, Luiz Capitulino, Adam Litke
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?
And yes, strong NACK for removing the functionality.
Kevin
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
2011-12-15 13:49 ` Kevin Wolf
@ 2011-12-15 13:53 ` Stefan Hajnoczi
2011-12-15 13:57 ` Jan Kiszka
0 siblings, 1 reply; 17+ messages in thread
From: Stefan Hajnoczi @ 2011-12-15 13:53 UTC (permalink / raw)
To: Kevin Wolf
Cc: Lucas Meneghel Rodrigues, Anthony Liguori, libvir-list@redhat.com,
Jan Kiszka, qemu-devel, Luiz Capitulino, Adam Litke
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 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.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
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:31 ` [Qemu-devel] [libvirt] " Stefan Berger
@ 2011-12-15 13:57 ` Luiz Capitulino
2011-12-15 14:06 ` Anthony Liguori
2011-12-15 14:23 ` Stefan Hajnoczi
2 siblings, 2 replies; 17+ messages in thread
From: Luiz Capitulino @ 2011-12-15 13:57 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Kevin Wolf, Anthony Liguori, libvir-list, qemu-devel, Adam Litke
On Thu, 15 Dec 2011 13:02:40 +0000
Stefan Hajnoczi <stefanha@gmail.com> wrote:
> What is the status of QEMU's transition from HMP to the QMP interface?
Depends on what you consider the transition to be.
For management tools the transition can be considered done already because we
do not support HMP as a stable interface.
> My current understanding is that QEMU provides new HMP commands for
> humans, but HMP is being phased out as an API.
It already did.
> 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.
Exactly.
> 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.
Maybe it's a matter of terminology, but I have the impression you're
talking about two things here:
1. HMP will always exist, in the meaning that qemu will always provide
a human interface. If we move it to a python script or some kind of
external process, that's an implementation detail.
This means that, if you're adding new functionality to qemu and it
does make sense for humans to use it, then it should have a HMP
version.
2. If you do add the HMP interface, that's for humans to consume and
its output/semantics should make sense for humans, not for management tools.
> 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.
>
> Stefan
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
2011-12-15 13:53 ` Stefan Hajnoczi
@ 2011-12-15 13:57 ` Jan Kiszka
2011-12-15 15:01 ` Luiz Capitulino
0 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2011-12-15 13:57 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Kevin Wolf, Lucas Meneghel Rodrigues, Anthony Liguori,
libvir-list@redhat.com, qemu-devel, Luiz Capitulino, Adam Litke
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 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.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
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:23 ` Stefan Hajnoczi
1 sibling, 1 reply; 17+ messages in thread
From: Anthony Liguori @ 2011-12-15 14:06 UTC (permalink / raw)
To: Luiz Capitulino
Cc: Kevin Wolf, Stefan Hajnoczi, qemu-devel, libvir-list, Adam Litke
On 12/15/2011 07:57 AM, Luiz Capitulino wrote:
> On Thu, 15 Dec 2011 13:02:40 +0000
> Stefan Hajnoczi<stefanha@gmail.com> wrote:
>
>> What is the status of QEMU's transition from HMP to the QMP interface?
>
> Depends on what you consider the transition to be.
>
> For management tools the transition can be considered done already because we
> do not support HMP as a stable interface.
>
>> My current understanding is that QEMU provides new HMP commands for
>> humans, but HMP is being phased out as an API.
>
> It already did.
>
>> 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.
>
> Exactly.
>
>> 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.
>
> Maybe it's a matter of terminology, but I have the impression you're
> talking about two things here:
>
> 1. HMP will always exist, in the meaning that qemu will always provide
> a human interface. If we move it to a python script or some kind of
> external process, that's an implementation detail.
>
> This means that, if you're adding new functionality to qemu and it
> does make sense for humans to use it, then it should have a HMP
> version.
>
> 2. If you do add the HMP interface, that's for humans to consume and
> its output/semantics should make sense for humans, not for management tools.
3. All HMP commands will be implemented in terms of QMP commands (and only in
terms of QMP commands).
There are still a lot of HMP commands that don't have an QMP analog. Luiz, it
might make sense to setup a wiki page which instructions on how to convert an
HMP command to a QMP command using QAPI.
If we did that, we could probably get more folks involved in the conversion process.
Regards,
Anthony Liguori
>
>> 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.
>>
>> Stefan
>>
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
2011-12-15 13:57 ` [Qemu-devel] " Luiz Capitulino
2011-12-15 14:06 ` Anthony Liguori
@ 2011-12-15 14:23 ` Stefan Hajnoczi
1 sibling, 0 replies; 17+ messages in thread
From: Stefan Hajnoczi @ 2011-12-15 14:23 UTC (permalink / raw)
To: Luiz Capitulino
Cc: Kevin Wolf, Anthony Liguori, libvir-list, qemu-devel, Adam Litke
On Thu, Dec 15, 2011 at 1:57 PM, Luiz Capitulino <lcapitulino@redhat.com> wrote:
> On Thu, 15 Dec 2011 13:02:40 +0000
> Stefan Hajnoczi <stefanha@gmail.com> wrote:
>
>> What is the status of QEMU's transition from HMP to the QMP interface?
>
> Depends on what you consider the transition to be.
>
> For management tools the transition can be considered done already because we
> do not support HMP as a stable interface.
>
>> My current understanding is that QEMU provides new HMP commands for
>> humans, but HMP is being phased out as an API.
>
> It already did.
>
>> 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.
>
> Exactly.
>
>> 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.
>
> Maybe it's a matter of terminology, but I have the impression you're
> talking about two things here:
>
> 1. HMP will always exist, in the meaning that qemu will always provide
> a human interface. If we move it to a python script or some kind of
> external process, that's an implementation detail.
>
> This means that, if you're adding new functionality to qemu and it
> does make sense for humans to use it, then it should have a HMP
> version.
>
> 2. If you do add the HMP interface, that's for humans to consume and
> its output/semantics should make sense for humans, not for management tools.
This entire email is useful, thanks. It feels like this should be
captured somewhere - on the wiki, in qemu/doc/, or as a comment in
monitor.c. That way anyone who wishes to contribute new monitor
commands will start with the right idea.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
2011-12-15 14:06 ` Anthony Liguori
@ 2011-12-15 14:52 ` Luiz Capitulino
2011-12-15 14:57 ` Anthony Liguori
0 siblings, 1 reply; 17+ messages in thread
From: Luiz Capitulino @ 2011-12-15 14:52 UTC (permalink / raw)
To: Anthony Liguori
Cc: Kevin Wolf, Stefan Hajnoczi, qemu-devel, libvir-list, Adam Litke
On Thu, 15 Dec 2011 08:06:41 -0600
Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 12/15/2011 07:57 AM, Luiz Capitulino wrote:
> > On Thu, 15 Dec 2011 13:02:40 +0000
> > Stefan Hajnoczi<stefanha@gmail.com> wrote:
> >
> >> What is the status of QEMU's transition from HMP to the QMP interface?
> >
> > Depends on what you consider the transition to be.
> >
> > For management tools the transition can be considered done already because we
> > do not support HMP as a stable interface.
> >
> >> My current understanding is that QEMU provides new HMP commands for
> >> humans, but HMP is being phased out as an API.
> >
> > It already did.
> >
> >> 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.
> >
> > Exactly.
> >
> >> 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.
> >
> > Maybe it's a matter of terminology, but I have the impression you're
> > talking about two things here:
> >
> > 1. HMP will always exist, in the meaning that qemu will always provide
> > a human interface. If we move it to a python script or some kind of
> > external process, that's an implementation detail.
> >
> > This means that, if you're adding new functionality to qemu and it
> > does make sense for humans to use it, then it should have a HMP
> > version.
> >
> > 2. If you do add the HMP interface, that's for humans to consume and
> > its output/semantics should make sense for humans, not for management tools.
>
> 3. All HMP commands will be implemented in terms of QMP commands (and only in
> terms of QMP commands).
Right.
> There are still a lot of HMP commands that don't have an QMP analog. Luiz, it
> might make sense to setup a wiki page which instructions on how to convert an
> HMP command to a QMP command using QAPI.
I wrote on how to write new QMP commands using the QAPI
(docs/writing-qmp-commands.txt), going from there to a conversion shouldn't
be difficult, but I can write a wiki page.
Btw, counting with a series I haven't posted yet, we have less than 10 QMP
commands left to be converted to the QAPI. I expect to start working on HMP
conversions in January.
> If we did that, we could probably get more folks involved in the conversion process.
That would be wonderful.
>
> Regards,
>
> Anthony Liguori
>
> >
> >> 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.
> >>
> >> Stefan
> >>
> >
> >
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
2011-12-15 14:52 ` Luiz Capitulino
@ 2011-12-15 14:57 ` Anthony Liguori
0 siblings, 0 replies; 17+ messages in thread
From: Anthony Liguori @ 2011-12-15 14:57 UTC (permalink / raw)
To: Luiz Capitulino
Cc: Kevin Wolf, Stefan Hajnoczi, qemu-devel, libvir-list, Adam Litke
On 12/15/2011 08:52 AM, Luiz Capitulino wrote:
> On Thu, 15 Dec 2011 08:06:41 -0600
> Anthony Liguori<anthony@codemonkey.ws> wrote:
>
>> There are still a lot of HMP commands that don't have an QMP analog. Luiz, it
>> might make sense to setup a wiki page which instructions on how to convert an
>> HMP command to a QMP command using QAPI.
>
> I wrote on how to write new QMP commands using the QAPI
> (docs/writing-qmp-commands.txt), going from there to a conversion shouldn't
> be difficult, but I can write a wiki page.
>
> Btw, counting with a series I haven't posted yet, we have less than 10 QMP
> commands left to be converted to the QAPI. I expect to start working on HMP
> conversions in January.
That is awesome!
Regards,
Anthony Liguori
>
>> If we did that, we could probably get more folks involved in the conversion process.
>
> That would be wonderful.
>
>>
>> Regards,
>>
>> Anthony Liguori
>>
>>>
>>>> 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.
>>>>
>>>> Stefan
>>>>
>>>
>>>
>>
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] Transitioning from HMP to QMP for QEMU
2011-12-15 13:57 ` Jan Kiszka
@ 2011-12-15 15:01 ` Luiz Capitulino
0 siblings, 0 replies; 17+ messages in thread
From: Luiz Capitulino @ 2011-12-15 15:01 UTC (permalink / raw)
To: Jan Kiszka
Cc: Kevin Wolf, Lucas Meneghel Rodrigues, Anthony Liguori,
libvir-list@redhat.com, Stefan Hajnoczi, qemu-devel, Adam Litke
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
>
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2011-12-15 15:01 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).