[PATCH 2/4] hmp*hx: Move info docs

dave@treblig.org posted 4 patches 3 weeks, 4 days ago
Maintainers: "Dr. David Alan Gilbert" <dave@treblig.org>
There is a newer version of this series
[PATCH 2/4] hmp*hx: Move info docs
Posted by dave@treblig.org 3 weeks, 4 days ago
From: "Dr. David Alan Gilbert" <dave@treblig.org>

Move the docs for the info subcommand from the separate hx
into the top level file next to the 'info' command itself.
That makes every command in the top level file have a RST section.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 hmp-commands-info.hx |  9 +--------
 hmp-commands.hx      | 27 +++++++++++++++++----------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
index 74c741f80e..964eed004c 100644
--- a/hmp-commands-info.hx
+++ b/hmp-commands-info.hx
@@ -8,14 +8,7 @@ HXCOMM
 HXCOMM In this file, generally SRST fragments should have two extra
 HXCOMM spaces of indent, so that the documentation list item for "info foo"
 HXCOMM appears inside the documentation list item for the top level
-HXCOMM "info" documentation entry. The exception is the first SRST
-HXCOMM fragment that defines that top level entry.
-
-SRST
-``info`` *subcommand*
-  Show various information about the system state.
-
-ERST
+HXCOMM "info" documentation entry.
 
     {
         .name       = "version",
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 5cc4788f12..f4a6eeda93 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1814,16 +1814,6 @@ SRST
   command.
 ERST
 
-    {
-        .name       = "info",
-        .args_type  = "item:s?",
-        .params     = "[subcommand]",
-        .help       = "show various information about the system state",
-        .cmd        = hmp_info_help,
-        .sub_table  = hmp_info_cmds,
-        .flags      = "p",
-    },
-
 #if defined(CONFIG_FDT)
     {
         .name       = "dumpdtb",
@@ -1867,3 +1857,20 @@ SRST
   List event channels in the guest
 ERST
 #endif
+
+HXCOMM *** MUST BE LAST ENTRY **
+    {
+        .name       = "info",
+        .args_type  = "item:s?",
+        .params     = "[subcommand]",
+        .help       = "show various information about the system state",
+        .cmd        = hmp_info_help,
+        .sub_table  = hmp_info_cmds,
+        .flags      = "p",
+    },
+
+SRST
+``info`` *subcommand*
+  Show various information about the system state.
+ERST
+HXCOMM *** MUST BE LAST ENTRY **
-- 
2.52.0
Re: [PATCH 2/4] hmp*hx: Move info docs
Posted by Markus Armbruster 3 weeks, 4 days ago
dave@treblig.org writes:

> From: "Dr. David Alan Gilbert" <dave@treblig.org>
>
> Move the docs for the info subcommand from the separate hx
> into the top level file next to the 'info' command itself.
> That makes every command in the top level file have a RST section.
>
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>

Generated HTML changes slightly, diff appended.  Shows as vertical space
differences in Firefox.  Do we care?


--- bld-docs/docs.old/manual/system/monitor.html	2026-01-15 12:30:17.300968723 +0100
+++ bld-docs/docs/manual/system/monitor.html	2026-01-15 12:55:43.909694634 +0100
@@ -601,10 +601,11 @@ command.</p>
 </dd>
 <dt><code class="docutils literal notranslate"><span class="pre">xen-event-list</span></code></dt><dd><p>List event channels in the guest</p>
 </dd>
-</dl>
-<dl>
 <dt><code class="docutils literal notranslate"><span class="pre">info</span></code> <em>subcommand</em></dt><dd><p>Show various information about the system state.</p>
-<dl>
+</dd>
+</dl>
+<blockquote>
+<div><dl>
 <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">version</span></code></dt><dd><p>Show the version of QEMU.</p>
 </dd>
 <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">network</span></code></dt><dd><p>Show the network state.</p>
@@ -639,8 +640,6 @@ command.</p>
 </dd>
 <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">jit</span></code></dt><dd><p>Show dynamic compiler info.</p>
 </dd>
-<dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">accel</span></code></dt><dd><p>Show accelerator statistics.</p>
-</dd>
 <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">sync-profile</span> <span class="pre">[-m|-n]</span></code> [<em>max</em>]</dt><dd><p>Show synchronization profiling info, up to <em>max</em> entries (default: 10),
 sorted by total wait time.</p>
 <dl class="simple">
@@ -653,6 +652,8 @@ sorted by total wait time.</p>
 the “Object” field shows—enclosed in brackets—the number of objects
 being coalesced.</p>
 </dd>
+<dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">accel</span></code></dt><dd><p>Show accelerator statistics.</p>
+</dd>
 <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">kvm</span></code></dt><dd><p>Show KVM information.</p>
 </dd>
 <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">accelerators</span></code></dt><dd><p>Show which accelerators are compiled into a QEMU binary, and what accelerator
@@ -765,8 +766,7 @@ enabled) memory in bytes.</p>
 <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">firmware-log</span></code></dt><dd><p>Show the firmware (ovmf) debug log.</p>
 </dd>
 </dl>
-</dd>
-</dl>
+</div></blockquote>
 </section>
 <section id="integer-expressions">
 <h2>Integer expressions<a class="headerlink" href="#integer-expressions" title="Link to this heading"></a></h2>
Re: [PATCH 2/4] hmp*hx: Move info docs
Posted by Dr. David Alan Gilbert 3 weeks, 3 days ago
* Markus Armbruster (armbru@redhat.com) wrote:
> dave@treblig.org writes:
> 
> > From: "Dr. David Alan Gilbert" <dave@treblig.org>
> >
> > Move the docs for the info subcommand from the separate hx
> > into the top level file next to the 'info' command itself.
> > That makes every command in the top level file have a RST section.
> >
> > Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> 
> Generated HTML changes slightly, diff appended.  Shows as vertical space
> differences in Firefox.  Do we care?

It looked OK to me in Firefox, is there a bit that looks wrong/bad to you?

Dave

> 
> --- bld-docs/docs.old/manual/system/monitor.html	2026-01-15 12:30:17.300968723 +0100
> +++ bld-docs/docs/manual/system/monitor.html	2026-01-15 12:55:43.909694634 +0100
> @@ -601,10 +601,11 @@ command.</p>
>  </dd>
>  <dt><code class="docutils literal notranslate"><span class="pre">xen-event-list</span></code></dt><dd><p>List event channels in the guest</p>
>  </dd>
> -</dl>
> -<dl>
>  <dt><code class="docutils literal notranslate"><span class="pre">info</span></code> <em>subcommand</em></dt><dd><p>Show various information about the system state.</p>
> -<dl>
> +</dd>
> +</dl>
> +<blockquote>
> +<div><dl>
>  <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">version</span></code></dt><dd><p>Show the version of QEMU.</p>
>  </dd>
>  <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">network</span></code></dt><dd><p>Show the network state.</p>
> @@ -639,8 +640,6 @@ command.</p>
>  </dd>
>  <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">jit</span></code></dt><dd><p>Show dynamic compiler info.</p>
>  </dd>
> -<dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">accel</span></code></dt><dd><p>Show accelerator statistics.</p>
> -</dd>
>  <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">sync-profile</span> <span class="pre">[-m|-n]</span></code> [<em>max</em>]</dt><dd><p>Show synchronization profiling info, up to <em>max</em> entries (default: 10),
>  sorted by total wait time.</p>
>  <dl class="simple">
> @@ -653,6 +652,8 @@ sorted by total wait time.</p>
>  the “Object” field shows—enclosed in brackets—the number of objects
>  being coalesced.</p>
>  </dd>
> +<dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">accel</span></code></dt><dd><p>Show accelerator statistics.</p>
> +</dd>
>  <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">kvm</span></code></dt><dd><p>Show KVM information.</p>
>  </dd>
>  <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">accelerators</span></code></dt><dd><p>Show which accelerators are compiled into a QEMU binary, and what accelerator
> @@ -765,8 +766,7 @@ enabled) memory in bytes.</p>
>  <dt><code class="docutils literal notranslate"><span class="pre">info</span> <span class="pre">firmware-log</span></code></dt><dd><p>Show the firmware (ovmf) debug log.</p>
>  </dd>
>  </dl>
> -</dd>
> -</dl>
> +</div></blockquote>
>  </section>
>  <section id="integer-expressions">
>  <h2>Integer expressions<a class="headerlink" href="#integer-expressions" title="Link to this heading"></a></h2>
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

Re: [PATCH 2/4] hmp*hx: Move info docs
Posted by Markus Armbruster 3 weeks, 3 days ago
"Dr. David Alan Gilbert" <dave@treblig.org> writes:

> * Markus Armbruster (armbru@redhat.com) wrote:
>> dave@treblig.org writes:
>> 
>> > From: "Dr. David Alan Gilbert" <dave@treblig.org>
>> >
>> > Move the docs for the info subcommand from the separate hx
>> > into the top level file next to the 'info' command itself.
>> > That makes every command in the top level file have a RST section.
>> >
>> > Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
>> 
>> Generated HTML changes slightly, diff appended.  Shows as vertical space
>> differences in Firefox.  Do we care?
>
> It looked OK to me in Firefox, is there a bit that looks wrong/bad to you?

The vertical spacing around "info subcommand" changes.

Old: extra space between "xen-event-list" and "info subcommand" compared
to between other commands.

New: extra space between "info subcommand"'s doc text and "info
version".

Hypothesis: the extra space is at the boundary between hmp-commands.hx
and hmp-commands-info.hx.

I dislike the old extra space a bit less, but no big deal either way.

[...]