On 5/7/20 6:49 AM, Laurent Vivier wrote:
This patch implements HMP version of the virtio QMP commands
Signed-off-by: Laurent Vivier <lviv...@redhat.com>
Most HMP commands do not use '-' in their name. Also, HMP doesn't
promise api compatibility; so we could just name this 'info virtio' or
'debug_virtio' without an x- prefix, with no real loss.
---
Makefile | 2 +-
Makefile.target | 7 +-
docs/system/monitor.rst | 2 +
hmp-commands-virtio.hx | 160 +++++++++++++++++++++++++++++++++
hmp-commands.hx | 10 +++
hw/virtio/virtio.c | 193 +++++++++++++++++++++++++++++++++++++++-
include/monitor/hmp.h | 4 +
monitor/misc.c | 17 ++++
8 files changed, 391 insertions(+), 4 deletions(-)
create mode 100644 hmp-commands-virtio.hx
+SRST
+``x-debug-virtio`` *subcommand*
+ Show various information about virtio.
+
+ Example:
+
+ List all sub-commands::
+
+ (qemu) x-debug-virtio
+ x-debug-virtio query -- List all available virtio devices
+ x-debug-virtio status path -- Display status of a given virtio device
+ x-debug-virtio queue-status path queue -- Display status of a given virtio
queue
+ x-debug-virtio queue-element path queue [index] -- Display element of a
given virtio queue
Oh, you're introducing it as a metacommand (like 'info' already is) with
several subcommands. Still, naming it 'virtio' instead of
'x-debug-virtio' would make sense to me, even though the underlying QMP
commands are (correctly) in the x-debug- namespace.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org