diff options
author | Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> | 2013-01-08 05:45:28 -0500 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-01-14 04:13:58 -0500 |
commit | e12091ce7bdd3c82fa392a868d1bdccecee655d5 (patch) | |
tree | 9c53da262ec3521a1938d2282cbf0c03517d6aa6 /arch | |
parent | b99db1d35295cb26b61a1c665f542504110b0ac3 (diff) |
KVM: Remove unused slot_bitmap from kvm_mmu_page
Not needed any more.
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 5 | ||||
-rw-r--r-- | arch/x86/kvm/mmu.c | 10 |
2 files changed, 0 insertions, 15 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index c431b33271f3..f75e1feb6ec5 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -219,11 +219,6 @@ struct kvm_mmu_page { | |||
219 | u64 *spt; | 219 | u64 *spt; |
220 | /* hold the gfn of each spte inside spt */ | 220 | /* hold the gfn of each spte inside spt */ |
221 | gfn_t *gfns; | 221 | gfn_t *gfns; |
222 | /* | ||
223 | * One bit set per slot which has memory | ||
224 | * in this shadow page. | ||
225 | */ | ||
226 | DECLARE_BITMAP(slot_bitmap, KVM_MEM_SLOTS_NUM); | ||
227 | bool unsync; | 222 | bool unsync; |
228 | int root_count; /* Currently serving as active root */ | 223 | int root_count; /* Currently serving as active root */ |
229 | unsigned int unsync_children; | 224 | unsigned int unsync_children; |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index aeb7666eb81e..9c1b2d6158bf 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1522,7 +1522,6 @@ static struct kvm_mmu_page *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu, | |||
1522 | sp->gfns = mmu_memory_cache_alloc(&vcpu->arch.mmu_page_cache); | 1522 | sp->gfns = mmu_memory_cache_alloc(&vcpu->arch.mmu_page_cache); |
1523 | set_page_private(virt_to_page(sp->spt), (unsigned long)sp); | 1523 | set_page_private(virt_to_page(sp->spt), (unsigned long)sp); |
1524 | list_add(&sp->link, &vcpu->kvm->arch.active_mmu_pages); | 1524 | list_add(&sp->link, &vcpu->kvm->arch.active_mmu_pages); |
1525 | bitmap_zero(sp->slot_bitmap, KVM_MEM_SLOTS_NUM); | ||
1526 | sp->parent_ptes = 0; | 1525 | sp->parent_ptes = 0; |
1527 | mmu_page_add_parent_pte(vcpu, sp, parent_pte); | 1526 | mmu_page_add_parent_pte(vcpu, sp, parent_pte); |
1528 | kvm_mod_used_mmu_pages(vcpu->kvm, +1); | 1527 | kvm_mod_used_mmu_pages(vcpu->kvm, +1); |
@@ -2183,14 +2182,6 @@ int kvm_mmu_unprotect_page(struct kvm *kvm, gfn_t gfn) | |||
2183 | } | 2182 | } |
2184 | EXPORT_SYMBOL_GPL(kvm_mmu_unprotect_page); | 2183 | EXPORT_SYMBOL_GPL(kvm_mmu_unprotect_page); |
2185 | 2184 | ||
2186 | static void page_header_update_slot(struct kvm *kvm, void *pte, gfn_t gfn) | ||
2187 | { | ||
2188 | int slot = memslot_id(kvm, gfn); | ||
2189 | struct kvm_mmu_page *sp = page_header(__pa(pte)); | ||
2190 | |||
2191 | __set_bit(slot, sp->slot_bitmap); | ||
2192 | } | ||
2193 | |||
2194 | /* | 2185 | /* |
2195 | * The function is based on mtrr_type_lookup() in | 2186 | * The function is based on mtrr_type_lookup() in |
2196 | * arch/x86/kernel/cpu/mtrr/generic.c | 2187 | * arch/x86/kernel/cpu/mtrr/generic.c |
@@ -2472,7 +2463,6 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep, | |||
2472 | ++vcpu->kvm->stat.lpages; | 2463 | ++vcpu->kvm->stat.lpages; |
2473 | 2464 | ||
2474 | if (is_shadow_present_pte(*sptep)) { | 2465 | if (is_shadow_present_pte(*sptep)) { |
2475 | page_header_update_slot(vcpu->kvm, sptep, gfn); | ||
2476 | if (!was_rmapped) { | 2466 | if (!was_rmapped) { |
2477 | rmap_count = rmap_add(vcpu, sptep, gfn); | 2467 | rmap_count = rmap_add(vcpu, sptep, gfn); |
2478 | if (rmap_count > RMAP_RECYCLE_THRESHOLD) | 2468 | if (rmap_count > RMAP_RECYCLE_THRESHOLD) |