Skip to contentSkip to conversation

docs: rstfy some s390 docs

PATCH Applied Cornelia Huck 3 participants 9 messages Feb 13, 2020 – Feb 21, 2020

lore
Share & tools
lore
#0 lore raw

v2 cover docs: rstfy some s390 docs

https://qemu.readthedocs.io/en/latest/index.html collects various documents from the QEMU docs/ subdirectory; however, none of the s390 files are currently included. Therefore, I set out to convert the existing files to rst and hook them up.

s390-dasd-ipl was straightforward enough; I also found a numbering issue.

vfio-ap was quite a bit more involved, but I hope I have produced something readable (more review can never hurt...) I also moved this into the system/ subdirectory; not sure if that is the best resting place, but it seemed to be the most reasonable one.

Tested via running 'make html' and inspecting the output.

Branch: https://github.com/cohuck/qemu rstfy-s390-v2

Changes v1->v2 (mostly addressing feedback from Peter; thanks!):
- dasd ipl: fix some indentation
- vfio-ap: autogenerate contents table
- vfio-ap: use more literals
- vfio-ap: convert some examples to tables
- vfio-ap: various other formatting cleanups

Cornelia Huck (2):
docs: rstfy s390 dasd ipl documentation
docs: rstfy vfio-ap documentation

 MAINTAINERS                                   |   4 +-
 docs/devel/index.rst                          |   1 +
 .../{s390-dasd-ipl.txt => s390-dasd-ipl.rst}  | 119 +--
 docs/system/index.rst                         |   1 +
 docs/{vfio-ap.txt => system/vfio-ap.rst}      | 796 +++++++++---------
 5 files changed, 484 insertions(+), 437 deletions(-)
 rename docs/devel/{s390-dasd-ipl.txt => s390-dasd-ipl.rst} (51%)
 rename docs/{vfio-ap.txt => system/vfio-ap.rst} (55%)

base-commit: 81f49abaaac2b88062bd1b07f451d9527ed1c9ce

Signature · 1 line
2.21.1
#1 lore raw

PATCH v2 1/2 docs: rstfy s390 dasd ipl documentation

While at it, also fix the numbering in 'What QEMU does'.

---
 MAINTAINERS                                   |   2 +-
 docs/devel/index.rst                          |   1 +
 .../{s390-dasd-ipl.txt => s390-dasd-ipl.rst}  | 119 +++++++++---------
 3 files changed, 64 insertions(+), 58 deletions(-)
 rename docs/devel/{s390-dasd-ipl.txt => s390-dasd-ipl.rst} (51%)
MAINTAINERS +1 -1
index c7717df720a2..34b766f89d32 100644
@@ -1243,7 +1243,7 @@ S: Supported
 F: hw/s390x/ipl.*
 F: pc-bios/s390-ccw/
 F: pc-bios/s390-ccw.img
-F: docs/devel/s390-dasd-ipl.txt
+F: docs/devel/s390-dasd-ipl.rst
 T: git https://github.com/borntraeger/qemu.git s390-next
 L: [email protected]
 
docs/devel/index.rst +1 -0
index 4dc2ca8d715e..b734ba465577 100644
@@ -25,3 +25,4 @@ Contents:
    tcg-plugins
    bitops
    reset
+   s390-dasd-ipl
docs/devel/s390-dasd-ipl.rst renamed from docs/devel/s390-dasd-ipl.txt +62 -57

169 lines not on this page · raw message

Signature · 1 line
2.21.1
#2 lore raw

PATCH v2 2/2 docs: rstfy vfio-ap documentation

In reply to Cornelia Huck

Move to system/, as this is mostly about configuring vfio-ap.

---
 MAINTAINERS                              |   2 +-
 docs/system/index.rst                    |   1 +
 docs/{vfio-ap.txt => system/vfio-ap.rst} | 796 ++++++++++++-----------
 3 files changed, 420 insertions(+), 379 deletions(-)
 rename docs/{vfio-ap.txt => system/vfio-ap.rst} (55%)
