Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e821d39 authored by Alexander Graf's avatar Alexander Graf Committed by Avi Kivity
Browse files

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: default avatarAlexander Graf <alex@csgraf.de>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent a1efbe77
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);