summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s.c
diff options
context:
space:
mode:
authorAlexander Graf <alex@csgraf.de>2010-02-22 16:52:08 +0100
committerAvi Kivity <avi@redhat.com>2010-04-25 12:39:21 +0300
commit7e821d3920c130d413c4c7454b0ece59445490db (patch)
tree8c2d6bb66928fca7c19ecd7cedd1cb99cc67efd5 /arch/powerpc/kvm/book3s.c
parenta1efbe77c1fd7c34a97a76a61520bf23fb3663f6 (diff)
downloadlinux-7e821d3920c130d413c4c7454b0ece59445490db.tar.bz2
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)
err = -ENOMEM;
goto out;
}
+ memset(vcpu_book3s, 0, sizeof(struct kvmppc_vcpu_book3s));
vcpu = &vcpu_book3s->vcpu;
err = kvm_vcpu_init(vcpu, kvm, id);