]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] KVM: MMU: <ove is_empty_shadow_page() above kvm_mmu_free_page()
authorAvi Kivity <avi@qumranet.com>
Sat, 6 Jan 2007 00:36:49 +0000 (16:36 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 6 Jan 2007 07:55:26 +0000 (23:55 -0800)
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>
drivers/kvm/mmu.c

index 50b1432dceee448a475a20c886983e025980ac8b..c55ce7d1509e48f10ac6a5785e2bbb23019b0b05 100644 (file)
@@ -303,16 +303,6 @@ static void rmap_write_protect(struct kvm *kvm, u64 gfn)
        }
 }
 
-static void kvm_mmu_free_page(struct kvm_vcpu *vcpu, hpa_t page_hpa)
-{
-       struct kvm_mmu_page *page_head = page_header(page_hpa);
-
-       list_del(&page_head->link);
-       page_head->page_hpa = page_hpa;
-       list_add(&page_head->link, &vcpu->free_pages);
-       ++vcpu->kvm->n_free_mmu_pages;
-}
-
 static int is_empty_shadow_page(hpa_t page_hpa)
 {
        u32 *pos;
@@ -324,6 +314,16 @@ static int is_empty_shadow_page(hpa_t page_hpa)
        return 1;
 }
 
+static void kvm_mmu_free_page(struct kvm_vcpu *vcpu, hpa_t page_hpa)
+{
+       struct kvm_mmu_page *page_head = page_header(page_hpa);
+
+       list_del(&page_head->link);
+       page_head->page_hpa = page_hpa;
+       list_add(&page_head->link, &vcpu->free_pages);
+       ++vcpu->kvm->n_free_mmu_pages;
+}
+
 static unsigned kvm_page_table_hashfn(gfn_t gfn)
 {
        return gfn;