Skip to content

Commit badd537

Browse files
committed
Documentation: kvm: replace section numbers with links
In order to simplify further introduction of hyperlinks, replace explicit section numbers with rST hyperlinks. The section numbers could actually be removed now, but I'm not going to do a huge change throughout the file for an RFC... Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20241023124507.280382-4-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent aae7527 commit badd537

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

Documentation/virt/kvm/api.rst

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ description:
9696
Capability:
9797
which KVM extension provides this ioctl. Can be 'basic',
9898
which means that is will be provided by any kernel that supports
99-
API version 12 (see section 4.1), or a KVM_CAP_xyz constant, which
100-
means availability needs to be checked with KVM_CHECK_EXTENSION
101-
(see section 4.4).
99+
API version 12 (see :ref:`KVM_GET_API_VERSION <KVM_GET_API_VERSION>`),
100+
or a KVM_CAP_xyz constant that can be checked with
101+
:ref:`KVM_CHECK_EXTENSION <KVM_CHECK_EXTENSION>`.
102102

103103
Architectures:
104104
which instruction set architectures provide this ioctl.
@@ -115,6 +115,8 @@ description:
115115
are not detailed, but errors with specific meanings are.
116116

117117

118+
.. _KVM_GET_API_VERSION:
119+
118120
4.1 KVM_GET_API_VERSION
119121
-----------------------
120122

@@ -243,6 +245,8 @@ This list also varies by kvm version and host processor, but does not change
243245
otherwise.
244246

245247

248+
.. _KVM_CHECK_EXTENSION:
249+
246250
4.4 KVM_CHECK_EXTENSION
247251
-----------------------
248252

@@ -285,7 +289,7 @@ the VCPU file descriptor can be mmap-ed, including:
285289

286290
- if KVM_CAP_DIRTY_LOG_RING is available, a number of pages at
287291
KVM_DIRTY_LOG_PAGE_OFFSET * PAGE_SIZE. For more information on
288-
KVM_CAP_DIRTY_LOG_RING, see section 8.3.
292+
KVM_CAP_DIRTY_LOG_RING, see :ref:`KVM_CAP_DIRTY_LOG_RING`.
289293

290294

291295
4.7 KVM_CREATE_VCPU
@@ -1426,6 +1430,8 @@ because of a quirk in the virtualization implementation (see the internals
14261430
documentation when it pops into existence).
14271431

14281432

1433+
.. _KVM_ENABLE_CAP:
1434+
14291435
4.37 KVM_ENABLE_CAP
14301436
-------------------
14311437

@@ -2563,7 +2569,7 @@ Specifically:
25632569
======================= ========= ===== =======================================
25642570

25652571
.. [1] These encodings are not accepted for SVE-enabled vcpus. See
2566-
KVM_ARM_VCPU_INIT.
2572+
:ref:`KVM_ARM_VCPU_INIT`.
25672573
25682574
The equivalent register content can be accessed via bits [127:0] of
25692575
the corresponding SVE Zn registers instead for vcpus that have SVE
@@ -5075,8 +5081,8 @@ Recognised values for feature:
50755081
Finalizes the configuration of the specified vcpu feature.
50765082

50775083
The vcpu must already have been initialised, enabling the affected feature, by
5078-
means of a successful KVM_ARM_VCPU_INIT call with the appropriate flag set in
5079-
features[].
5084+
means of a successful :ref:`KVM_ARM_VCPU_INIT <KVM_ARM_VCPU_INIT>` call with the
5085+
appropriate flag set in features[].
50805086

50815087
For affected vcpu features, this is a mandatory step that must be performed
50825088
before the vcpu is fully usable.
@@ -6425,6 +6431,8 @@ the capability to be present.
64256431
`flags` must currently be zero.
64266432

64276433

6434+
.. _kvm_run:
6435+
64286436
5. The kvm_run structure
64296437
========================
64306438

@@ -7144,11 +7152,15 @@ primary storage for certain register types. Therefore, the kernel may use the
71447152
values in kvm_run even if the corresponding bit in kvm_dirty_regs is not set.
71457153

71467154

7155+
.. _cap_enable:
7156+
71477157
6. Capabilities that can be enabled on vCPUs
71487158
============================================
71497159

71507160
There are certain capabilities that change the behavior of the virtual CPU or
7151-
the virtual machine when enabled. To enable them, please see section 4.37.
7161+
the virtual machine when enabled. To enable them, please see
7162+
:ref:`KVM_ENABLE_CAP`.
7163+
71527164
Below you can find a list of capabilities and what their effect on the vCPU or
71537165
the virtual machine is when enabling them.
71547166

@@ -7357,7 +7369,7 @@ KVM API and also from the guest.
73577369
sets are supported
73587370
(bitfields defined in arch/x86/include/uapi/asm/kvm.h).
73597371

7360-
As described above in the kvm_sync_regs struct info in section 5 (kvm_run):
7372+
As described above in the kvm_sync_regs struct info in section :ref:`kvm_run`,
73617373
KVM_CAP_SYNC_REGS "allow[s] userspace to access certain guest registers
73627374
without having to call SET/GET_*REGS". This reduces overhead by eliminating
73637375
repeated ioctl calls for setting and/or getting register values. This is
@@ -7403,13 +7415,15 @@ Unused bitfields in the bitarrays must be set to zero.
74037415

74047416
This capability connects the vcpu to an in-kernel XIVE device.
74057417

7418+
.. _cap_enable_vm:
7419+
74067420
7. Capabilities that can be enabled on VMs
74077421
==========================================
74087422

74097423
There are certain capabilities that change the behavior of the virtual
7410-
machine when enabled. To enable them, please see section 4.37. Below
7411-
you can find a list of capabilities and what their effect on the VM
7412-
is when enabling them.
7424+
machine when enabled. To enable them, please see section
7425+
:ref:`KVM_ENABLE_CAP`. Below you can find a list of capabilities and
7426+
what their effect on the VM is when enabling them.
74137427

74147428
The following information is provided along with the description:
74157429

@@ -8570,6 +8584,8 @@ guest according to the bits in the KVM_CPUID_FEATURES CPUID leaf
85708584
(0x40000001). Otherwise, a guest may use the paravirtual features
85718585
regardless of what has actually been exposed through the CPUID leaf.
85728586

8587+
.. _KVM_CAP_DIRTY_LOG_RING:
8588+
85738589
8.29 KVM_CAP_DIRTY_LOG_RING/KVM_CAP_DIRTY_LOG_RING_ACQ_REL
85748590
----------------------------------------------------------
85758591

0 commit comments

Comments
 (0)