Daniel P. Berrangé <[email protected]> writes:
> Add new docs for the `-object monitor-hmp` and `-object monitor-qmp`
> options, updating `-mon` to state that it is legacy syntax sugar
> for the new `-object` args.
>
> Reviewed-by: Marc-André Lureau <[email protected]>
> Tested-by: Peter Krempa <[email protected]>
> Signed-off-by: Daniel P. Berrangé <[email protected]>
> ---
> qemu-options.hx | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index c799286153..a804d5b880 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -4980,6 +4980,16 @@ SRST
> -mon chardev=mon1,mode=control,pretty=on
>
> enables the QMP monitor on localhost port 4444 with pretty-printing.
> +
> + The use of ``-mon mode=readline`` is historical syntax sugar
> + for the new ``-object monitor-hmp`` option, each use of which
> + creates an object with the ID ``hmpcompatNNN`` where ``NNN`` is
> + a counter starting from 0.
> +
> + The use of ``-mon mode=control`` is historical syntax sugar
> + for the new ``-object monitor-qmp`` option, each use of which
> + creates an object with the ID ``qmpcompatNNN`` where ``NNN`` is
> + a counter starting from 0.
> ERST
Should we document how -monitor, -qmp, and -qmp-pretty map to -object
and -chardev?
>
> DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \
> @@ -5730,6 +5740,45 @@ SRST
> they are specified. Note that the 'id' property must be set. These
> objects are placed in the '/objects' path.
>
> + ``-object monitor-hmp,id=id,chardev=chardev_id,readline=on|off``
> + Set up a monitor running the Human Monitor Protocol,
> + connected to the chardev ``chardev_id``.
> +
> + The ``id`` parameter is a unique ID that can be used
> + to dynamically delete the monitor at runtime. Note
> + that monitors created using the historical syntax
> + will be allocated IDs following the pattern ``hmpcompatNN``.
> + Mixing ``-object`` with the historical monitor syntax is
> + discouraged.
> +
> + The ``readline`` parameter, which defaults to ``on``,
> + controls whether the monitor provides line editing.
> +
> + ``-object
> monitor-qmp,id=id,chardev=chardev_id,pretty=on|off,close-action=none|delete``
> + Set up a monitor running the QEMU Monitor Protocol,
> + connected to the chardev ``chardev_id``.
> +
> + The ``id`` parameter is a unique ID that can be used
> + to dynamically delete the monitor at runtime. Note
> + that monitors created using the historical syntax
> + will be allocated IDs following the pattern ``qmpcompatNN``.
> + Mixing ``-object`` with the historical monitor syntax is
> + discouraged.
> +
> + The ``pretty`` parameter, which defaults to ``off``,
> + controls whether the monitor responses are pretty
> + printed as multi-line indented JSON, as opposed to
> + constrained to a single line without extraneous
> + whitespace.
> +
> + The ``close-action`` parameter, which defaults to ``none``,
> + controls what happens when the connection to the monitor
> + is terminated by the user. If set to ``delete``, then the
> + ``monitor-qmp`` object and its associated character
> + device are both immediately deleted. This can be useful
> + if an extra monitor was hotplugged for a specific task
> + and should be unplugged when completed.
> +
> ``-object
> memory-backend-file,id=id,size=size,mem-path=dir,share=on|off,discard-data=on|off,merge=on|off,dump=on|off,prealloc=on|off,host-nodes=host-nodes,policy=default|preferred|bind|interleave,align=align,offset=offset,readonly=on|off,rom=on|off|auto``
> Creates a memory file backend object, which can be used to back
> the guest RAM with huge pages.