From: nadav.amit@gmail.com
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, Andrew Jones <drjones@redhat.com>,
Nadav Amit <nadav.amit@gmail.com>
Subject: [kvm-unit-tests PATCH v2 4/4] arm: Remove redeundant page zeroing
Date: Fri, 3 May 2019 03:32:07 -0700 [thread overview]
Message-ID: <20190503103207.9021-5-nadav.amit@gmail.com> (raw)
In-Reply-To: <20190503103207.9021-1-nadav.amit@gmail.com>
From: Nadav Amit <nadav.amit@gmail.com>
Now that alloc_page() zeros the page, remove the redundant page zeroing.
Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
lib/arm/asm/pgtable.h | 2 --
lib/arm/mmu.c | 1 -
lib/arm64/asm/pgtable.h | 1 -
3 files changed, 4 deletions(-)
diff --git a/lib/arm/asm/pgtable.h b/lib/arm/asm/pgtable.h
index b614bce..241dff6 100644
--- a/lib/arm/asm/pgtable.h
+++ b/lib/arm/asm/pgtable.h
@@ -53,7 +53,6 @@ static inline pmd_t *pmd_alloc_one(void)
{
assert(PTRS_PER_PMD * sizeof(pmd_t) == PAGE_SIZE);
pmd_t *pmd = alloc_page();
- memset(pmd, 0, PTRS_PER_PMD * sizeof(pmd_t));
return pmd;
}
static inline pmd_t *pmd_alloc(pgd_t *pgd, unsigned long addr)
@@ -80,7 +79,6 @@ static inline pte_t *pte_alloc_one(void)
{
assert(PTRS_PER_PTE * sizeof(pte_t) == PAGE_SIZE);
pte_t *pte = alloc_page();
- memset(pte, 0, PTRS_PER_PTE * sizeof(pte_t));
return pte;
}
static inline pte_t *pte_alloc(pmd_t *pmd, unsigned long addr)
diff --git a/lib/arm/mmu.c b/lib/arm/mmu.c
index 03f6622..3d38c83 100644
--- a/lib/arm/mmu.c
+++ b/lib/arm/mmu.c
@@ -166,7 +166,6 @@ void *setup_mmu(phys_addr_t phys_end)
#endif
mmu_idmap = alloc_page();
- memset(mmu_idmap, 0, PAGE_SIZE);
/*
* mach-virt I/O regions:
diff --git a/lib/arm64/asm/pgtable.h b/lib/arm64/asm/pgtable.h
index 5860abe..ee0a2c8 100644
--- a/lib/arm64/asm/pgtable.h
+++ b/lib/arm64/asm/pgtable.h
@@ -61,7 +61,6 @@ static inline pte_t *pte_alloc_one(void)
{
assert(PTRS_PER_PTE * sizeof(pte_t) == PAGE_SIZE);
pte_t *pte = alloc_page();
- memset(pte, 0, PTRS_PER_PTE * sizeof(pte_t));
return pte;
}
static inline pte_t *pte_alloc(pmd_t *pmd, unsigned long addr)
--
2.17.1
next prev parent reply other threads:[~2019-05-03 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 10:32 [kvm-unit-tests PATCH v2 0/4] Zero allocated pages nadav.amit
2019-05-03 10:32 ` [kvm-unit-tests PATCH v2 1/4] lib/alloc_page: " nadav.amit
2019-05-03 19:10 ` Krish Sadhukhan
2019-05-03 10:32 ` [kvm-unit-tests PATCH v2 2/4] x86: Remove redeundant page zeroing nadav.amit
2019-05-03 19:11 ` Krish Sadhukhan
2019-05-03 10:32 ` [kvm-unit-tests PATCH v2 3/4] lib: " nadav.amit
2019-05-03 19:57 ` Krish Sadhukhan
2019-05-03 10:32 ` nadav.amit [this message]
2019-05-09 8:59 ` [kvm-unit-tests PATCH v2 4/4] arm: " Alexandru Elisei
2019-05-20 14:19 ` [kvm-unit-tests PATCH v2 0/4] Zero allocated pages Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190503103207.9021-5-nadav.amit@gmail.com \
--to=nadav.amit@gmail.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox