All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	kvm@vger.kernel.org, linux-doc@vger.kernel.org
Subject: [PATCH v2 07/27] docs: kvm: devices/arm-vgic-its.txt to ReST format
Date: Thu,  6 Feb 2020 15:50:04 +0100	[thread overview]
Message-ID: <ff61f78f76020b256f6695d084306435bf14721c.1581000481.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1581000481.git.mchehab+huawei@kernel.org>

- Fix document title to match ReST format
- Convert the table to be properly recognized
- use proper markups for literal blocks
- Some indentation fixes to match ReST

While here, add an index for kvm devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 .../{arm-vgic-its.txt => arm-vgic-its.rst}    | 106 +++++++++++-------
 Documentation/virt/kvm/devices/index.rst      |  10 ++
 Documentation/virt/kvm/index.rst              |   1 +
 3 files changed, 78 insertions(+), 39 deletions(-)
 rename Documentation/virt/kvm/devices/{arm-vgic-its.txt => arm-vgic-its.rst} (71%)
 create mode 100644 Documentation/virt/kvm/devices/index.rst

diff --git a/Documentation/virt/kvm/devices/arm-vgic-its.txt b/Documentation/virt/kvm/devices/arm-vgic-its.rst
similarity index 71%
rename from Documentation/virt/kvm/devices/arm-vgic-its.txt
rename to Documentation/virt/kvm/devices/arm-vgic-its.rst
index eeaa95b893a8..6c304fd2b1b4 100644
--- a/Documentation/virt/kvm/devices/arm-vgic-its.txt
+++ b/Documentation/virt/kvm/devices/arm-vgic-its.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+===============================================
 ARM Virtual Interrupt Translation Service (ITS)
 ===============================================
 
@@ -12,22 +15,32 @@ There can be multiple ITS controllers per guest, each of them has to have
 a separate, non-overlapping MMIO region.
 
 
-Groups:
-  KVM_DEV_ARM_VGIC_GRP_ADDR
+Groups
+======
+
+KVM_DEV_ARM_VGIC_GRP_ADDR
+-------------------------
+
   Attributes:
     KVM_VGIC_ITS_ADDR_TYPE (rw, 64-bit)
       Base address in the guest physical address space of the GICv3 ITS
       control register frame.
       This address needs to be 64K aligned and the region covers 128K.
+
   Errors:
-    -E2BIG:  Address outside of addressable IPA range
-    -EINVAL: Incorrectly aligned address
-    -EEXIST: Address already configured
-    -EFAULT: Invalid user pointer for attr->addr.
-    -ENODEV: Incorrect attribute or the ITS is not supported.
 
+    =======  =================================================
+    -E2BIG   Address outside of addressable IPA range
+    -EINVAL  Incorrectly aligned address
+    -EEXIST  Address already configured
+    -EFAULT  Invalid user pointer for attr->addr.
+    -ENODEV  Incorrect attribute or the ITS is not supported.
+    =======  =================================================
+
+
+KVM_DEV_ARM_VGIC_GRP_CTRL
+-------------------------
 
-  KVM_DEV_ARM_VGIC_GRP_CTRL
   Attributes:
     KVM_DEV_ARM_VGIC_CTRL_INIT
       request the initialization of the ITS, no additional parameter in
@@ -58,16 +71,21 @@ Groups:
       "ITS Restore Sequence".
 
   Errors:
-    -ENXIO:  ITS not properly configured as required prior to setting
+
+    =======  ==========================================================
+     -ENXIO  ITS not properly configured as required prior to setting
              this attribute
-    -ENOMEM: Memory shortage when allocating ITS internal data
-    -EINVAL: Inconsistent restored data
-    -EFAULT: Invalid guest ram access
-    -EBUSY:  One or more VCPUS are running
-    -EACCES: The virtual ITS is backed by a physical GICv4 ITS, and the
+    -ENOMEM  Memory shortage when allocating ITS internal data
+    -EINVAL  Inconsistent restored data
+    -EFAULT  Invalid guest ram access
+    -EBUSY   One or more VCPUS are running
+    -EACCES  The virtual ITS is backed by a physical GICv4 ITS, and the
 	     state is not available
+    =======  ==========================================================
+
+KVM_DEV_ARM_VGIC_GRP_ITS_REGS
+-----------------------------
 
-  KVM_DEV_ARM_VGIC_GRP_ITS_REGS
   Attributes:
       The attr field of kvm_device_attr encodes the offset of the
       ITS register, relative to the ITS control frame base address
@@ -78,6 +96,7 @@ Groups:
       be accessed with full length.
 
       Writes to read-only registers are ignored by the kernel except for:
