From: Bagas Sanjaya <bagasdotme@gmail.com>
To: linux-doc@vger.kernel.org
Cc: Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Jonathan Corbet <corbet@lwn.net>,
Halil Pasic <pasic@linux.ibm.com>,
Tony Krowiak <akrowiak@linux.ibm.com>,
Jason Herne <jjherne@linux.ibm.com>,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
Bagas Sanjaya <bagasdotme@gmail.com>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH 5/8] Documentation: s390: use code block for structs
Date: Fri, 22 Jul 2022 15:49:44 +0700 [thread overview]
Message-ID: <20220722084946.22965-6-bagasdotme@gmail.com> (raw)
In-Reply-To: <20220722084946.22965-1-bagasdotme@gmail.com>
In vfio-ap-locking documentation, struct code samples aren't inside code
blocks, hence trigger many inline emphasis and definition list warnings.
Use code blocks for them.
Link: https://lore.kernel.org/linux-next/20220721201058.2a276286@canb.auug.org.au/
Fixes: e32d3827f3d5b2 ("s390/Docs: new doc describing lock usage by the vfio_ap device driver")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
Documentation/s390/vfio-ap-locking.rst | 64 +++++++++++++++-----------
1 file changed, 36 insertions(+), 28 deletions(-)
diff --git a/Documentation/s390/vfio-ap-locking.rst b/Documentation/s390/vfio-ap-locking.rst
index c4e1eeec79a0f5..4194b78ace0e94 100644
--- a/Documentation/s390/vfio-ap-locking.rst
+++ b/Documentation/s390/vfio-ap-locking.rst
@@ -5,21 +5,23 @@ VFIO AP Locks Overview
======================
This document describes the locks that are pertinent to the secure operation
of the vfio_ap device driver. Throughout this document, the following variables
-will be used to denote instances of the structures herein described:
+will be used to denote instances of the structures herein described::
-struct ap_matrix_dev *matrix_dev;
-struct ap_matrix_mdev *matrix_mdev;
-struct kvm *kvm;
+ struct ap_matrix_dev *matrix_dev;
+ struct ap_matrix_mdev *matrix_mdev;
+ struct kvm *kvm;
The Matrix Devices Lock (drivers/s390/crypto/vfio_ap_private.h)
--------------------------------------------------------------
-struct ap_matrix_dev {
- ...
- struct list_head mdev_list;
- struct mutex mdevs_lock;
- ...
-}
+::
+
+ struct ap_matrix_dev {
+ ...
+ struct list_head mdev_list;
+ struct mutex mdevs_lock;
+ ...
+ }
The Matrix Devices Lock (matrix_dev->mdevs_lock) is implemented as a global
mutex contained within the single object of struct ap_matrix_dev. This lock
@@ -31,11 +33,13 @@ representing one of the vfio_ap device driver's mediated devices.
The KVM Lock (include/linux/kvm_host.h)
---------------------------------------
-struct kvm {
- ...
- struct mutex lock;
- ...
-}
+::
+
+ struct kvm {
+ ...
+ struct mutex lock;
+ ...
+ }
The KVM Lock (kvm->lock) controls access to the state data for a KVM guest. This
lock must be held by the vfio_ap device driver while one or more AP adapters,
@@ -48,12 +52,14 @@ been attached to the KVM guest.
The Guests Lock (drivers/s390/crypto/vfio_ap_private.h)
-----------------------------------------------------------
-struct ap_matrix_dev {
- ...
- struct list_head mdev_list;
- struct mutex guests_lock;
- ...
-}
+::
+
+ struct ap_matrix_dev {
+ ...
+ struct list_head mdev_list;
+ struct mutex guests_lock;
+ ...
+ }
The Guests Lock (matrix_dev->guests_lock) controls access to the
matrix_mdev instances (matrix_dev->mdev_list) that represent mediated devices
@@ -89,14 +95,16 @@ resources, so only the matrix_dev->mdevs_lock needs to be held.
The PQAP Hook Lock (arch/s390/include/asm/kvm_host.h)
-----------------------------------------------------
-typedef int (*crypto_hook)(struct kvm_vcpu *vcpu);
+::
-struct kvm_s390_crypto {
- ...
- struct rw_semaphore pqap_hook_rwsem;
- crypto_hook *pqap_hook;
- ...
-};
+ typedef int (*crypto_hook)(struct kvm_vcpu *vcpu);
+
+ struct kvm_s390_crypto {
+ ...
+ struct rw_semaphore pqap_hook_rwsem;
+ crypto_hook *pqap_hook;
+ ...
+ };
The PQAP Hook Lock is a r/w semaphore that controls access to the function
pointer of the handler (*kvm->arch.crypto.pqap_hook) to invoke when the
--
An old man doll... just what I always wanted! - Clara
next prev parent reply other threads:[~2022-07-22 8:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 8:49 [PATCH 0/8] Documentation: s390: documentation fixes for vfio_ap driver Bagas Sanjaya
2022-07-22 8:49 ` [PATCH 1/8] Documentation: s390: Use note directive for changing mask note Bagas Sanjaya
2022-07-22 8:49 ` [PATCH 2/8] Documentation: s390: use note directive for remaining notes Bagas Sanjaya
2022-07-22 8:49 ` [PATCH 3/8] Documentation: s390: sync heading underlines Bagas Sanjaya
2022-07-22 8:49 ` [PATCH 4/8] Documentation: s390: use code blocks for virsh and qemu output Bagas Sanjaya
2022-07-22 8:49 ` Bagas Sanjaya [this message]
2022-07-22 8:49 ` [PATCH 6/8] Documentation: s390: escape *kvm->arch.crypto.pqap_hook pointer inside inline code Bagas Sanjaya
2022-07-22 8:49 ` [PATCH 7/8] Documentation: s390: extend underline for matrix devices lock Bagas Sanjaya
2022-07-22 8:49 ` [PATCH 8/8] Documentation: s390: add vfio-ap-locking documentation to table of contents index Bagas Sanjaya
2022-07-22 12:02 ` [PATCH 0/8] Documentation: s390: documentation fixes for vfio_ap driver Alexander Gordeev
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=20220722084946.22965-6-bagasdotme@gmail.com \
--to=bagasdotme@gmail.com \
--cc=agordeev@linux.ibm.com \
--cc=akrowiak@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=corbet@lwn.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jjherne@linux.ibm.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pasic@linux.ibm.com \
--cc=sfr@canb.auug.org.au \
--cc=svens@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox