diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-09-25 15:23:52 -0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-09-27 13:35:34 +0300 |
commit | a509fff8ed134115f2fd413e92a92cddc1709a5f (patch) | |
tree | 7ca21bcb6e27f5964609e1203ef647e0343a3748 | |
parent | 9b8f754c6c84210617baed4d99b36c2e413f68ad (diff) |
There's no need to increase the largepage shadow count when syncing
since there's no count decrement on unsync, only on destruction.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/x86/kvm/mmu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9ff8d90d5694..99c239c5c0ac 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -661,8 +661,6 @@ static void rmap_write_protect(struct kvm *kvm, u64 gfn) if (write_protected) kvm_flush_remote_tlbs(kvm); - - account_shadowed(kvm, gfn); } static int kvm_unmap_rmapp(struct kvm *kvm, unsigned long *rmapp) @@ -1130,8 +1128,10 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu, sp->gfn = gfn; sp->role = role; hlist_add_head(&sp->hash_link, bucket); - if (!metaphysical) + if (!metaphysical) { rmap_write_protect(vcpu->kvm, gfn); + account_shadowed(vcpu->kvm, gfn); + } if (shadow_trap_nonpresent_pte != shadow_notrap_nonpresent_pte) vcpu->arch.mmu.prefetch_page(vcpu, sp); else |