summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAlexander Graf <alex@csgraf.de>2010-02-22 15:52:08 (GMT)
committerAvi Kivity <avi@redhat.com>2010-04-25 09:39:21 (GMT)
commit7e821d3920c130d413c4c7454b0ece59445490db (patch)
tree8c2d6bb66928fca7c19ecd7cedd1cb99cc67efd5 /arch
parenta1efbe77c1fd7c34a97a76a61520bf23fb3663f6 (diff)
downloadlinux-fsl-qoriq-7e821d3920c130d413c4c7454b0ece59445490db.tar.xz
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')
-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 6758ec8..8cab902 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);