aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2010-11-01 21:49:34 -0400
committerAvi Kivity <avi@redhat.com>2011-01-12 04:28:55 -0500
commit2653503769ef9ae771509e1358a3da8de8d21709 (patch)
tree5f568816fdb59fa592b1af47a952984977043151 /arch/powerpc/kvm
parentec25d5e66ee152e371fd7046f3f8441859579aea (diff)
KVM: replace vmalloc and memset with vzalloc
Let's use newly introduced vzalloc(). Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/book3s.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index e316847c08c..badc983031b 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -1307,12 +1307,10 @@ struct kvm_vcpu *kvmppc_core_vcpu_create(struct kvm *kvm, unsigned int id)
1307 int err = -ENOMEM; 1307 int err = -ENOMEM;
1308 unsigned long p; 1308 unsigned long p;
1309 1309
1310 vcpu_book3s = vmalloc(sizeof(struct kvmppc_vcpu_book3s)); 1310 vcpu_book3s = vzalloc(sizeof(struct kvmppc_vcpu_book3s));
1311 if (!vcpu_book3s) 1311 if (!vcpu_book3s)
1312 goto out; 1312 goto out;
1313 1313
1314 memset(vcpu_book3s, 0, sizeof(struct kvmppc_vcpu_book3s));
1315
1316 vcpu_book3s->shadow_vcpu = (struct kvmppc_book3s_shadow_vcpu *) 1314 vcpu_book3s->shadow_vcpu = (struct kvmppc_book3s_shadow_vcpu *)
1317 kzalloc(sizeof(*vcpu_book3s->shadow_vcpu), GFP_KERNEL); 1315 kzalloc(sizeof(*vcpu_book3s->shadow_vcpu), GFP_KERNEL);
1318 if (!vcpu_book3s->shadow_vcpu) 1316 if (!vcpu_book3s->shadow_vcpu)