qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] docs/sphinx: change default `role` to "any"
@ 2021-10-04 21:52 John Snow
  2021-10-04 21:52 ` [PATCH v4 1/3] docs: remove non-reference uses of single backticks John Snow
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: John Snow @ 2021-10-04 21:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Alexander Bulekov,
	Alex Bennée, Markus Armbruster, Qiuhao Li, John Snow,
	Darren Kenny, Bandan Das, Stefan Hajnoczi, Paolo Bonzini,
	Alexandre Iooss, Mahmoud Mandour, Eric Blake

V4: Fixed more occurrences that have occurred since V3.

V3: Removed bad rebase confetti
    fixed the OSS-Fuzz link to ... actually be a link.

(Patch 2 can be squashed into patch 1 on merge, but this keeps the diff
easy to see and review.)

--js

John Snow (3):
  docs: remove non-reference uses of single backticks
  docs: (further) remove non-reference uses of single backticks
  docs/sphinx: change default role to "any"

 docs/conf.py                           | 5 +++++
 docs/devel/fuzzing.rst                 | 9 +++++----
 docs/devel/tcg-plugins.rst             | 2 +-
 docs/interop/live-block-operations.rst | 2 +-
 docs/system/guest-loader.rst           | 2 +-
 docs/system/i386/sgx.rst               | 6 +++---
 qapi/block-core.json                   | 4 ++--
 include/qemu/module.h                  | 6 +++---
 qemu-options.hx                        | 4 ++--
 9 files changed, 23 insertions(+), 17 deletions(-)

-- 
2.31.1




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v4 1/3] docs: remove non-reference uses of single backticks
  2021-10-04 21:52 [PATCH v4 0/3] docs/sphinx: change default `role` to "any" John Snow
@ 2021-10-04 21:52 ` John Snow
  2021-10-04 21:52 ` [PATCH v4 2/3] docs: (further) " John Snow
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: John Snow @ 2021-10-04 21:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Alexander Bulekov,
	Alex Bennée, Markus Armbruster, Qiuhao Li, John Snow,
	Darren Kenny, Bandan Das, Stefan Hajnoczi, Paolo Bonzini,
	Alexandre Iooss, Mahmoud Mandour, Eric Blake

The single backtick markup in ReST is the "default role". Currently,
Sphinx's default role is called "content". Sphinx suggests you can use
the "Any" role instead to turn any single-backtick enclosed item into a
cross-reference.

This is useful for things like autodoc for Python docstrings, where it's
often nicer to reference other types with `foo` instead of the more
laborious :py:meth:`foo`. It's also useful in multi-domain cases to
easily reference definitions from other Sphinx domains, such as
referencing C code definitions from outside of kerneldoc comments.

Before we do that, though, we'll need to turn all existing usages of the
"content" role to inline verbatim markup wherever it does not correctly
resolve into a cross-refernece by using double backticks instead.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
---
 docs/devel/fuzzing.rst                 | 9 +++++----
 docs/devel/tcg-plugins.rst             | 2 +-
 docs/interop/live-block-operations.rst | 2 +-
 docs/system/guest-loader.rst           | 2 +-
 qapi/block-core.json                   | 4 ++--
 include/qemu/module.h                  | 6 +++---
 qemu-options.hx                        | 4 ++--
 7 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst
index 2749bb9bed3..784ecb99e66 100644
--- a/docs/devel/fuzzing.rst
+++ b/docs/devel/fuzzing.rst
@@ -182,10 +182,11 @@ The output should contain a complete list of matched MemoryRegions.
 
 OSS-Fuzz
 --------
-QEMU is continuously fuzzed on `OSS-Fuzz` __(https://github.com/google/oss-fuzz).
-By default, the OSS-Fuzz build will try to fuzz every fuzz-target. Since the
-generic-fuzz target requires additional information provided in environment
-variables, we pre-define some generic-fuzz configs in
+QEMU is continuously fuzzed on `OSS-Fuzz
+<https://github.com/google/oss-fuzz>`_.  By default, the OSS-Fuzz build
+will try to fuzz every fuzz-target. Since the generic-fuzz target
+requires additional information provided in environment variables, we
+pre-define some generic-fuzz configs in
 ``tests/qtest/fuzz/generic_fuzz_configs.h``. Each config must specify:
 
 - ``.name``: To identify the fuzzer config
diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
index 842ae01a4c5..72a1cd932ca 100644
--- a/docs/devel/tcg-plugins.rst
+++ b/docs/devel/tcg-plugins.rst
@@ -211,7 +211,7 @@ The hotpages plugin can be configured using the following arguments:
 
 This is an instruction classifier so can be used to count different
 types of instructions. It has a number of options to refine which get
-counted. You can give a value to the `count` argument for a class of
+counted. You can give a value to the ``count`` argument for a class of
 instructions to break it down fully, so for example to see all the system
 registers accesses::
 
diff --git a/docs/interop/live-block-operations.rst b/docs/interop/live-block-operations.rst
index 9e3635b2338..814c29bbe1d 100644
--- a/docs/interop/live-block-operations.rst
+++ b/docs/interop/live-block-operations.rst
@@ -640,7 +640,7 @@ at this point:
         (QEMU) block-job-complete device=job0
 
 In either of the above cases, if you once again run the
-`query-block-jobs` command, there should not be any active block
+``query-block-jobs`` command, there should not be any active block
 operation.
 
 Comparing 'commit' and 'mirror': In both then cases, the overlay images
diff --git a/docs/system/guest-loader.rst b/docs/system/guest-loader.rst
index 4320d1183f7..9ef9776bf07 100644
--- a/docs/system/guest-loader.rst
+++ b/docs/system/guest-loader.rst
@@ -51,4 +51,4 @@ The full syntax of the guest-loader is::
 
 ``bootargs=<args>``
   This is an optional field for kernel blobs which will pass command
-  like via the `/chosen/module@<addr>/bootargs` node.
+  like via the ``/chosen/module@<addr>/bootargs`` node.
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 6d3217abb60..52a6dae9522 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -491,11 +491,11 @@
 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
 #
 # @recording: true if the bitmap is recording new writes from the guest.
-#             Replaces `active` and `disabled` statuses. (since 4.0)
+#             Replaces ``active`` and ``disabled`` statuses. (since 4.0)
 #
 # @busy: true if the bitmap is in-use by some operation (NBD or jobs)
 #        and cannot be modified via QMP or used by another operation.
-#        Replaces `locked` and `frozen` statuses. (since 4.0)
+#        Replaces ``locked`` and ``frozen`` statuses. (since 4.0)
 #
 # @persistent: true if the bitmap was stored on disk, is scheduled to be stored
 #              on disk, or both. (since 4.0)
diff --git a/include/qemu/module.h b/include/qemu/module.h
index 3deac0078b9..5fcc323b2a7 100644
--- a/include/qemu/module.h
+++ b/include/qemu/module.h
@@ -77,14 +77,14 @@ void module_allow_arch(const char *arch);
 /**
  * DOC: module info annotation macros
  *
- * `scripts/modinfo-collect.py` will collect module info,
+ * ``scripts/modinfo-collect.py`` will collect module info,
  * using the preprocessor and -DQEMU_MODINFO.
  *
- * `scripts/modinfo-generate.py` will create a module meta-data database
+ * ``scripts/modinfo-generate.py`` will create a module meta-data database
  * from the collected information so qemu knows about module
  * dependencies and QOM objects implemented by modules.
  *
- * See `*.modinfo` and `modinfo.c` in the build directory to check the
+ * See ``*.modinfo`` and ``modinfo.c`` in the build directory to check the
  * script results.
  */
 #ifdef QEMU_MODINFO
diff --git a/qemu-options.hx b/qemu-options.hx
index 8ef178180db..2d5b5a1e60a 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1895,8 +1895,8 @@ SRST
         Valid parameters are:
 
         ``grab-mod=<mods>`` : Used to select the modifier keys for toggling
