aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s.c
diff options
context:
space:
mode:
authorAlexander Graf <alex@csgraf.de>2010-02-22 10:52:08 -0500
committerAvi Kivity <avi@redhat.com>2010-04-25 05:39:21 -0400
commit7e821d3920c130d413c4c7454b0ece59445490db (patch)
tree8c2d6bb66928fca7c19ecd7cedd1cb99cc67efd5 /arch/powerpc/kvm/book3s.c
parenta1efbe77c1fd7c34a97a76a61520bf23fb3663f6 (diff)
KVM: PPC: Memset vcpu to zeros
While converting the kzalloc we used to allocate our vcpu struct to vmalloc, I forgot to memset the contents to zeros. That broke quite a lot. This patch memsets it to zero again. Signed-off-by: Alexander Graf <alex@csgraf.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r--arch/powerpc/kvm/book3s.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 6758ec80f902..8cab902771a2 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -1117,6 +1117,7 @@ struct kvm_vcpu *kvmppc_core_vcpu_create(struct kvm *kvm, unsigned int id)
1117 err = -ENOMEM; 1117 err = -ENOMEM;
1118 goto out; 1118 goto out;
1119 } 1119 }
1120 memset(vcpu_book3s, 0, sizeof(struct kvmppc_vcpu_book3s));
1120 1121
1121 vcpu = &vcpu_book3s->vcpu; 1122 vcpu = &vcpu_book3s->vcpu;
1122 err = kvm_vcpu_init(vcpu, kvm, id); 1123 err = kvm_vcpu_init(vcpu, kvm, id);