Skip to content

Commit db2fb7f

Browse files
dczhubonzini
authored andcommitted
MIPS: KVM: Skip memory cleaning in kvm_mips_commpage_init()
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>
1 parent d7d5b05 commit db2fb7f

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎arch/mips/kvm/commpage.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ void kvm_mips_commpage_init(struct kvm_vcpu *vcpu)
2828
{
2929
struct kvm_mips_commpage *page = vcpu->arch.kseg0_commpage;
3030

31-
memset(page, 0, sizeof(struct kvm_mips_commpage));
32-
3331
/* Specific init values for fields */
3432
vcpu->arch.cop0 = &page->cop0;
35-
memset(vcpu->arch.cop0, 0, sizeof(struct mips_coproc));
3633
}

0 commit comments

Comments
 (0)