All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Jonah Palmer <jonah.palmer@oracle.com>
Cc: mst@redhat.com, qemu_oss@crudebyte.com, qemu-devel@nongnu.org,
	kraxel@redhat.com, si-wei.liu@oracle.com,
	joao.m.martins@oracle.com, eblake@redhat.com,
	qemu-block@nongnu.org, david@redhat.com, arei.gonglei@huawei.com,
	marcandre.lureau@redhat.com, lvivier@redhat.com,
	thuth@redhat.com, michael.roth@amd.com, groug@kaod.org,
	dgilbert@redhat.com, eric.auger@redhat.com, stefanha@redhat.com,
	boris.ostrovsky@oracle.com, kwolf@redhat.com,
	mathieu.poirier@linaro.org, raphael.norwitz@nutanix.com,
	pbonzini@redhat.com
Subject: Re: [PATCH v8 8/8] hmp: add virtio commands
Date: Fri, 05 Nov 2021 08:23:22 +0100	[thread overview]
Message-ID: <87fssb5amt.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1635334909-31614-9-git-send-email-jonah.palmer@oracle.com> (Jonah Palmer's message of "Wed, 27 Oct 2021 07:41:49 -0400")

Jonah Palmer <jonah.palmer@oracle.com> writes:

> From: Laurent Vivier <lvivier@redhat.com>
>
> This patch implements the HMP versions of the virtio QMP commands.
>
> Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
> ---
>  docs/system/monitor.rst |   2 +
>  hmp-commands-virtio.hx  | 250 ++++++++++++++++++++++++++++++++++
>  hmp-commands.hx         |  10 ++
>  hw/virtio/virtio.c      | 355 ++++++++++++++++++++++++++++++++++++++++++++++++
>  include/monitor/hmp.h   |   5 +
>  meson.build             |   1 +
>  monitor/misc.c          |  17 +++
>  7 files changed, 640 insertions(+)
>  create mode 100644 hmp-commands-virtio.hx
>
> diff --git a/docs/system/monitor.rst b/docs/system/monitor.rst
> index ff5c434..10418fc 100644
> --- a/docs/system/monitor.rst
> +++ b/docs/system/monitor.rst
> @@ -21,6 +21,8 @@ The following commands are available:
>  
>  .. hxtool-doc:: hmp-commands.hx
>  
> +.. hxtool-doc:: hmp-commands-virtio.hx
> +
>  .. hxtool-doc:: hmp-commands-info.hx
>  
>  Integer expressions
> diff --git a/hmp-commands-virtio.hx b/hmp-commands-virtio.hx
> new file mode 100644
> index 0000000..36aab94
> --- /dev/null
> +++ b/hmp-commands-virtio.hx
> @@ -0,0 +1,250 @@
> +HXCOMM Use DEFHEADING() to define headings in both help text and rST.
> +HXCOMM Text between SRST and ERST is copied to the rST version and
> +HXCOMM discarded from C version.
> +HXCOMM
> +HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
> +HXCOMM monitor info commands.
> +HXCOMM
> +HXCOMM HXCOMM can be used for comments, discarded from both rST and C.
> +HXCOMM
> +HXCOMM In this file, generally SRST fragments should have two extra
> +HXCOMM spaces of indent, so that the documentation list item for "virtio cmd"
> +HXCOMM appears inside the documentation list item for the top level
> +HXCOMM "virtio" documentation entry. The exception is the first SRST
> +HXCOMM fragment that defines that top level entry.
> +
> +SRST
> +  ``virtio`` *subcommand*
> +  Show various information about virtio
> +
> +  Example:
> +
> +  List all sub-commands::
> +
> +  (qemu) virtio
> +  virtio query  -- List all available virtio devices

I get:

    qemu/docs/../hmp-commands-virtio.hx:25:Inconsistent literal block quoting.

> +  virtio status path -- Display status of a given virtio device
> +  virtio queue-status path queue -- Display status of a given virtio queue
> +  virtio vhost-queue-status path queue -- Display status of a given vhost queue
> +  virtio queue-element path queue [index] -- Display element of a given virtio queue
> +
> +ERST

[...]

> diff --git a/monitor/misc.c b/monitor/misc.c
> index ffe7966..5e4cd88 100644
> --- a/monitor/misc.c
> +++ b/monitor/misc.c
> @@ -23,6 +23,7 @@
>   */
>  
>  #include "qemu/osdep.h"
> +#include CONFIG_DEVICES
>  #include "monitor-internal.h"
>  #include "monitor/qdev.h"
>  #include "hw/usb.h"
> @@ -219,6 +220,15 @@ static void hmp_info_help(Monitor *mon, const QDict *qdict)
>      help_cmd(mon, "info");
>  }
>  
> +static void hmp_virtio_help(Monitor *mon, const QDict *qdict)
> +{
> +#if defined(CONFIG_VIRTIO)
> +    help_cmd(mon, "virtio");

Probably not your patch's fault: extra space before '--' in the line

    virtio query  -- List all available virtio devices

> +#else
> +    monitor_printf(mon, "Virtio is disabled\n");
> +#endif
> +}
> +
>  static void monitor_init_qmp_commands(void)
>  {
>      /*
> @@ -1433,6 +1443,13 @@ static HMPCommand hmp_info_cmds[] = {
>      { NULL, NULL, },
>  };
>  
> +static HMPCommand hmp_virtio_cmds[] = {
> +#if defined(CONFIG_VIRTIO)
> +#include "hmp-commands-virtio.h"
> +#endif
> +    { NULL, NULL, },
> +};
> +
>  /* hmp_cmds and hmp_info_cmds would be sorted at runtime */
>  HMPCommand hmp_cmds[] = {
>  #include "hmp-commands.h"



  reply	other threads:[~2021-11-05  7:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 11:41 [PATCH v8 0/8] hmp,qmp: Add commands to introspect virtio devices Jonah Palmer
2021-10-27 11:41 ` [PATCH v8 1/8] virtio: drop name parameter for virtio_init() Jonah Palmer
2021-10-27 11:41 ` [PATCH v8 2/8] virtio: add vhost support for virtio devices Jonah Palmer
2021-10-27 11:41 ` [PATCH v8 3/8] qmp: add QMP command x-debug-query-virtio Jonah Palmer
2021-11-04 15:15   ` Markus Armbruster
2021-11-05  8:24     ` Jonah Palmer
2021-10-27 11:41 ` [PATCH v8 4/8] qmp: add QMP command x-debug-virtio-status Jonah Palmer
2021-11-04 15:37   ` Markus Armbruster
2021-11-05  8:36     ` Jonah Palmer
2021-10-27 11:41 ` [PATCH v8 5/8] qmp: decode feature & status bits in virtio-status Jonah Palmer
2021-10-27 11:59   ` David Hildenbrand
2021-10-27 12:18     ` Laurent Vivier
2021-10-28  7:56       ` Jonah Palmer
2021-10-28  7:57         ` David Hildenbrand
2021-10-27 11:41 ` [PATCH v8 6/8] qmp: add QMP commands for virtio/vhost queue-status Jonah Palmer
2021-10-27 11:41 ` [PATCH v8 7/8] qmp: add QMP command x-debug-virtio-queue-element Jonah Palmer
2021-10-27 11:41 ` [PATCH v8 8/8] hmp: add virtio commands Jonah Palmer
2021-11-05  7:23   ` Markus Armbruster [this message]
2021-11-05  8:40     ` Jonah Palmer
2021-10-27 11:55 ` [PATCH v8 0/8] hmp, qmp: Add commands to introspect virtio devices Daniel P. Berrangé
2021-10-28  7:54   ` Jonah Palmer
2021-10-28  9:04     ` Dr. David Alan Gilbert
2021-11-05  7:26   ` Markus Armbruster
2021-11-05  8:58     ` Jonah Palmer
2021-11-05  8:50 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fssb5amt.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=groug@kaod.org \
    --cc=joao.m.martins@oracle.com \
    --cc=jonah.palmer@oracle.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=michael.roth@amd.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    --cc=raphael.norwitz@nutanix.com \
    --cc=si-wei.liu@oracle.com \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.