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 20/28] docs: kvm: Convert hypercalls.txt to ReST format
Date: Mon, 10 Feb 2020 07:02:58 +0100 [thread overview]
Message-ID: <48904ada2b9d61f513fc081358cbc4406926c999.1581314317.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1581314316.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
next prev parent reply other threads:[~2020-02-10 6:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 6:02 [PATCH 00/28] docs: virt: manually convert text documents to ReST format Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 01/28] docs: kvm: add arm/pvtime.rst to index.rst Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 03/28] docs: virt: user_mode_linux.rst: update compiling instructions Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 04/28] docs: virt: user_mode_linux.rst: fix URL references Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 05/28] docs: virt: convert halt-polling.txt to ReST format Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 06/28] docs: virt: Convert msr.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 07/28] docs: kvm: devices/arm-vgic-its.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 08/28] docs: kvm: devices/arm-vgit-v3.txt to ReST Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 09/28] docs: kvm: convert devices/arm-vgit.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 10/28] docs: kvm: convert devices/mpic.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 11/28] docs: kvm: convert devices/s390_flic.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 12/28] docs: kvm: convert devices/vcpu.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 13/28] docs: kvm: convert devices/vfio.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 14/28] docs: kvm: convert devices/vm.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 15/28] docs: kvm: convert devices/xics.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 16/28] docs: kvm: convert devices/xive.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 18/28] docs: kvm: convert arm/hyp-abi.txt " Mauro Carvalho Chehab
2020-02-10 6:02 ` [PATCH 19/28] docs: kvm: arm/psci.txt: convert " Mauro Carvalho Chehab
2020-02-10 6:02 ` Mauro Carvalho Chehab [this message]
2020-02-10 6:02 ` [PATCH 21/28] docs: kvm: Convert locking.txt to ReST format Mauro Carvalho Chehab
2020-02-10 6:03 ` [PATCH 22/28] docs: kvm: Convert mmu.txt " Mauro Carvalho Chehab
2020-02-10 6:03 ` [PATCH 23/28] docs: kvm: Convert nested-vmx.txt " Mauro Carvalho Chehab
2020-02-10 6:03 ` [PATCH 24/28] docs: kvm: Convert ppc-pv.txt " Mauro Carvalho Chehab
2020-02-10 6:03 ` [PATCH 25/28] docs: kvm: Convert s390-diag.txt " Mauro Carvalho Chehab
2020-02-10 6:03 ` [PATCH 26/28] docs: kvm: Convert timekeeping.txt " Mauro Carvalho Chehab
2020-02-10 6:03 ` [PATCH 27/28] docs: kvm: review-checklist.txt: rename to ReST Mauro Carvalho Chehab
2020-02-10 6:03 ` [PATCH 28/28] docs: virt: guest-halt-polling.txt convert " Mauro Carvalho Chehab
2020-02-12 13:57 ` [PATCH 00/28] docs: virt: manually convert text documents to ReST format Paolo Bonzini
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=48904ada2b9d61f513fc081358cbc4406926c999.1581314317.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 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).