-        the mouse grabbing in conjunction with the "g" key. `<mods>` can be
-        either `lshift-lctrl-lalt` or `rctrl`.
+        the mouse grabbing in conjunction with the "g" key. ``<mods>`` can be
+        either ``lshift-lctrl-lalt`` or ``rctrl``.
 
         ``alt_grab=on|off`` : Use Control+Alt+Shift-g to toggle mouse grabbing.
         This parameter is deprecated - use ``grab-mod`` instead.
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v4 2/3] docs: (further) remove non-reference uses of single backticks
  2021-10-04 21:52 [PATCH v4 0/3] docs/sphinx: change default `role` to "any" John Snow
  2021-10-04 21:52 ` [PATCH v4 1/3] docs: remove non-reference uses of single backticks John Snow
@ 2021-10-04 21:52 ` John Snow
  2021-10-05  8:22   ` Damien Hedde
  2021-10-04 21:52 ` [PATCH v4 3/3] docs/sphinx: change default role to "any" John Snow
  2021-11-05 13:22 ` [PATCH v4 0/3] docs/sphinx: change default `role` " Marc-André Lureau
  3 siblings, 1 reply; 7+ messages in thread
From: John Snow @ 2021-10-04 21:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Alexander Bulekov,
	Alex Bennée, Markus Armbruster, Qiuhao Li, John Snow,
	Darren Kenny, Bandan Das, Stefan Hajnoczi, Paolo Bonzini,
	Alexandre Iooss, Mahmoud Mandour, Eric Blake

The series rotted already. Here's the new changes.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 docs/system/i386/sgx.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/system/i386/sgx.rst b/docs/system/i386/sgx.rst
index f103ae2a2fd..9aa161af1a1 100644
--- a/docs/system/i386/sgx.rst
+++ b/docs/system/i386/sgx.rst
@@ -77,9 +77,9 @@ CPUID
 
 Due to its myriad dependencies, SGX is currently not listed as supported
 in any of Qemu's built-in CPU configuration. To expose SGX (and SGX Launch
-Control) to a guest, you must either use `-cpu host` to pass-through the
+Control) to a guest, you must either use ``-cpu host`` to pass-through the
 host CPU model, or explicitly enable SGX when using a built-in CPU model,
-e.g. via `-cpu <model>,+sgx` or `-cpu <model>,+sgx,+sgxlc`.
+e.g. via ``-cpu <model>,+sgx`` or ``-cpu <model>,+sgx,+sgxlc``.
 
 All SGX sub-features enumerated through CPUID, e.g. SGX2, MISCSELECT,
 ATTRIBUTES, etc... can be restricted via CPUID flags. Be aware that enforcing
@@ -126,7 +126,7 @@ creating VM with SGX.
 Feature Control
 ~~~~~~~~~~~~~~~
 
-Qemu SGX updates the `etc/msr_feature_control` fw_cfg entry to set the SGX
+Qemu SGX updates the ``etc/msr_feature_control`` fw_cfg entry to set the SGX
 (bit 18) and SGX LC (bit 17) flags based on their respective CPUID support,
 i.e. existing guest firmware will automatically set SGX and SGX LC accordingly,
 assuming said firmware supports fw_cfg.msr_feature_control.
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v4 3/3] docs/sphinx: change default role to "any"
  2021-10-04 21:52 [PATCH v4 0/3] docs/sphinx: change default `role` to "any" John Snow
  2021-10-04 21:52 ` [PATCH v4 1/3] docs: remove non-reference uses of single backticks John Snow
  2021-10-04 21:52 ` [PATCH v4 2/3] docs: (further) " John Snow
@ 2021-10-04 21:52 ` John Snow
  2021-11-05 13:22 ` [PATCH v4 0/3] docs/sphinx: change default `role` " Marc-André Lureau
  3 siblings, 0 replies; 7+ messages in thread
From: John Snow @ 2021-10-04 21:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Alexander Bulekov,
	Alex Bennée, Markus Armbruster, Qiuhao Li, John Snow,
	Darren Kenny, Bandan Das, Stefan Hajnoczi, Paolo Bonzini,
	Alexandre Iooss, Mahmoud Mandour, Eric Blake

This interprets single-backtick syntax in all of our Sphinx docs as a
cross-reference to *something*, including Python symbols.

From here on out, new uses of `backticks` will cause a build failure if
the target cannot be referenced.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 docs/conf.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/conf.py b/docs/conf.py
index ff6e92c6e2e..4d9f56601fc 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -85,6 +85,11 @@
 # The master toctree document.
 master_doc = 'index'
 
+# Interpret `single-backticks` to be a cross-reference to any kind of
+# referenceable object. Unresolvable or ambiguous references will emit a
+# warning at build time.
+default_role = 'any'
+
 # General information about the project.
 project = u'QEMU'
 copyright = u'2021, The QEMU Project Developers'
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v4 2/3] docs: (further) remove non-reference uses of single backticks
  2021-10-04 21:52 ` [PATCH v4 2/3] docs: (further) " John Snow
