]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
KVM: PPC: Initialize linears with zeros
authorAlexander Graf <agraf@suse.de>
Tue, 17 Jan 2012 14:11:28 +0000 (15:11 +0100)
committerAvi Kivity <avi@redhat.com>
Mon, 5 Mar 2012 12:57:27 +0000 (14:57 +0200)
RMAs and HPT preallocated spaces should be zeroed, so we don't accidently
leak information from previous VM executions.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/kvm/book3s_hv_builtin.c

index 1c7e6ab5f9de1075693b7fead4a01c6a0bc75123..7caed1dfd7a415ed5ea9fb36920bd413f9d3e82e 100644 (file)
@@ -152,6 +152,7 @@ static struct kvmppc_linear_info *kvm_alloc_linear(int type)
                break;
        }
        spin_unlock(&linear_lock);
+       memset(ri->base_virt, 0, ri->npages << PAGE_SHIFT);
        return ri;
 }