]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: MMU: drop zeroing on mmu_memory_cache_alloc
authorMarcelo Tosatti <mtosatti@redhat.com>
Thu, 8 Jan 2009 19:44:19 +0000 (17:44 -0200)
committerAvi Kivity <avi@redhat.com>
Tue, 24 Mar 2009 09:03:04 +0000 (11:03 +0200)
Zeroing on mmu_memory_cache_alloc is unnecessary since:

- Smaller areas are pre-allocated with kmem_cache_zalloc.
- Page pointed by ->spt is overwritten with prefetch_page
  and entries in page pointed by ->gfns are initialized
  before reading.

[avi: zeroing pages is unnecessary]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu.c

index aac0499947d864786003b8b993f738b797a2877b..de9a9fbc16ed6bb1526032a06bb2f4c226da4a5f 100644 (file)
@@ -352,7 +352,6 @@ static void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc,
 
        BUG_ON(!mc->nobjs);
        p = mc->objects[--mc->nobjs];
-       memset(p, 0, size);
        return p;
 }