aboutsummaryrefslogtreecommitdiff
path: root/qemu-options.hx
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2023-05-15 17:22:45 +0100
committerMarkus Armbruster <armbru@redhat.com>2023-05-22 10:22:29 +0200
commit0ec4468f233c53eb854f204d105d965455deec51 (patch)
tree096cec0e23dc06d073e66feea1a25c11cfedb276 /qemu-options.hx
parent8a85b8ec3da7f6b5edddb4e142807785044c748e (diff)
docs/interop: Delete qmp-intro.txt
qmp-intro.txt is quite small and provides very little information that isn't already in the documentation elsewhere. Fold the example command lines into qemu-options.hx, and delete the now-unneeded plain text document. While we're touching the qemu-options.hx documentation text, wordsmith it a little bit and improve the rST formatting. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230515162245.3964307-4-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r--qemu-options.hx28
1 files changed, 22 insertions, 6 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index 30690d9c3f..e4566149ee 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -4170,26 +4170,42 @@ DEF("qmp", HAS_ARG, QEMU_OPTION_qmp, \
QEMU_ARCH_ALL)
SRST
``-qmp dev``
- Like -monitor but opens in 'control' mode.
+ Like ``-monitor`` but opens in 'control' mode. For example, to make
+ QMP available on localhost port 4444::
+
+ -qmp tcp:localhost:4444,server=on,wait=off
+
+ Not all options are configurable via this syntax; for maximum
+ flexibility use the ``-mon`` option and an accompanying ``-chardev``.
+
ERST
DEF("qmp-pretty", HAS_ARG, QEMU_OPTION_qmp_pretty, \
"-qmp-pretty dev like -qmp but uses pretty JSON formatting\n",
QEMU_ARCH_ALL)
SRST
``-qmp-pretty dev``
- Like -qmp but uses pretty JSON formatting.
+ Like ``-qmp`` but uses pretty JSON formatting.
ERST
DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
"-mon [chardev=]name[,mode=readline|control][,pretty[=on|off]]\n", QEMU_ARCH_ALL)
SRST
``-mon [chardev=]name[,mode=readline|control][,pretty[=on|off]]``
- Setup monitor on chardev name. ``mode=control`` configures
- a QMP monitor (a JSON RPC-style protocol) and it is not the
- same as HMP, the human monitor that has a "(qemu)" prompt.
- ``pretty`` is only valid when ``mode=control``,
+ Set up a monitor connected to the chardev ``name``.
+ QEMU supports two monitors: the Human Monitor Protocol
+ (HMP; for human interaction), and the QEMU Monitor Protocol
+ (QMP; a JSON RPC-style protocol).
+ The default is HMP; ``mode=control`` selects QMP instead.
+ ``pretty`` is only valid when ``mode=control``,
turning on JSON pretty printing to ease
human reading and debugging.
+
+ For example::
+
+ -chardev socket,id=mon1,host=localhost,port=4444,server=on,wait=off \
+ -mon chardev=mon1,mode=control,pretty=on
+
+ enables the QMP monitor on localhost port 4444 with pretty-printing.
ERST
DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \