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 20/27] docs: kvm: Convert hypercalls.txt to ReST format
Date: Thu,  6 Feb 2020 15:50:17 +0100	[thread overview]
Message-ID: <53e029bc971c533143c153940e8c28ce7f920de3.1581000481.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1581000481.git.mchehab+huawei@kernel.org>

- Use document title and chapter markups;
- Convert tables;
- Add markups for literal blocks;
- use :field: for field descriptions;
- Add blank lines and adjust indentation

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 .../kvm/{hypercalls.txt => hypercalls.rst}    | 129 ++++++++++--------
 Documentation/virt/kvm/index.rst              |   2 +
 2 files changed, 75 insertions(+), 56 deletions(-)
 rename Documentation/virt/kvm/{hypercalls.txt => hypercalls.rst} (55%)

diff --git a/Documentation/virt/kvm/hypercalls.txt b/Documentation/virt/kvm/hypercalls.rst
similarity index 55%
rename from Documentation/virt/kvm/hypercalls.txt
rename to Documentation/virt/kvm/hypercalls.rst
index 5f6d291bd004..dbaf207e560d 100644
--- a/Documentation/virt/kvm/hypercalls.txt
+++ b/Documentation/virt/kvm/hypercalls.rst
@@ -1,5 +1,9 @@
-Linux KVM Hypercall:
+.. SPDX-License-Identifier: GPL-2.0
+
 ===================
+Linux KVM Hypercall
+===================
+
 X86:
  KVM Hypercalls have a three-byte sequence of either the vmcall or the vmmcall
  instruction. The hypervisor can replace it with instructions that are
@@ -20,7 +24,7 @@ S390:
   For further information on the S390 diagnose call as supported by KVM,
   refer to Documentation/virt/kvm/s390-diag.txt.
 
- PowerPC:
+PowerPC:
   It uses R3-R10 and hypercall number in R11. R4-R11 are used as output registers.
   Return value is placed in R3.
 
@@ -34,7 +38,8 @@ MIPS:
   the return value is placed in $2 (v0).
 
 KVM Hypercalls Documentation
-===========================
+============================
+
 The template for each hypercall is:
 1. Hypercall name.
 2. Architecture(s)
@@ -43,56 +48,64 @@ The template for each hypercall is:
 
 1. KVM_HC_VAPIC_POLL_IRQ
 ------------------------
-Architecture: x86
-Status: active
-Purpose: Trigger guest exit so that the host can check for pending
-interrupts on reentry.
+
+:Architecture: x86
+:Status: active
+:Purpose: Trigger guest exit so that the host can check for pending
+          interrupts on reentry.
 
 2. KVM_HC_MMU_OP
-------------------------
-Architecture: x86
-Status: deprecated.
-Purpose: Support MMU operations such as writing to PTE,
-flushing TLB, release PT.
+----------------
+
+:Architecture: x86
+:Status: deprecated.
+:Purpose: Support MMU operations such as writing to PTE,
+          flushing TLB, release PT.
 
 3. KVM_HC_FEATURES
-------------------------
-Architecture: PPC
-Status: active
-Purpose: Expose hypercall availability to the guest. On x86 platforms, cpuid
-used to enumerate which hypercalls are available. On PPC, either device tree
-based lookup ( which is also what EPAPR dictates) OR KVM specific enumeration
-mechanism (which is this hypercall) can be used.
+------------------
+
+:Architecture: PPC
+:Status: active
+:Purpose: Expose hypercall availability to the guest. On x86 platforms, cpuid
+          used to enumerate which hypercalls are available. On PPC, either
+	  device tree based lookup ( which is also what EPAPR dictates)
+	  OR KVM specific enumeration mechanism (which is this hypercall)
+	  can be used.
 
 4. KVM_HC_PPC_MAP_MAGIC_PAGE
-------------------------
-Architecture: PPC
-Status: active
-Purpose: To enable communication between the hypervisor and guest there is a
-shared page that contains parts of supervisor visible register state.
-The guest can map this shared page to access its supervisor register through
-memory using this hypercall.
+----------------------------
+
+:Architecture: PPC
+:Status: active
+:Purpose: To enable communication between the hypervisor and guest there is a
+	  shared page that contains parts of supervisor visible register state.
+	  The guest can map this shared page to access its supervisor register
+	  through memory using this hypercall.
 
 5. KVM_HC_KICK_CPU