+
       - GITS_CREADR. It must be restored otherwise commands in the queue
         will be re-executed after restoring CWRITER. GITS_CREADR must be
         restored before restoring the GITS_CTLR which is likely to enable the
@@ -91,30 +110,36 @@ Groups:
 
       For other registers, getting or setting a register has the same
       effect as reading/writing the register on real hardware.
+
   Errors:
-    -ENXIO: Offset does not correspond to any supported register
-    -EFAULT: Invalid user pointer for attr->addr
-    -EINVAL: Offset is not 64-bit aligned
-    -EBUSY: one or more VCPUS are running
 
- ITS Restore Sequence:
- -------------------------
+    =======  ====================================================
+    -ENXIO   Offset does not correspond to any supported register
+    -EFAULT  Invalid user pointer for attr->addr
+    -EINVAL  Offset is not 64-bit aligned
+    -EBUSY   one or more VCPUS are running
+    =======  ====================================================
+
+ITS Restore Sequence:
+---------------------
 
 The following ordering must be followed when restoring the GIC and the ITS:
+
 a) restore all guest memory and create vcpus
 b) restore all redistributors
 c) provide the ITS base address
    (KVM_DEV_ARM_VGIC_GRP_ADDR)
 d) restore the ITS in the following order:
-   1. Restore GITS_CBASER
-   2. Restore all other GITS_ registers, except GITS_CTLR!
-   3. Load the ITS table data (KVM_DEV_ARM_ITS_RESTORE_TABLES)
-   4. Restore GITS_CTLR
+
+     1. Restore GITS_CBASER
+     2. Restore all other ``GITS_`` registers, except GITS_CTLR!
+     3. Load the ITS table data (KVM_DEV_ARM_ITS_RESTORE_TABLES)
+     4. Restore GITS_CTLR
 
 Then vcpus can be started.
 
- ITS Table ABI REV0:
- -------------------
+ITS Table ABI REV0:
+-------------------
 
  Revision 0 of the ABI only supports the features of a virtual GICv3, and does
  not support a virtual GICv4 with support for direct injection of virtual
@@ -125,12 +150,13 @@ Then vcpus can be started.
  entries in the collection are listed in no particular order.
  All entries are 8 bytes.
 
- Device Table Entry (DTE):
+ Device Table Entry (DTE)::
 
- bits:     | 63| 62 ... 49 | 48 ... 5 | 4 ... 0 |
- values:   | V |   next    | ITT_addr |  Size   |
+   bits:     | 63| 62 ... 49 | 48 ... 5 | 4 ... 0 |
+   values:   | V |   next    | ITT_addr |  Size   |
+
+ where:
 
- where;
  - V indicates whether the entry is valid. If not, other fields
    are not meaningful.
  - next: equals to 0 if this entry is the last one; otherwise it
@@ -140,32 +166,34 @@ Then vcpus can be started.
  - Size specifies the supported number of bits for the EventID,
    minus one
 
- Collection Table Entry (CTE):
+ Collection Table Entry (CTE)::
 
- bits:     | 63| 62 ..  52  | 51 ... 16 | 15  ...   0 |
- values:   | V |    RES0    |  RDBase   |    ICID     |
+   bits:     | 63| 62 ..  52  | 51 ... 16 | 15  ...   0 |
+   values:   | V |    RES0    |  RDBase   |    ICID     |
 
  where:
+
  - V indicates whether the entry is valid. If not, other fields are
    not meaningful.
  - RES0: reserved field with Should-Be-Zero-or-Preserved behavior.
  - RDBase is the PE number (GICR_TYPER.Processor_Number semantic),
  - ICID is the collection ID
 
- Interrupt Translation Entry (ITE):
+ Interrupt Translation Entry (ITE)::
 
- bits:     | 63 ... 48 | 47 ... 16 | 15 ... 0 |
- values:   |    next   |   pINTID  |  ICID    |
+   bits:     | 63 ... 48 | 47 ... 16 | 15 ... 0 |
+   values:   |    next   |   pINTID  |  ICID    |
 
  where:
+
  - next: equals to 0 if this entry is the last one; otherwise it corresponds
    to the EventID offset to the next ITE capped by 2^16 -1.
  - pINTID is the physical LPI ID; if zero, it means the entry is not valid
    and other fields are not meaningful.
  - ICID is the collection ID
 
- ITS Reset State:
- ----------------
+ITS Reset State:
+----------------
 
 RESET returns the ITS to the same state that it was when first created and
 initialized. When the RESET command returns, the following things are
