hmp: add virtio commands

This patch implements the HMP versions of the virtio QMP commands.

[Jonah: Adjusted hmp monitor output format for features / statuses
	with their descriptions.]

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-7-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Laurent Vivier 2022-08-11 08:24:44 -04:00 committed by Michael S. Tsirkin
parent 1ee7bb5bef
commit 8a8287981d
3 changed files with 385 additions and 0 deletions

View file

@ -923,3 +923,73 @@ SRST
``stats``
Show runtime-collected statistics
ERST
{
.name = "virtio",
.args_type = "",
.params = "",
.help = "List all available virtio devices",
.cmd = hmp_virtio_query,
.flags = "p",
},
SRST
``info virtio``
List all available virtio devices
ERST
{
.name = "virtio-status",
.args_type = "path:s",
.params = "path",
.help = "Display status of a given virtio device",
.cmd = hmp_virtio_status,
.flags = "p",
},
SRST
``info virtio-status`` *path*
Display status of a given virtio device
ERST
{
.name = "virtio-queue-status",
.args_type = "path:s,queue:i",
.params = "path queue",
.help = "Display status of a given virtio queue",
.cmd = hmp_virtio_queue_status,
.flags = "p",
},
SRST
``info virtio-queue-status`` *path* *queue*
Display status of a given virtio queue
ERST
{
.name = "virtio-vhost-queue-status",
.args_type = "path:s,queue:i",
.params = "path queue",
.help = "Display status of a given vhost queue",
.cmd = hmp_vhost_queue_status,
.flags = "p",
},
SRST
``info virtio-vhost-queue-status`` *path* *queue*
Display status of a given vhost queue
ERST
{
.name = "virtio-queue-element",
.args_type = "path:s,queue:i,index:i?",
.params = "path queue [index]",
.help = "Display element of a given virtio queue",
.cmd = hmp_virtio_queue_element,
.flags = "p",
},
SRST
``info virtio-queue-element`` *path* *queue* [*index*]
Display element of a given virtio queue
ERST