[PATCH v3 05/19] docs/devel: document expectations for HMP commands in the future

Daniel P. Berrangé posted 19 patches 4 years, 4 months ago
There is a newer version of this series
[PATCH v3 05/19] docs/devel: document expectations for HMP commands in the future
Posted by Daniel P. Berrangé 4 years, 4 months ago
We no longer wish to have commands implemented in HMP only. All commands
should start with a QMP implementation and the HMP merely be a shim
around this. To reduce the burden of implementing QMP commands where
there is low expectation of machine usage, requirements for QAPI
modelling are relaxed provided the command is under the "x-" name
prefix.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 docs/devel/writing-monitor-commands.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/docs/devel/writing-monitor-commands.rst b/docs/devel/writing-monitor-commands.rst
index 82a382d700..8fb855e192 100644
--- a/docs/devel/writing-monitor-commands.rst
+++ b/docs/devel/writing-monitor-commands.rst
@@ -11,6 +11,14 @@ For an in-depth introduction to the QAPI framework, please refer to
 docs/devel/qapi-code-gen.txt. For documentation about the QMP protocol,
 start with docs/interop/qmp-intro.txt.
 
+New commands may be implemented in QMP only.  New HMP commands should be
+implemented on top of QMP.  The typical HMP command wraps around an
+equivalent QMP command, but HMP convenience commands built from QMP
+building blocks are also fine.  The long term goal is to make all
+existing HMP commands conform to this, to fully isolate HMP from the
+internals of QEMU. Refer to the `Writing a debugging aid returning
+unstructured text`_ section for further guidance on commands that
+would have traditionally been HMP only.
 
 Overview
 --------
-- 
2.31.1


Re: [PATCH v3 05/19] docs/devel: document expectations for HMP commands in the future
Posted by Eric Blake 4 years, 4 months ago
On Thu, Sep 30, 2021 at 02:23:35PM +0100, Daniel P. Berrangé wrote:
> We no longer wish to have commands implemented in HMP only. All commands
> should start with a QMP implementation and the HMP merely be a shim
> around this. To reduce the burden of implementing QMP commands where
> there is low expectation of machine usage, requirements for QAPI
> modelling are relaxed provided the command is under the "x-" name
> prefix.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  docs/devel/writing-monitor-commands.rst | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Re: [PATCH v3 05/19] docs/devel: document expectations for HMP commands in the future
Posted by Markus Armbruster 4 years, 3 months ago
Daniel P. Berrangé <berrange@redhat.com> writes:

> We no longer wish to have commands implemented in HMP only. All commands
> should start with a QMP implementation and the HMP merely be a shim
> around this. To reduce the burden of implementing QMP commands where
> there is low expectation of machine usage, requirements for QAPI
> modelling are relaxed provided the command is under the "x-" name
> prefix.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  docs/devel/writing-monitor-commands.rst | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/docs/devel/writing-monitor-commands.rst b/docs/devel/writing-monitor-commands.rst
> index 82a382d700..8fb855e192 100644
> --- a/docs/devel/writing-monitor-commands.rst
> +++ b/docs/devel/writing-monitor-commands.rst
> @@ -11,6 +11,14 @@ For an in-depth introduction to the QAPI framework, please refer to
>  docs/devel/qapi-code-gen.txt. For documentation about the QMP protocol,
>  start with docs/interop/qmp-intro.txt.
>  
> +New commands may be implemented in QMP only.  New HMP commands should be
> +implemented on top of QMP.  The typical HMP command wraps around an
> +equivalent QMP command, but HMP convenience commands built from QMP
> +building blocks are also fine.  The long term goal is to make all
> +existing HMP commands conform to this, to fully isolate HMP from the
> +internals of QEMU. Refer to the `Writing a debugging aid returning
> +unstructured text`_ section for further guidance on commands that
> +would have traditionally been HMP only.
>  
>  Overview
>  --------

Reviewed-by: Markus Armbruster <armbru@redhat.com>