diff --git a/Documentation/virt/kvm/devices/index.rst b/Documentation/virt/kvm/devices/index.rst
new file mode 100644
index 000000000000..2aad8d426097
--- /dev/null
+++ b/Documentation/virt/kvm/devices/index.rst
@@ -0,0 +1,10 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=======
+Devices
+=======
+
+.. toctree::
+   :maxdepth: 2
+
+   arm-vgic-its
diff --git a/Documentation/virt/kvm/index.rst b/Documentation/virt/kvm/index.rst
index cc6dde47b267..24d1076ec680 100644
--- a/Documentation/virt/kvm/index.rst
+++ b/Documentation/virt/kvm/index.rst
@@ -14,3 +14,4 @@ KVM
    vcpu-requests
 
    arm/index
+   devices/index
-- 
2.24.1


  parent reply	other threads:[~2020-02-06 14:50 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 14:49 [PATCH v2 00/27] docs: virt: manually convert text documents to ReST format Mauro Carvalho Chehab
2020-02-06 14:49 ` Mauro Carvalho Chehab
2020-02-06 14:49 ` [PATCH v2 01/27] docs: kvm: add arm/pvtime.rst to index.rst Mauro Carvalho Chehab
2020-02-06 14:49 ` [PATCH v2 02/27] docs: virt: convert UML documentation to ReST Mauro Carvalho Chehab
2020-02-06 14:49   ` Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 03/27] docs: virt: user_mode_linux.rst: update compiling instructions Mauro Carvalho Chehab
2020-02-06 14:50   ` Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 04/27] docs: virt: user_mode_linux.rst: fix URL references Mauro Carvalho Chehab
2020-02-06 14:50   ` Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 05/27] docs: virt: convert halt-polling.txt to ReST format Mauro Carvalho Chehab
2020-02-06 15:41   ` Cornelia Huck
2020-02-06 14:50 ` [PATCH v2 06/27] docs: virt: Convert msr.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` Mauro Carvalho Chehab [this message]
2020-02-06 14:50 ` [PATCH v2 08/27] docs: kvm: devices/arm-vgit-v3.txt to ReST Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 09/27] docs: kvm: convert devices/arm-vgit.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 10/27] docs: kvm: convert devices/mpic.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 11/27] docs: kvm: convert devices/s390_flic.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 12/27] docs: kvm: convert devices/vcpu.txt " Mauro Carvalho Chehab
2020-02-06 15:47   ` Cornelia Huck
2020-02-06 14:50 ` [PATCH v2 13/27] " Mauro Carvalho Chehab
2020-02-06 15:54   ` Cornelia Huck
2020-02-06 14:50 ` [PATCH v2 14/27] docs: kvm: convert devices/vm.txt " Mauro Carvalho Chehab
2020-02-06 15:57   ` Cornelia Huck
2020-02-06 14:50 ` [PATCH v2 15/27] docs: kvm: convert devices/xics.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 16/27] docs: kvm: convert devices/xive.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 17/27] docs: kvm: Convert api.txt to ReST format Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 18/27] docs: kvm: convert arm/hyp-abi.txt to ReST Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 19/27] docs: kvm: arm/psci.txt: convert " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 20/27] docs: kvm: Convert hypercalls.txt to ReST format Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 21/27] docs: kvm: Convert locking.txt " Mauro Carvalho Chehab
2020-02-06 16:11   ` Cornelia Huck
2020-02-06 21:57     ` Paolo Bonzini
2020-02-06 22:47       ` Mauro Carvalho Chehab
2020-02-06 23:13         ` Paolo Bonzini
2020-02-07  6:24         ` Mauro Carvalho Chehab
2020-02-07  8:48           ` Cornelia Huck
2020-02-10  5:58             ` Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 22/27] docs: kvm: Convert mmu.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 23/27] docs: kvm: Convert nested-vmx.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 24/27] docs: kvm: Convert ppc-pv.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 25/27] docs: kvm: Convert s390-diag.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 26/27] docs: kvm: Convert timekeeping.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 27/27] docs: kvm: review-checklist.txt: rename to ReST Mauro Carvalho Chehab
2020-02-06 16:13   ` Cornelia Huck
2020-02-06 15:18 ` [PATCH v2 00/27] docs: virt: manually convert text documents to ReST format Paolo Bonzini
2020-02-06 15:18   ` Paolo Bonzini
2020-02-06 16:17 ` Cornelia Huck
2020-02-06 16:17   ` Cornelia Huck
2020-02-06 16:21   ` Mauro Carvalho Chehab
2020-02-06 16:21     ` Mauro Carvalho Chehab

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=ff61f78f76020b256f6695d084306435bf14721c.1581000481.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=pbonzini@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.