@ 2021-10-05  8:22   ` Damien Hedde
  0 siblings, 0 replies; 7+ messages in thread
From: Damien Hedde @ 2021-10-05  8:22 UTC (permalink / raw)
  To: John Snow, qemu-devel
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Darren Kenny,
	Eric Blake, Markus Armbruster, Qiuhao Li, Alexander Bulekov,
	Bandan Das, Stefan Hajnoczi, Alexandre Iooss, Paolo Bonzini,
	Mahmoud Mandour, Alex Bennée



On 10/4/21 23:52, John Snow wrote:
> The series rotted already. Here's the new changes.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>

Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>

> ---
>   docs/system/i386/sgx.rst | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/docs/system/i386/sgx.rst b/docs/system/i386/sgx.rst
> index f103ae2a2fd..9aa161af1a1 100644
> --- a/docs/system/i386/sgx.rst
> +++ b/docs/system/i386/sgx.rst
> @@ -77,9 +77,9 @@ CPUID
>   
>   Due to its myriad dependencies, SGX is currently not listed as supported
>   in any of Qemu's built-in CPU configuration. To expose SGX (and SGX Launch
> -Control) to a guest, you must either use `-cpu host` to pass-through the
> +Control) to a guest, you must either use ``-cpu host`` to pass-through the
>   host CPU model, or explicitly enable SGX when using a built-in CPU model,
> -e.g. via `-cpu <model>,+sgx` or `-cpu <model>,+sgx,+sgxlc`.
> +e.g. via ``-cpu <model>,+sgx`` or ``-cpu <model>,+sgx,+sgxlc``.
>   
>   All SGX sub-features enumerated through CPUID, e.g. SGX2, MISCSELECT,
>   ATTRIBUTES, etc... can be restricted via CPUID flags. Be aware that enforcing
> @@ -126,7 +126,7 @@ creating VM with SGX.
>   Feature Control
>   ~~~~~~~~~~~~~~~
>   
> -Qemu SGX updates the `etc/msr_feature_control` fw_cfg entry to set the SGX
> +Qemu SGX updates the ``etc/msr_feature_control`` fw_cfg entry to set the SGX
>   (bit 18) and SGX LC (bit 17) flags based on their respective CPUID support,
>   i.e. existing guest firmware will automatically set SGX and SGX LC accordingly,
>   assuming said firmware supports fw_cfg.msr_feature_control.
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v4 0/3] docs/sphinx: change default `role` to "any"
  2021-10-04 21:52 [PATCH v4 0/3] docs/sphinx: change default `role` to "any" John Snow
                   ` (2 preceding siblings ...)
  2021-10-04 21:52 ` [PATCH v4 3/3] docs/sphinx: change default role to "any" John Snow
@ 2021-11-05 13:22 ` Marc-André Lureau
  2021-11-08 19:35   ` John Snow
  3 siblings, 1 reply; 7+ messages in thread
From: Marc-André Lureau @ 2021-11-05 13:22 UTC (permalink / raw)
  To: John Snow
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Qiuhao Li,
	Darren Kenny, Eric Blake, QEMU, Markus Armbruster,
	Alexander Bulekov, Bandan Das, Stefan Hajnoczi, Alexandre Iooss,
	Paolo Bonzini, Mahmoud Mandour, Alex Bennée

[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]

Hi

On Tue, Oct 5, 2021 at 1:53 AM John Snow <jsnow@redhat.com> wrote:

> V4: Fixed more occurrences that have occurred since V3.
>
> V3: Removed bad rebase confetti
>     fixed the OSS-Fuzz link to ... actually be a link.
>
> (Patch 2 can be squashed into patch 1 on merge, but this keeps the diff
> easy to see and review.)
>

queued with extra fixes in patch 2, thanks


> --js
>
> John Snow (3):
>   docs: remove non-reference uses of single backticks
>   docs: (further) remove non-reference uses of single backticks
>   docs/sphinx: change default role to "any"
>
>  docs/conf.py                           | 5 +++++
>  docs/devel/fuzzing.rst                 | 9 +++++----
>  docs/devel/tcg-plugins.rst             | 2 +-
>  docs/interop/live-block-operations.rst | 2 +-
>  docs/system/guest-loader.rst           | 2 +-
>  docs/system/i386/sgx.rst               | 6 +++---
>  qapi/block-core.json                   | 4 ++--
>  include/qemu/module.h                  | 6 +++---
>  qemu-options.hx                        | 4 ++--
>  9 files changed, 23 insertions(+), 17 deletions(-)
>
> --
> 2.31.1
>
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 1865 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v4 0/3] docs/sphinx: change default `role` to "any"
  2021-11-05 13:22 ` [PATCH v4 0/3] docs/sphinx: change default `role` " Marc-André Lureau