-------------------------
-Architecture: x86
-Status: active
-Purpose: Hypercall used to wakeup a vcpu from HLT state
-Usage example : A vcpu of a paravirtualized guest that is busywaiting in guest
-kernel mode for an event to occur (ex: a spinlock to become available) can
-execute HLT instruction once it has busy-waited for more than a threshold
-time-interval. Execution of HLT instruction would cause the hypervisor to put
-the vcpu to sleep until occurrence of an appropriate event. Another vcpu of the
-same guest can wakeup the sleeping vcpu by issuing KVM_HC_KICK_CPU hypercall,
-specifying APIC ID (a1) of the vcpu to be woken up. An additional argument (a0)
-is used in the hypercall for future use.
+------------------
+
+:Architecture: x86
+:Status: active
+:Purpose: Hypercall used to wakeup a vcpu from HLT state
+:Usage example:
+  A vcpu of a paravirtualized guest that is busywaiting in guest
+  kernel mode for an event to occur (ex: a spinlock to become available) can
+  execute HLT instruction once it has busy-waited for more than a threshold
+  time-interval. Execution of HLT instruction would cause the hypervisor to put
+  the vcpu to sleep until occurrence of an appropriate event. Another vcpu of the
+  same guest can wakeup the sleeping vcpu by issuing KVM_HC_KICK_CPU hypercall,
+  specifying APIC ID (a1) of the vcpu to be woken up. An additional argument (a0)
+  is used in the hypercall for future use.
 
 
 6. KVM_HC_CLOCK_PAIRING
-------------------------
-Architecture: x86
-Status: active
-Purpose: Hypercall used to synchronize host and guest clocks.
+-----------------------
+:Architecture: x86
+:Status: active
+:Purpose: Hypercall used to synchronize host and guest clocks.
+
 Usage:
 
 a0: guest physical address where host copies
@@ -101,6 +114,8 @@ a0: guest physical address where host copies
 a1: clock_type, ATM only KVM_CLOCK_PAIRING_WALLCLOCK (0)
 is supported (corresponding to the host's CLOCK_REALTIME clock).
 
+       ::
+
 		struct kvm_clock_pairing {
 			__s64 sec;
 			__s64 nsec;
@@ -123,15 +138,16 @@ Returns KVM_EOPNOTSUPP if the host does not use TSC clocksource,
 or if clock type is different than KVM_CLOCK_PAIRING_WALLCLOCK.
 
 6. KVM_HC_SEND_IPI
-------------------------
-Architecture: x86
-Status: active
-Purpose: Send IPIs to multiple vCPUs.
+------------------
 
-a0: lower part of the bitmap of destination APIC IDs
-a1: higher part of the bitmap of destination APIC IDs
-a2: the lowest APIC ID in bitmap
-a3: APIC ICR
+:Architecture: x86
+:Status: active
+:Purpose: Send IPIs to multiple vCPUs.
+
+- a0: lower part of the bitmap of destination APIC IDs
+- a1: higher part of the bitmap of destination APIC IDs
+- a2: the lowest APIC ID in bitmap
+- a3: APIC ICR
 
 The hypercall lets a guest send multicast IPIs, with at most 128
 128 destinations per hypercall in 64-bit mode and 64 vCPUs per
@@ -143,12 +159,13 @@ corresponds to the APIC ID a2+1, and so on.
 Returns the number of CPUs to which the IPIs were delivered successfully.
 
 7. KVM_HC_SCHED_YIELD
-------------------------
-Architecture: x86
-Status: active
-Purpose: Hypercall used to yield if the IPI target vCPU is preempted
+---------------------
+
+:Architecture: x86
+:Status: active
+:Purpose: Hypercall used to yield if the IPI target vCPU is preempted
 
 a0: destination APIC ID
 
-Usage example: When sending a call-function IPI-many to vCPUs, yield if
-any of the IPI target vCPUs was preempted.
+:Usage example: When sending a call-function IPI-many to vCPUs, yield if
+	        any of the IPI target vCPUs was preempted.
diff --git a/Documentation/virt/kvm/index.rst b/Documentation/virt/kvm/index.rst
index 6fe79185b9bc..ac83bc588f7e 100644
--- a/Documentation/virt/kvm/index.rst
+++ b/Documentation/virt/kvm/index.rst
@@ -11,8 +11,10 @@ KVM
    amd-memory-encryption
    cpuid
    halt-polling
+   hypercalls
    msr
    vcpu-requests
 
    arm/index
+
    devices/index
-- 
2.24.1


  parent reply	other threads:[~2020-02-06 14:51 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 ` [PATCH v2 07/27] docs: kvm: devices/arm-vgic-its.txt " Mauro Carvalho Chehab
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 ` Mauro Carvalho Chehab [this message]
2020-02-06 14:50 ` [PATCH v2 21/27] docs: kvm: Convert locking.txt to ReST format 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=53e029bc971c533143c153940e8c28ce7f920de3.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.