diff options
author | Avi Kivity <avi@redhat.com> | 2010-05-27 09:44:12 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 03:39:23 -0400 |
commit | 316b95216e277cdb22bd65346f9b9d9e10d0f53d (patch) | |
tree | 5bd4d6bdd07aa8520c2a6998f0bc1764f97d0d57 /Documentation/kvm | |
parent | ec87fe2afcbcc4f430554980ec3e408bae34229d (diff) |
KVM: MMU: Document large pages
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'Documentation/kvm')
-rw-r--r-- | Documentation/kvm/mmu.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 1e7ecdd15bba..8cb42b957c73 100644 --- a/Documentation/kvm/mmu.txt +++ b/Documentation/kvm/mmu.txt | |||
@@ -317,6 +317,29 @@ on fault type: | |||
317 | 317 | ||
318 | (user write faults generate a #PF) | 318 | (user write faults generate a #PF) |
319 | 319 | ||
320 | Large pages | ||
321 | =========== | ||
322 | |||
323 | The mmu supports all combinations of large and small guest and host pages. | ||
324 | Supported page sizes include 4k, 2M, 4M, and 1G. 4M pages are treated as | ||
325 | two separate 2M pages, on both guest and host, since the mmu always uses PAE | ||
326 | paging. | ||
327 | |||
328 | To instantiate a large spte, four constraints must be satisfied: | ||
329 | |||
330 | - the spte must point to a large host page | ||
331 | - the guest pte must be a large pte of at least equivalent size (if tdp is | ||
332 | enabled, there is no guest pte and this condition is satisified) | ||
333 | - if the spte will be writeable, the large page frame may not overlap any | ||
334 | write-protected pages | ||
335 | - the guest page must be wholly contained by a single memory slot | ||
336 | |||
337 | To check the last two conditions, the mmu maintains a ->write_count set of | ||
338 | arrays for each memory slot and large page size. Every write protected page | ||
339 | causes its write_count to be incremented, thus preventing instantiation of | ||
340 | a large spte. The frames at the end of an unaligned memory slot have | ||
341 | artificically inflated ->write_counts so they can never be instantiated. | ||
342 | |||
320 | Further reading | 343 | Further reading |
321 | =============== | 344 | =============== |
322 | 345 | ||