diff options
author | Avi Kivity <avi@qumranet.com> | 2007-01-05 19:36:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-06 02:55:26 -0500 |
commit | 260746c03dcb2e5089f95b60cb786aaf405ced63 (patch) | |
tree | 069394e7a950db9b69b1f59d91bc856a08a47240 /drivers/kvm/mmu.c | |
parent | 0e7bc4b9610ed9fde0fa14f0b7a7f939805e5ae9 (diff) |
[PATCH] KVM: MMU: <ove is_empty_shadow_page() above kvm_mmu_free_page()
Signed-off-by: Avi Kivity <avi@qumranet.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/kvm/mmu.c')
-rw-r--r-- | drivers/kvm/mmu.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index 50b1432dceee..c55ce7d1509e 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c | |||
@@ -303,16 +303,6 @@ static void rmap_write_protect(struct kvm *kvm, u64 gfn) | |||
303 | } | 303 | } |
304 | } | 304 | } |
305 | 305 | ||
306 | static void kvm_mmu_free_page(struct kvm_vcpu *vcpu, hpa_t page_hpa) | ||
307 | { | ||
308 | struct kvm_mmu_page *page_head = page_header(page_hpa); | ||
309 | |||
310 | list_del(&page_head->link); | ||
311 | page_head->page_hpa = page_hpa; | ||
312 | list_add(&page_head->link, &vcpu->free_pages); | ||
313 | ++vcpu->kvm->n_free_mmu_pages; | ||
314 | } | ||
315 | |||
316 | static int is_empty_shadow_page(hpa_t page_hpa) | 306 | static int is_empty_shadow_page(hpa_t page_hpa) |
317 | { | 307 | { |
318 | u32 *pos; | 308 | u32 *pos; |
@@ -324,6 +314,16 @@ static int is_empty_shadow_page(hpa_t page_hpa) | |||
324 | return 1; | 314 | return 1; |
325 | } | 315 | } |
326 | 316 | ||
317 | static void kvm_mmu_free_page(struct kvm_vcpu *vcpu, hpa_t page_hpa) | ||
318 | { | ||
319 | struct kvm_mmu_page *page_head = page_header(page_hpa); | ||
320 | |||
321 | list_del(&page_head->link); | ||
322 | page_head->page_hpa = page_hpa; | ||
323 | list_add(&page_head->link, &vcpu->free_pages); | ||
324 | ++vcpu->kvm->n_free_mmu_pages; | ||
325 | } | ||
326 | |||
327 | static unsigned kvm_page_table_hashfn(gfn_t gfn) | 327 | static unsigned kvm_page_table_hashfn(gfn_t gfn) |
328 | { | 328 | { |
329 | return gfn; | 329 | return gfn; |