diff options
author | Marcelo Tosatti <marcelo@kvack.org> | 2008-02-23 09:44:30 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 04:53:25 -0400 |
commit | 05da45583de9b383dc81dd695fe248431d6c9f2b (patch) | |
tree | a76d699e60aca4f775d5f67254214654235e2e17 /include/linux/kvm_host.h | |
parent | 2e53d63acba75795aa226febd140f67c58c6a353 (diff) |
KVM: MMU: large page support
Create large pages mappings if the guest PTE's are marked as such and
the underlying memory is hugetlbfs backed. If the largepage contains
write-protected pages, a large pte is not used.
Gives a consistent 2% improvement for data copies on ram mounted
filesystem, without NPT/EPT.
Anthony measures a 4% improvement on 4-way kernbench, with NPT.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 994278fb5883..9750bb3c5a75 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -103,6 +103,10 @@ struct kvm_memory_slot { | |||
103 | unsigned long flags; | 103 | unsigned long flags; |
104 | unsigned long *rmap; | 104 | unsigned long *rmap; |
105 | unsigned long *dirty_bitmap; | 105 | unsigned long *dirty_bitmap; |
106 | struct { | ||
107 | unsigned long rmap_pde; | ||
108 | int write_count; | ||
109 | } *lpage_info; | ||
106 | unsigned long userspace_addr; | 110 | unsigned long userspace_addr; |
107 | int user_alloc; | 111 | int user_alloc; |
108 | }; | 112 | }; |
@@ -169,6 +173,7 @@ int kvm_arch_set_memory_region(struct kvm *kvm, | |||
169 | int user_alloc); | 173 | int user_alloc); |
170 | gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn); | 174 | gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn); |
171 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); | 175 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); |
176 | unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn); | ||
172 | void kvm_release_page_clean(struct page *page); | 177 | void kvm_release_page_clean(struct page *page); |
173 | void kvm_release_page_dirty(struct page *page); | 178 | void kvm_release_page_dirty(struct page *page); |
174 | int kvm_read_guest_page(struct kvm *kvm, gfn_t gfn, void *data, int offset, | 179 | int kvm_read_guest_page(struct kvm *kvm, gfn_t gfn, void *data, int offset, |