MAINTAINERS +1 -1
index 34b766f89d32..da6d0f412356 100644
@@ -1554,7 +1554,7 @@ F: hw/s390x/ap-bridge.c
 F: include/hw/s390x/ap-device.h
 F: include/hw/s390x/ap-bridge.h
 F: hw/vfio/ap.c
-F: docs/vfio-ap.txt
+F: docs/system/vfio-ap.rst
 L: [email protected]
 
 vhost
docs/system/index.rst +1 -0
index f66e6ea585cd..1a4b2c82acef 100644
@@ -15,3 +15,4 @@ Contents:
    :maxdepth: 2
 
    qemu-block-drivers
+   vfio-ap
docs/system/vfio-ap.rst renamed from docs/vfio-ap.txt +418 -378

1,144 lines not on this page · raw message

Signature · 1 line
2.21.1
#3 lore raw

Re: [PATCH v2 2/2] docs: rstfy vfio-ap documentation

Quoted 9 lines · Cornelia Huck

Move to system/, as this is mostly about configuring vfio-ap.

---
  MAINTAINERS                              |   2 +-
  docs/system/index.rst                    |   1 +
  docs/{vfio-ap.txt => system/vfio-ap.rst} | 796 ++++++++++++-----------
  3 files changed, 420 insertions(+), 379 deletions(-)

rename docs/{vfio-ap.txt => system/vfio-ap.rst} (55%)

...snip...

Quoted 6 lines
docs/system/vfio-ap.rst renamed from docs/vfio-ap.txt +1 -4
-   Example 1: Valid configuration:
-   ------------------------------
-   Guest1: adapters 1,2  domains 5,6
-   Guest2: adapter  1,2  domain 7
+Example 1: Valid configuration

docs/system/vfio-ap.rst The APQNs can provide secure key functionality - i.e., a private key is stored · line 123

Quoted 10 lines
docs/system/vfio-ap.rst renamed from docs/vfio-ap.txt +10 -0
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
++----------+--------+--------+
+|          | Guest1 | Guest2 |
++==========+========+========+
+| adapters |  1, 2  |  1, 2  |
++----------+--------+--------+
+| domains  |  5, 6  |  7     |
++----------+--------+--------+
+

Here when leaving the first cell empty I have a bad rendering with LaTeX. It is correct when it is filled with something like:

+----------+--------+--------+
|  type    | Guest1 | Guest2 |
+==========+========+========+
| adapters |  1, 2  |  1     |
+----------+--------+--------+
| domains  |  5, 6  |  6, 7  |
+----------+--------+--------+

However it may be because I do not use the right tools. Did not find which one I am suppose to use. Currently using:
rst2latex vfio-ap.rst > vfio-ap.tex && pdflatex vfio-ap.tex

Regards,
Pierre

Signature · 2 lines
Pierre Morel
IBM Lab Boeblingen
#4 lore raw

Re: [PATCH v2 2/2] docs: rstfy vfio-ap documentation

On Thu, 13 Feb 2020 at 18:38, Pierre Morel <[email protected]> wrote:> However it may be because I do not use the right tools.

Quoted 3 lines

Did not find which one I am suppose to use. Currently using:
rst2latex vfio-ap.rst > vfio-ap.tex && pdflatex vfio-ap.tex

The only supported way to build the docs is with Sphinx.

Option 1:

If you have the right versions of the tools installed then running "make" in the usual way will build HTML docs into the docs/ subdirectory of your build directory. Passing --enable-docs to configure will cause it to complain if you're missing a tool rather than silently not building the docs. This is what we expect most users to be doing.

Option 2:

You can run Sphinx 'manually' with something like
sphinx-build docs /tmp/sphinx-out
which will build a single big fat manual into the specified output directory (here /tmp/sphinx-out). This option is provided mostly so that sites like 'readthedocs' can produce the documentation without having to run our Makefiles.

