diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2013-06-19 05:09:22 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-06-27 07:20:44 -0400 |
commit | 67652ed34390b19ede6f847d23d8c68e2c819b50 (patch) | |
tree | e0fbd626e7f812fddbc3ea46fe96cc079fdd7ca8 /Documentation/virtual | |
parent | 0cbf8e437b60b8b12d97589509d3e5a581731d36 (diff) |
KVM: MMU: document mmio page fault
Document it to Documentation/virtual/kvm/mmu.txt
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation/virtual')
-rw-r--r-- | Documentation/virtual/kvm/mmu.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/virtual/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt index 0db7743c55e1..0aa8e0e34119 100644 --- a/Documentation/virtual/kvm/mmu.txt +++ b/Documentation/virtual/kvm/mmu.txt | |||
@@ -272,14 +272,21 @@ This is the most complicated event. The cause of a page fault can be: | |||
272 | 272 | ||
273 | Handling a page fault is performed as follows: | 273 | Handling a page fault is performed as follows: |
274 | 274 | ||
275 | - if the RSV bit of the error code is set, the page fault is caused by guest | ||
276 | accessing MMIO and cached MMIO information is available. | ||
277 | - walk shadow page table | ||
278 | - cache the information to vcpu->arch.mmio_gva, vcpu->arch.access and | ||
279 | vcpu->arch.mmio_gfn, and call the emulator | ||
275 | - if needed, walk the guest page tables to determine the guest translation | 280 | - if needed, walk the guest page tables to determine the guest translation |
276 | (gva->gpa or ngpa->gpa) | 281 | (gva->gpa or ngpa->gpa) |
277 | - if permissions are insufficient, reflect the fault back to the guest | 282 | - if permissions are insufficient, reflect the fault back to the guest |
278 | - determine the host page | 283 | - determine the host page |
279 | - if this is an mmio request, there is no host page; call the emulator | 284 | - if this is an mmio request, there is no host page; cache the info to |
280 | to emulate the instruction instead | 285 | vcpu->arch.mmio_gva, vcpu->arch.access and vcpu->arch.mmio_gfn |
281 | - walk the shadow page table to find the spte for the translation, | 286 | - walk the shadow page table to find the spte for the translation, |
282 | instantiating missing intermediate page tables as necessary | 287 | instantiating missing intermediate page tables as necessary |
288 | - If this is an mmio request, cache the mmio info to the spte and set some | ||
289 | reserved bit on the spte (see callers of kvm_mmu_set_mmio_spte_mask) | ||
283 | - try to unsynchronize the page | 290 | - try to unsynchronize the page |
284 | - if successful, we can let the guest continue and modify the gpte | 291 | - if successful, we can let the guest continue and modify the gpte |
285 | - emulate the instruction | 292 | - emulate the instruction |