aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-01-17 09:11:28 -0500
committerAvi Kivity <avi@redhat.com>2012-03-05 07:57:27 -0500
commitb7f5d0114c708d6efd264a2c5e5a31cf292a9cec (patch)
tree898cd5e55e9caf728b742ec1c4355882d659efd7
parentb4e706111d501991c59d2af23a299ab52a06b03d (diff)
KVM: PPC: Initialize linears with zeros
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>
-rw-r--r--arch/powerpc/kvm/book3s_hv_builtin.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c
index 1c7e6ab5f9de..7caed1dfd7a4 100644
--- a/arch/powerpc/kvm/book3s_hv_builtin.c
+++ b/arch/powerpc/kvm/book3s_hv_builtin.c
@@ -152,6 +152,7 @@ static struct kvmppc_linear_info *kvm_alloc_linear(int type)
152 break; 152 break;
153 } 153 }
154 spin_unlock(&linear_lock); 154 spin_unlock(&linear_lock);
155 memset(ri->base_virt, 0, ri->npages << PAGE_SHIFT);
155 return ri; 156 return ri;
156} 157}
157 158