linux-mips
[Top] [All Lists]

[PATCH v3 8/9] MIPS: KVM: Skip memory cleaning in kvm_mips_commpage_init

To: <pbonzini@redhat.com>
Subject: [PATCH v3 8/9] MIPS: KVM: Skip memory cleaning in kvm_mips_commpage_init()
From: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Date: Tue, 24 Jun 2014 10:31:09 -0700
Cc: <gleb@kernel.org>, <kvm@vger.kernel.org>, <sanjayl@kymasys.com>, <james.hogan@imgtec.com>, <ralf@linux-mips.org>, <linux-mips@linux-mips.org>, <dengcheng.zhu@imgtec.com>
In-reply-to: <1403631071-6012-1-git-send-email-dengcheng.zhu@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1403631071-6012-1-git-send-email-dengcheng.zhu@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
From: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>

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.

Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
---
 arch/mips/kvm/commpage.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/mips/kvm/commpage.c b/arch/mips/kvm/commpage.c
index 61b9c04..2d6e976 100644
--- a/arch/mips/kvm/commpage.c
+++ b/arch/mips/kvm/commpage.c
@@ -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));
 }
-- 
1.8.5.3


<Prev in Thread] Current Thread [Next in Thread>