@ 2021-11-08 19:35   ` John Snow
  0 siblings, 0 replies; 7+ messages in thread
From: John Snow @ 2021-11-08 19:35 UTC (permalink / raw)
  To: Marc-André Lureau
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Qiuhao Li,
	Darren Kenny, Eric Blake, QEMU, Markus Armbruster,
	Alexander Bulekov, Bandan Das, Stefan Hajnoczi, Alexandre Iooss,
	Paolo Bonzini, Mahmoud Mandour, Alex Bennée

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

On Fri, Nov 5, 2021 at 9:22 AM Marc-André Lureau <marcandre.lureau@gmail.com>
wrote:

> Hi
>
> On Tue, Oct 5, 2021 at 1:53 AM John Snow <jsnow@redhat.com> wrote:
>
>> V4: Fixed more occurrences that have occurred since V3.
>>
>> V3: Removed bad rebase confetti
>>     fixed the OSS-Fuzz link to ... actually be a link.
>>
>> (Patch 2 can be squashed into patch 1 on merge, but this keeps the diff
>> easy to see and review.)
>>
>
> queued with extra fixes in patch 2, thanks
>
>
Thanks!

[-- Attachment #2: Type: text/html, Size: 1179 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-08 19:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04 21:52 [PATCH v4 0/3] docs/sphinx: change default `role` to "any" John Snow
2021-10-04 21:52 ` [PATCH v4 1/3] docs: remove non-reference uses of single backticks John Snow
2021-10-04 21:52 ` [PATCH v4 2/3] docs: (further) " John Snow
2021-10-05  8:22   ` Damien Hedde
2021-10-04 21:52 ` [PATCH v4 3/3] docs/sphinx: change default role to "any" John Snow
2021-11-05 13:22 ` [PATCH v4 0/3] docs/sphinx: change default `role` " Marc-André Lureau
2021-11-08 19:35   ` John Snow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).