diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2009-01-08 14:44:19 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-03-24 05:03:04 -0400 |
commit | 9903a927a4aea4b1ea42356a8453fca664df0b18 (patch) | |
tree | ef37f4db8da36c2dccda4b75568a80a9c582250c /arch | |
parent | ff81ff10b4417952919dcc0bd67effa9ceb411c0 (diff) |
KVM: MMU: drop zeroing on mmu_memory_cache_alloc
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/mmu.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index aac0499947d8..de9a9fbc16ed 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -352,7 +352,6 @@ static void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc, | |||
352 | 352 | ||
353 | BUG_ON(!mc->nobjs); | 353 | BUG_ON(!mc->nobjs); |
354 | p = mc->objects[--mc->nobjs]; | 354 | p = mc->objects[--mc->nobjs]; |
355 | memset(p, 0, size); | ||
356 | return p; | 355 | return p; |
357 | } | 356 | } |
358 | 357 | ||