* [PATCH v2 0/3] docs: fix and cleanup footnotes
@ 2024-10-11 11:12 Paolo Bonzini
2024-10-11 11:12 ` [PATCH v2 1/3] docs: fix invalid footnote syntax Paolo Bonzini
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Paolo Bonzini @ 2024-10-11 11:12 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
Sphinx 8.1.0 got a lot better at detecting unreferenced footnotes, and
we have three of them---which causes the build to fail when the latest
version of sphinx is installed from Pip.
Patches 1 and 2 fix them, while the third is a general improvement in
the appearance of the rendered footnotes and the consistency of the
rST syntax.
An example of a failing job is https://gitlab.com/bonzini/qemu/-/jobs/8060240732.
Paolo
v1->v2: improve commit messages
replace patch 2, absorbing the rapl-msr.rst changes into it
Paolo Bonzini (3):
docs: fix invalid footnote syntax
docs: avoid footnotes consisting of just URLs
docs: use consistent markup for footnotes
docs/devel/atomics.rst | 6 +++---
docs/devel/build-system.rst | 6 +++---
docs/devel/loads-stores.rst | 2 +-
docs/devel/maintainers.rst | 4 ++--
docs/devel/migration/mapped-ram.rst | 4 ++--
docs/devel/testing/acpi-bits.rst | 26 +++++++++++++-------------
docs/specs/fw_cfg.rst | 4 ++--
docs/specs/rapl-msr.rst | 25 ++++++++++++-------------
8 files changed, 38 insertions(+), 39 deletions(-)
--
2.46.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/3] docs: fix invalid footnote syntax
2024-10-11 11:12 [PATCH v2 0/3] docs: fix and cleanup footnotes Paolo Bonzini
@ 2024-10-11 11:12 ` Paolo Bonzini
2024-10-11 11:12 ` [PATCH v2 2/3] docs: avoid footnotes consisting of just URLs Paolo Bonzini
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2024-10-11 11:12 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
All footnotes must come after a separator in reStructuredText. Fix the
two files in which this does not happen.
This mistake causes the link to be rendered literally:
...from the venv itself[#distlib]_. If no...
and is caught by Sphinx 8.1.0 as an unreferenced footnote.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/devel/atomics.rst | 2 +-
docs/devel/build-system.rst | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/devel/atomics.rst b/docs/devel/atomics.rst
index b77c6e13e18..6bf032f9005 100644
--- a/docs/devel/atomics.rst
+++ b/docs/devel/atomics.rst
@@ -204,7 +204,7 @@ They come in six kinds:
before the second with respect to the other components of the system.
Therefore, unlike ``smp_rmb()`` or ``qatomic_load_acquire()``,
``smp_read_barrier_depends()`` can be just a compiler barrier on
- weakly-ordered architectures such as Arm or PPC[#]_.
+ weakly-ordered architectures such as Arm or PPC\ [#]_.
Note that the first load really has to have a _data_ dependency and not
a control dependency. If the address for the second load is dependent
diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst
index 79eceb179de..fa1c59d9fd8 100644
--- a/docs/devel/build-system.rst
+++ b/docs/devel/build-system.rst
@@ -145,13 +145,13 @@ was installed in the ``site-packages`` directory of another interpreter,
or with the wrong ``pip`` program.
If a package is available for the chosen interpreter, ``configure``
-prepares a small script that invokes it from the venv itself[#distlib]_.
+prepares a small script that invokes it from the venv itself\ [#distlib]_.
If not, ``configure`` can also optionally install dependencies in the
virtual environment with ``pip``, either from wheels in ``python/wheels``
or by downloading the package with PyPI. Downloading can be disabled with
``--disable-download``; and anyway, it only happens when a ``configure``
option (currently, only ``--enable-docs``) is explicitly enabled but
-the dependencies are not present[#pip]_.
+the dependencies are not present\ [#pip]_.
.. [#distlib] The scripts are created based on the package's metadata,
specifically the ``console_script`` entry points. This is the
--
2.46.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] docs: avoid footnotes consisting of just URLs
2024-10-11 11:12 [PATCH v2 0/3] docs: fix and cleanup footnotes Paolo Bonzini
2024-10-11 11:12 ` [PATCH v2 1/3] docs: fix invalid footnote syntax Paolo Bonzini
@ 2024-10-11 11:12 ` Paolo Bonzini
2024-10-11 11:44 ` Peter Maydell
2024-10-11 11:12 ` [PATCH v2 3/3] docs: use consistent markup for footnotes Paolo Bonzini
2024-10-11 12:27 ` [PATCH v2 0/3] docs: fix and cleanup footnotes Peter Maydell
3 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2024-10-11 11:12 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
Replace the footnotes with inline links whenever the footnote text
consists of nothing but the URL. While at it, make the link texts
consistent in the surrounding areas, for example avoiding usage of
"here" for the link's text.
In the case of acpi-bits.rst this fixes a build failure with Sphinx
8.1.0, because the FOSDEM link was duplicated in the paragraph and the
new version is a lot stricter about unreferenced footnotes.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/devel/testing/acpi-bits.rst | 26 +++++++++++++-------------
docs/specs/rapl-msr.rst | 25 ++++++++++++-------------
2 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/docs/devel/testing/acpi-bits.rst b/docs/devel/testing/acpi-bits.rst
index 78aeb6aa3c4..764e0ef51a5 100644
--- a/docs/devel/testing/acpi-bits.rst
+++ b/docs/devel/testing/acpi-bits.rst
@@ -30,15 +30,20 @@ OS modules are generally written using low level languages such as C and
low level assembly machine language. Writing test routines in a low level
language makes things more cumbersome. These and other reasons makes using
bios-bits very attractive for testing bioses. More details on the inspiration
-for developing biosbits and its real life uses can be found in [#a]_ and [#b]_.
+for developing biosbits and its real life uses were presented `at Plumbers
+in 2011 <Plumbers_>`__ and `at Linux.conf.au in 2012 <Linux.conf.au_>`__.
-For QEMU, we maintain a fork of bios bits in gitlab along with all the
-dependent submodules `here <https://gitlab.com/qemu-project/biosbits-bits>`__.
-This fork contains numerous fixes, a newer acpica and changes specific to
-running these functional QEMU tests using bits. The author of this document
-is the sole maintainer of the QEMU fork of bios bits repository. For more
-information, please see author's `FOSDEM talk on this bios-bits based test
-framework <https://fosdem.org/2024/schedule/event/fosdem-2024-2262-exercising-qemu-generated-acpi-smbios-tables-using-biosbits-from-within-a-guest-vm-/>`__.
+For QEMU, we maintain a fork of bios bits in `gitlab`_, along with all
+the dependent submodules. This fork contains numerous fixes, a newer
+acpica and changes specific to running these functional QEMU tests using
+bits. The author of this document is the current maintainer of the QEMU
+fork of bios bits repository. For more information, please see `the
+author's FOSDEM presentation <FOSDEM_>`__ on this bios-bits based test framework.
+
+.. _Plumbers: https://blog.linuxplumbersconf.org/2011/ocw/system/presentations/867/original/bits.pdf
+.. _Linux.conf.au: https://www.youtube.com/watch?v=36QIepyUuhg
+.. _gitlab: https://gitlab.com/qemu-project/biosbits-bits
+.. _FOSDEM: https://fosdem.org/2024/schedule/event/fosdem-2024-2262-exercising-qemu-generated-acpi-smbios-tables-using-biosbits-from-within-a-guest-vm-/
*********************************
Description of the test framework
@@ -148,8 +153,3 @@ Under ``tests/functional/`` as the root we have:
Author: Ani Sinha <anisinha@redhat.com>
-References:
------------
-.. [#a] https://blog.linuxplumbersconf.org/2011/ocw/system/presentations/867/original/bits.pdf
-.. [#b] https://www.youtube.com/watch?v=36QIepyUuhg
-.. [#c] https://fosdem.org/2024/schedule/event/fosdem-2024-2262-exercising-qemu-generated-acpi-smbios-tables-using-biosbits-from-within-a-guest-vm-/
diff --git a/docs/specs/rapl-msr.rst b/docs/specs/rapl-msr.rst
index 1202ee89bee..aaf0db9f91b 100644
--- a/docs/specs/rapl-msr.rst
+++ b/docs/specs/rapl-msr.rst
@@ -9,11 +9,12 @@ The consumption is reported via MSRs (model specific registers) like
MSR_PKG_ENERGY_STATUS for the CPU package power domain. These MSRs are 64 bits
registers that represent the accumulated energy consumption in micro Joules.
-Thanks to the MSR Filtering patch [#a]_ not all MSRs are handled by KVM. Some
-of them can now be handled by the userspace (QEMU). It uses a mechanism called
-"MSR filtering" where a list of MSRs is given at init time of a VM to KVM so
-that a callback is put in place. The design of this patch uses only this
-mechanism for handling the MSRs between guest/host.
+Thanks to KVM's `MSR filtering <msr-filter-patch_>`__ functionality,
+not all MSRs are handled by KVM. Some of them can now be handled by the
+userspace (QEMU); a list of MSRs is given at VM creation time to KVM, and
+a userspace exit occurs when they are accessed.
+
+.. _msr-filter-patch: https://patchwork.kernel.org/project/kvm/patch/20200916202951.23760-7-graf@amazon.com/
At the moment the following MSRs are involved:
@@ -92,9 +93,12 @@ found by the sysconf system call. A typical value of clock ticks per second is
package has 4 cores, 400 ticks maximum can be scheduled on all the cores
of the package for a period of 1 second.
-The /proc/[pid]/stat [#b]_ is a sysfs file that can give the executed time of a
-process with the [pid] as the process ID. It gives the amount of ticks the
-process has been scheduled in userspace (utime) and kernel space (stime).
+`/proc/[pid]/stat <stat_>`__ is a procfs file that can give the executed
+time of a process with the [pid] as the process ID. It gives the amount
+of ticks the process has been scheduled in userspace (utime) and kernel
+space (stime).
+
+.. _stat: https://man7.org/linux/man-pages/man5/proc.5.html
By reading those metrics for a thread, one can calculate the ratio of time the
package has spent executing the thread.
@@ -148,8 +152,3 @@ Current Limitations
- Only the Package Power-Plane (MSR_PKG_ENERGY_STATUS) is reported at the
moment.
-References
-----------
-
-.. [#a] https://patchwork.kernel.org/project/kvm/patch/20200916202951.23760-7-graf@amazon.com/
-.. [#b] https://man7.org/linux/man-pages/man5/proc.5.html
--
2.46.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] docs: use consistent markup for footnotes
2024-10-11 11:12 [PATCH v2 0/3] docs: fix and cleanup footnotes Paolo Bonzini
2024-10-11 11:12 ` [PATCH v2 1/3] docs: fix invalid footnote syntax Paolo Bonzini
2024-10-11 11:12 ` [PATCH v2 2/3] docs: avoid footnotes consisting of just URLs Paolo Bonzini
@ 2024-10-11 11:12 ` Paolo Bonzini
2024-10-11 12:27 ` [PATCH v2 0/3] docs: fix and cleanup footnotes Peter Maydell
3 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2024-10-11 11:12 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
Unfortunately, the definition of the footnote syntax requires
the author to use the awkward escaped space "\ " in the really common
case of "footnote marker at end of word or sentence"; and in fact the rST
documentation's examples of footnote syntax contain only artificial
examples that do *not* use the syntax. This resulted in ugly rendering
of footnotes throughout QEMU's documentation. Ensure the space is escaped
whenever the footnote must attach to the preceding word, and also use
a named reference for clarity.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/devel/atomics.rst | 6 +++---
docs/devel/build-system.rst | 2 +-
docs/devel/loads-stores.rst | 2 +-
docs/devel/maintainers.rst | 4 ++--
docs/devel/migration/mapped-ram.rst | 4 ++--
docs/specs/fw_cfg.rst | 4 ++--
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/docs/devel/atomics.rst b/docs/devel/atomics.rst
index 6bf032f9005..95c7b77c01e 100644
--- a/docs/devel/atomics.rst
+++ b/docs/devel/atomics.rst
@@ -204,7 +204,7 @@ They come in six kinds:
before the second with respect to the other components of the system.
Therefore, unlike ``smp_rmb()`` or ``qatomic_load_acquire()``,
``smp_read_barrier_depends()`` can be just a compiler barrier on
- weakly-ordered architectures such as Arm or PPC\ [#]_.
+ weakly-ordered architectures such as Arm or PPC\ [#alpha]_.
Note that the first load really has to have a _data_ dependency and not
a control dependency. If the address for the second load is dependent
@@ -212,7 +212,7 @@ They come in six kinds:
than actually loading the address itself, then it's a _control_
dependency and a full read barrier or better is required.
-.. [#] The DEC Alpha is an exception, because ``smp_read_barrier_depends()``
+.. [#alpha] The DEC Alpha is an exception, because ``smp_read_barrier_depends()``
needs a processor barrier. On strongly-ordered architectures such
as x86 or s390, ``smp_rmb()`` and ``qatomic_load_acquire()`` can
also be compiler barriers only.
@@ -295,7 +295,7 @@ Acquire/release pairing and the *synchronizes-with* relation
------------------------------------------------------------
Atomic operations other than ``qatomic_set()`` and ``qatomic_read()`` have
-either *acquire* or *release* semantics [#rmw]_. This has two effects:
+either *acquire* or *release* semantics\ [#rmw]_. This has two effects:
.. [#rmw] Read-modify-write operations can have both---acquire applies to the
read part, and release to the write.
diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst
index fa1c59d9fd8..d42045a2325 100644
--- a/docs/devel/build-system.rst
+++ b/docs/devel/build-system.rst
@@ -333,7 +333,7 @@ into each emulator:
``default-configs/targets/*.mak``
These files mostly define symbols that appear in the ``*-config-target.h``
- file for each emulator [#cfgtarget]_. However, the ``TARGET_ARCH``
+ file for each emulator\ [#cfgtarget]_. However, the ``TARGET_ARCH``
and ``TARGET_BASE_ARCH`` will also be used to select the ``hw/`` and
``target/`` subdirectories that are compiled into each target.
diff --git a/docs/devel/loads-stores.rst b/docs/devel/loads-stores.rst
index ec627aa9c06..9471bac8599 100644
--- a/docs/devel/loads-stores.rst
+++ b/docs/devel/loads-stores.rst
@@ -95,7 +95,7 @@ guest CPU state in case of a guest CPU exception. This is passed
to ``cpu_restore_state()``. Therefore the value should either be 0,
to indicate that the guest CPU state is already synchronized, or
the result of ``GETPC()`` from the top level ``HELPER(foo)``
-function, which is a return address into the generated code [#gpc]_.
+function, which is a return address into the generated code\ [#gpc]_.
.. [#gpc] Note that ``GETPC()`` should be used with great care: calling
it in other functions that are *not* the top level
diff --git a/docs/devel/maintainers.rst b/docs/devel/maintainers.rst
index 5c907d901cd..88a613ed74f 100644
--- a/docs/devel/maintainers.rst
+++ b/docs/devel/maintainers.rst
@@ -99,9 +99,9 @@ members of the QEMU community, you should make arrangements to attend
a `KeySigningParty <https://wiki.qemu.org/KeySigningParty>`__ (for
example at KVM Forum) or make alternative arrangements to have your
key signed by an attendee. Key signing requires meeting another
-community member **in person** [#]_ so please make appropriate
+community member **in person**\ [#2020]_ so please make appropriate
arrangements.
-.. [#] In recent pandemic times we have had to exercise some
+.. [#2020] In recent pandemic times we have had to exercise some
flexibility here. Maintainers still need to sign their pull
requests though.
diff --git a/docs/devel/migration/mapped-ram.rst b/docs/devel/migration/mapped-ram.rst
index d352b546e96..b08c2b433c4 100644
--- a/docs/devel/migration/mapped-ram.rst
+++ b/docs/devel/migration/mapped-ram.rst
@@ -44,7 +44,7 @@ Use-cases
The mapped-ram feature was designed for use cases where the migration
stream will be directed to a file in the filesystem and not
-immediately restored on the destination VM [#]_. These could be
+immediately restored on the destination VM\ [#alternatives]_. These could be
thought of as snapshots. We can further categorize them into live and
non-live.
@@ -70,7 +70,7 @@ mapped-ram in this scenario is portability since background-snapshot
depends on async dirty tracking (KVM_GET_DIRTY_LOG) which is not
supported outside of Linux.
-.. [#] While this same effect could be obtained with the usage of
+.. [#alternatives] While this same effect could be obtained with the usage of
snapshots or the ``file:`` migration alone, mapped-ram provides
a performance increase for VMs with larger RAM sizes (10s to
100s of GiBs), specially if the VM has been stopped beforehand.
diff --git a/docs/specs/fw_cfg.rst b/docs/specs/fw_cfg.rst
index 5ad47a901c9..31ae31576b1 100644
--- a/docs/specs/fw_cfg.rst
+++ b/docs/specs/fw_cfg.rst
@@ -54,11 +54,11 @@ Data Register
-------------
* Read/Write (writes ignored as of QEMU v2.4, but see the DMA interface)
-* Location: platform dependent (IOport [#]_ or MMIO)
+* Location: platform dependent (IOport\ [#placement]_ or MMIO)
* Width: 8-bit (if IOport), 8/16/32/64-bit (if MMIO)
* Endianness: string-preserving
-.. [#]
+.. [#placement]
On platforms where the data register is exposed as an IOport, its
port number will always be one greater than the port number of the
selector register. In other words, the two ports overlap, and can not
--
2.46.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] docs: avoid footnotes consisting of just URLs
2024-10-11 11:12 ` [PATCH v2 2/3] docs: avoid footnotes consisting of just URLs Paolo Bonzini
@ 2024-10-11 11:44 ` Peter Maydell
0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2024-10-11 11:44 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On Fri, 11 Oct 2024 at 12:13, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Replace the footnotes with inline links whenever the footnote text
> consists of nothing but the URL. While at it, make the link texts
> consistent in the surrounding areas, for example avoiding usage of
> "here" for the link's text.
>
> In the case of acpi-bits.rst this fixes a build failure with Sphinx
> 8.1.0, because the FOSDEM link was duplicated in the paragraph and the
> new version is a lot stricter about unreferenced footnotes.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/3] docs: fix and cleanup footnotes
2024-10-11 11:12 [PATCH v2 0/3] docs: fix and cleanup footnotes Paolo Bonzini
` (2 preceding siblings ...)
2024-10-11 11:12 ` [PATCH v2 3/3] docs: use consistent markup for footnotes Paolo Bonzini
@ 2024-10-11 12:27 ` Peter Maydell
2024-10-11 15:32 ` Paolo Bonzini
3 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2024-10-11 12:27 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On Fri, 11 Oct 2024 at 12:12, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Sphinx 8.1.0 got a lot better at detecting unreferenced footnotes, and
> we have three of them---which causes the build to fail when the latest
> version of sphinx is installed from Pip.
In particular we hit this on the macos14 CI job now:
https://gitlab.com/qemu-project/qemu/-/jobs/8054823697
I'll give this a bit more time on-list for review from
others if they want to, but I plan to apply this directly
to fix that CI job on Monday.
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/3] docs: fix and cleanup footnotes
2024-10-11 12:27 ` [PATCH v2 0/3] docs: fix and cleanup footnotes Peter Maydell
@ 2024-10-11 15:32 ` Paolo Bonzini
0 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2024-10-11 15:32 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
On Fri, Oct 11, 2024 at 2:27 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Fri, 11 Oct 2024 at 12:12, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > Sphinx 8.1.0 got a lot better at detecting unreferenced footnotes, and
> > we have three of them---which causes the build to fail when the latest
> > version of sphinx is installed from Pip.
>
> In particular we hit this on the macos14 CI job now:
>
> https://gitlab.com/qemu-project/qemu/-/jobs/8054823697
>
> I'll give this a bit more time on-list for review from
> others if they want to, but I plan to apply this directly
> to fix that CI job on Monday.
Ok, I'll also include it in my pull request anyway.
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-10-11 17:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-11 11:12 [PATCH v2 0/3] docs: fix and cleanup footnotes Paolo Bonzini
2024-10-11 11:12 ` [PATCH v2 1/3] docs: fix invalid footnote syntax Paolo Bonzini
2024-10-11 11:12 ` [PATCH v2 2/3] docs: avoid footnotes consisting of just URLs Paolo Bonzini
2024-10-11 11:44 ` Peter Maydell
2024-10-11 11:12 ` [PATCH v2 3/3] docs: use consistent markup for footnotes Paolo Bonzini
2024-10-11 12:27 ` [PATCH v2 0/3] docs: fix and cleanup footnotes Peter Maydell
2024-10-11 15:32 ` Paolo Bonzini
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).