Skip to content

Commit c849d86

Browse files
mchehabbonzini
authored andcommitted
docs: kvm: Convert ppc-pv.txt to ReST format
- Use document title and chapter markups; - Add markups for tables; - Use list markups; - Add markups for literal blocks; - Add blank lines. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 320f3f7 commit c849d86

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

Documentation/virt/kvm/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ KVM
1616
mmu
1717
msr
1818
nested-vmx
19+
ppc-pv
1920
vcpu-requests
2021

2122
arm/index

Documentation/virt/kvm/ppc-pv.txt renamed to Documentation/virt/kvm/ppc-pv.rst

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
=================================
14
The PPC KVM paravirtual interface
25
=================================
36

@@ -34,8 +37,9 @@ up the hypercall. To call a hypercall, just call these instructions.
3437

3538
The parameters are as follows:
3639

40+
======== ================ ================
3741
Register IN OUT
38-
42+
======== ================ ================
3943
r0 - volatile
4044
r3 1st parameter Return code
4145
r4 2nd parameter 1st output value
@@ -47,18 +51,21 @@ The parameters are as follows:
4751
r10 8th parameter 7th output value
4852
r11 hypercall number 8th output value
4953
r12 - volatile
54+
======== ================ ================
5055

5156
Hypercall definitions are shared in generic code, so the same hypercall numbers
5257
apply for x86 and powerpc alike with the exception that each KVM hypercall
5358
also needs to be ORed with the KVM vendor code which is (42 << 16).
5459

5560
Return codes can be as follows:
5661

62+
==== =========================
5763
Code Meaning
58-
64+
==== =========================
5965
0 Success
6066
12 Hypercall not implemented
6167
<0 Error
68+
==== =========================
6269

6370
The magic page
6471
==============
@@ -72,7 +79,7 @@ desired location. The first parameter indicates the effective address when the
7279
MMU is enabled. The second parameter indicates the address in real mode, if
7380
applicable to the target. For now, we always map the page to -4096. This way we
7481
can access it using absolute load and store functions. The following
75-
instruction reads the first field of the magic page:
82+
instruction reads the first field of the magic page::
7683

7784
ld rX, -4096(0)
7885

@@ -93,8 +100,10 @@ a bitmap of available features inside the magic page.
93100

94101
The following enhancements to the magic page are currently available:
95102

103+
============================ =======================================
96104
KVM_MAGIC_FEAT_SR Maps SR registers r/w in the magic page
97105
KVM_MAGIC_FEAT_MAS0_TO_SPRG7 Maps MASn, ESR, PIR and high SPRGs
106+
============================ =======================================
98107

99108
For enhanced features in the magic page, please check for the existence of the
100109
feature before using them!
@@ -121,8 +130,8 @@ when entering the guest or don't have any impact on the hypervisor's behavior.
121130

122131
The following bits are safe to be set inside the guest:
123132

124-
MSR_EE
125-
MSR_RI
133+
- MSR_EE
134+
- MSR_RI
126135

127136
If any other bit changes in the MSR, please still use mtmsr(d).
128137

@@ -138,9 +147,9 @@ guest. Implementing any of those mappings is optional, as the instruction traps
138147
also act on the shared page. So calling privileged instructions still works as
139148
before.
140149

150+
======================= ================================
141151
From To
142-
==== ==
143-
152+
======================= ================================
144153
mfmsr rX ld rX, magic_page->msr
145154
mfsprg rX, 0 ld rX, magic_page->sprg0
146155
mfsprg rX, 1 ld rX, magic_page->sprg1
@@ -173,7 +182,7 @@ mtsrin rX, rY b <special mtsrin section>
173182

174183
[BookE only]
175184
wrteei [0|1] b <special wrteei section>
176-
185+
======================= ================================
177186

178187
Some instructions require more logic to determine what's going on than a load
179188
or store instruction can deliver. To enable patching of those, we keep some
@@ -191,6 +200,7 @@ for example.
191200

192201
Hypercall ABIs in KVM on PowerPC
193202
=================================
203+
194204
1) KVM hypercalls (ePAPR)
195205

196206
These are ePAPR compliant hypercall implementation (mentioned above). Even

0 commit comments

Comments
 (0)