Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Deng-Cheng Zhu and committed by
Paolo Bonzini
db2fb7f2 d7d5b05f

-3
-3
arch/mips/kvm/commpage.c
··· 28 28 { 29 29 struct kvm_mips_commpage *page = vcpu->arch.kseg0_commpage; 30 30 31 - memset(page, 0, sizeof(struct kvm_mips_commpage)); 32 - 33 31 /* Specific init values for fields */ 34 32 vcpu->arch.cop0 = &page->cop0; 35 - memset(vcpu->arch.cop0, 0, sizeof(struct mips_coproc)); 36 33 }