Skip to content

Commit

Permalink
MIPS: KVM: Skip memory cleaning in kvm_mips_commpage_init()
Browse files Browse the repository at this point in the history
The commpage is allocated using kzalloc(), so there's no need of cleaning
the memory of the kvm_mips_commpage struct and its internal mips_coproc.

Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Deng-Cheng Zhu authored and Paolo Bonzini committed Jun 30, 2014
1 parent d7d5b05 commit db2fb7f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/mips/kvm/commpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ void kvm_mips_commpage_init(struct kvm_vcpu *vcpu)
{
struct kvm_mips_commpage *page = vcpu->arch.kseg0_commpage;

memset(page, 0, sizeof(struct kvm_mips_commpage));

/* Specific init values for fields */
vcpu->arch.cop0 = &page->cop0;
memset(vcpu->arch.cop0, 0, sizeof(struct mips_coproc));
}

0 comments on commit db2fb7f

Please sign in to comment.