Skip to content

Commit df01f0a

Browse files
calmisisean-jc
authored andcommitted
KVM: x86: Improve documentation of MSR_KVM_ASYNC_PF_EN
Fix some incorrect statement of MSR_KVM_ASYNC_PF_EN documentation and state clearly the token in 'struct kvm_vcpu_pv_apf_data' of 'page ready' event is matchted with the token in CR2 in 'page not present' event. Signed-off-by: Xiaoyao Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent ccb2280 commit df01f0a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Documentation/virt/kvm/x86/msr.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ data:
193193
Asynchronous page fault (APF) control MSR.
194194

195195
Bits 63-6 hold 64-byte aligned physical address of a 64 byte memory area
196-
which must be in guest RAM and must be zeroed. This memory is expected
197-
to hold a copy of the following structure::
196+
which must be in guest RAM. This memory is expected to hold the
197+
following structure::
198198

199199
struct kvm_vcpu_pv_apf_data {
200200
/* Used for 'page not present' events delivered via #PF */
@@ -231,14 +231,14 @@ data:
231231
as regular page fault, guest must reset 'flags' to '0' before it does
232232
something that can generate normal page fault.
233233

234-
Bytes 5-7 of 64 byte memory location ('token') will be written to by the
234+
Bytes 4-7 of 64 byte memory location ('token') will be written to by the
235235
hypervisor at the time of APF 'page ready' event injection. The content
236-
of these bytes is a token which was previously delivered as 'page not
237-
present' event. The event indicates the page in now available. Guest is
238-
supposed to write '0' to 'token' when it is done handling 'page ready'
239-
event and to write 1' to MSR_KVM_ASYNC_PF_ACK after clearing the location;
240-
writing to the MSR forces KVM to re-scan its queue and deliver the next
241-
pending notification.
236+
of these bytes is a token which was previously delivered in CR2 as
237+
'page not present' event. The event indicates the page is now available.
238+
Guest is supposed to write '0' to 'token' when it is done handling
239+
'page ready' event and to write '1' to MSR_KVM_ASYNC_PF_ACK after
240+
clearing the location; writing to the MSR forces KVM to re-scan its
241+
queue and deliver the next pending notification.
242242

243243
Note, MSR_KVM_ASYNC_PF_INT MSR specifying the interrupt vector for 'page
244244
ready' APF delivery needs to be written to before enabling APF mechanism

0 commit comments

Comments
 (0)