PDF is not an officially supported (by us) output format, but if you really want it you can generate it with
sphinx-build -b latex docs /tmp/sphinx-out
cd /tmp/sphinx-out
make
which will generate a QEMU.pdf in /tmp/sphinx-out.

We're unlikely to want to make tweaks to the documentation sources to fix infelicities in the formatting of the PDF, though.

thanks
-- PMM

#5 lore raw

Re: [PATCH v2 2/2] docs: rstfy vfio-ap documentation

Quoted 34 lines · On Thu, 13 Feb 2020 18:54:37 +0000 Peter Maydell <[email protected]>…

On Thu, 13 Feb 2020 at 18:38, Pierre Morel <[email protected]> wrote:> However it may be because I do not use the right tools.

Quoted 3 lines

Did not find which one I am suppose to use. Currently using:
rst2latex vfio-ap.rst > vfio-ap.tex && pdflatex vfio-ap.tex

The only supported way to build the docs is with Sphinx.

Option 1:

If you have the right versions of the tools installed then running "make" in the usual way will build HTML docs into the docs/ subdirectory of your build directory. Passing --enable-docs to configure will cause it to complain if you're missing a tool rather than silently not building the docs. This is what we expect most users to be doing.

Option 2:

You can run Sphinx 'manually' with something like
sphinx-build docs /tmp/sphinx-out
which will build a single big fat manual into the specified output directory (here /tmp/sphinx-out). This option is provided mostly so that sites like 'readthedocs' can produce the documentation without having to run our Makefiles.

PDF is not an officially supported (by us) output format, but if you really want it you can generate it with
sphinx-build -b latex docs /tmp/sphinx-out
cd /tmp/sphinx-out
make
which will generate a QEMU.pdf in /tmp/sphinx-out.

Quoted 3 lines

We're unlikely to want to make tweaks to the documentation sources to fix infelicities in the formatting of the PDF, though.

FWIW, using option 2 to produce a pdf seems to end up with something decent-looking with these patches applied. (Lots of warnings from LaTex, but that seems preexisting.)

Reviewed-by
#6 lore raw

Re: [PATCH v2 2/2] docs: rstfy vfio-ap documentation

Quoted 37 lines · Cornelia Huck
Quoted 34 lines · On Thu, 13 Feb 2020 18:54:37 +0000 Peter Maydell <[email protected]>…

On Thu, 13 Feb 2020 at 18:38, Pierre Morel <[email protected]> wrote:> However it may be because I do not use the right tools.

Quoted 3 lines

Did not find which one I am suppose to use. Currently using:
rst2latex vfio-ap.rst > vfio-ap.tex && pdflatex vfio-ap.tex

The only supported way to build the docs is with Sphinx.

Option 1:

If you have the right versions of the tools installed then running "make" in the usual way will build HTML docs into the docs/ subdirectory of your build directory. Passing --enable-docs to configure will cause it to complain if you're missing a tool rather than silently not building the docs. This is what we expect most users to be doing.

Option 2:

You can run Sphinx 'manually' with something like
sphinx-build docs /tmp/sphinx-out
which will build a single big fat manual into the specified output directory (here /tmp/sphinx-out). This option is provided mostly so that sites like 'readthedocs' can produce the documentation without having to run our Makefiles.

PDF is not an officially supported (by us) output format, but if you really want it you can generate it with
sphinx-build -b latex docs /tmp/sphinx-out
cd /tmp/sphinx-out
make
which will generate a QEMU.pdf in /tmp/sphinx-out.

Quoted 8 lines
Quoted 3 lines

We're unlikely to want to make tweaks to the documentation sources to fix infelicities in the formatting of the PDF, though.

FWIW, using option 2 to produce a pdf seems to end up with something decent-looking with these patches applied. (Lots of warnings from LaTex, but that seems preexisting.)

OK, then I effectively did not use the right tools. Sorry for this and thanks for having leaning again.

For the content I was OK with all so:

and thanks for the work.

