* [PATCH] KVM: PPC: Memset vcpu to zeros
@ 2010-02-22 15:52 ` Alexander Graf
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2010-02-22 15:52 UTC (permalink / raw)
To: kvm-ppc; +Cc: kvm list
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 <agraf@suse.de>
---
arch/powerpc/kvm/book3s.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 794c94b..94c229d 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -1115,6 +1115,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);
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] KVM: PPC: Memset vcpu to zeros
@ 2010-02-22 15:52 ` Alexander Graf
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2010-02-22 15:52 UTC (permalink / raw)
To: kvm-ppc; +Cc: kvm list
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 <agraf@suse.de>
---
arch/powerpc/kvm/book3s.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 794c94b..94c229d 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -1115,6 +1115,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);
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: PPC: Memset vcpu to zeros
[not found] ` <1266853928-31825-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
@ 2010-02-24 10:20 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2010-02-24 10:20 UTC (permalink / raw)
To: Alexander Graf; +Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm list
On 02/22/2010 05:52 PM, Alexander Graf wrote:
> 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.
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: PPC: Memset vcpu to zeros
@ 2010-02-24 10:20 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2010-02-24 10:20 UTC (permalink / raw)
To: Alexander Graf; +Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm list
On 02/22/2010 05:52 PM, Alexander Graf wrote:
> 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.
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-24 10:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-22 15:52 [PATCH] KVM: PPC: Memset vcpu to zeros Alexander Graf
2010-02-22 15:52 ` Alexander Graf
[not found] ` <1266853928-31825-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-02-24 10:20 ` Avi Kivity
2010-02-24 10:20 ` Avi Kivity
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.