Signature · 2 lines
Pierre Morel
IBM Lab Boeblingen
#7 lore raw
In reply to Cornelia Huck
Quoted 38 lines · On Thu, 13 Feb 2020 17:29:40 +0100 Cornelia Huck <[email protected]> wrote:

https://qemu.readthedocs.io/en/latest/index.html collects various documents from the QEMU docs/ subdirectory; however, none of the s390 files are currently included. Therefore, I set out to convert the existing files to rst and hook them up.

s390-dasd-ipl was straightforward enough; I also found a numbering issue.

vfio-ap was quite a bit more involved, but I hope I have produced something readable (more review can never hurt...) I also moved this into the system/ subdirectory; not sure if that is the best resting place, but it seemed to be the most reasonable one.

Tested via running 'make html' and inspecting the output.

Branch: https://github.com/cohuck/qemu rstfy-s390-v2

Changes v1->v2 (mostly addressing feedback from Peter; thanks!):
- dasd ipl: fix some indentation
- vfio-ap: autogenerate contents table
- vfio-ap: use more literals
- vfio-ap: convert some examples to tables
- vfio-ap: various other formatting cleanups

Cornelia Huck (2):
docs: rstfy s390 dasd ipl documentation
docs: rstfy vfio-ap documentation

 MAINTAINERS                                   |   4 +-
 docs/devel/index.rst                          |   1 +
 .../{s390-dasd-ipl.txt => s390-dasd-ipl.rst}  | 119 +--
 docs/system/index.rst                         |   1 +
 docs/{vfio-ap.txt => system/vfio-ap.rst}      | 796 +++++++++---------
 5 files changed, 484 insertions(+), 437 deletions(-)
 rename docs/devel/{s390-dasd-ipl.txt => s390-dasd-ipl.rst} (51%)
 rename docs/{vfio-ap.txt => system/vfio-ap.rst} (55%)
Quoted 1 line

base-commit: 81f49abaaac2b88062bd1b07f451d9527ed1c9ce

Any further feedback? I plan to queue this on my s390-next branch.

author Applied
#8 lore raw
In reply to Cornelia Huck
Quoted 38 lines · On Thu, 13 Feb 2020 17:29:40 +0100 Cornelia Huck <[email protected]> wrote:

https://qemu.readthedocs.io/en/latest/index.html collects various documents from the QEMU docs/ subdirectory; however, none of the s390 files are currently included. Therefore, I set out to convert the existing files to rst and hook them up.

s390-dasd-ipl was straightforward enough; I also found a numbering issue.

vfio-ap was quite a bit more involved, but I hope I have produced something readable (more review can never hurt...) I also moved this into the system/ subdirectory; not sure if that is the best resting place, but it seemed to be the most reasonable one.

Tested via running 'make html' and inspecting the output.

Branch: https://github.com/cohuck/qemu rstfy-s390-v2

Changes v1->v2 (mostly addressing feedback from Peter; thanks!):
- dasd ipl: fix some indentation
- vfio-ap: autogenerate contents table
- vfio-ap: use more literals
- vfio-ap: convert some examples to tables
- vfio-ap: various other formatting cleanups

Cornelia Huck (2):
docs: rstfy s390 dasd ipl documentation
docs: rstfy vfio-ap documentation

 MAINTAINERS                                   |   4 +-
 docs/devel/index.rst                          |   1 +
 .../{s390-dasd-ipl.txt => s390-dasd-ipl.rst}  | 119 +--
 docs/system/index.rst                         |   1 +
 docs/{vfio-ap.txt => system/vfio-ap.rst}      | 796 +++++++++---------
 5 files changed, 484 insertions(+), 437 deletions(-)
 rename docs/devel/{s390-dasd-ipl.txt => s390-dasd-ipl.rst} (51%)
 rename docs/{vfio-ap.txt => system/vfio-ap.rst} (55%)
Quoted 1 line

base-commit: 81f49abaaac2b88062bd1b07f451d9527ed1c9ce

Queued to s390-next.