mbox series

[kvm-unit-tests,v3,0/4] Zero allocated pages

Message ID 20190509200558.12347-1-nadav.amit@gmail.com (mailing list archive)
Headers show
Series Zero allocated pages | expand

Message

Nadav Amit May 9, 2019, 8:05 p.m. UTC
For reproducibility, it is best to zero pages before they are used.
There are hidden assumptions on memory being zeroed (by BIOS/KVM), which
might be broken at any given moment. The full argument appears in the
first patch commit log.

Following the first patch that zeros the memory, the rest of the
patch-set removes redundant zeroing do to the additional zeroing.

This patch-set is only tested on x86.

v2->v3:
* Typos [Alexandru]

v1->v2:
* Change alloc_pages() as well
* Remove redundant page zeroing [Andrew]

Nadav Amit (4):
  lib/alloc_page: Zero allocated pages
  x86: Remove redundant page zeroing
  lib: Remove redundant page zeroing
  arm: Remove redundant page zeroing

 lib/alloc_page.c         |  4 ++++
 lib/arm/asm/pgtable.h    |  2 --
 lib/arm/mmu.c            |  1 -
 lib/arm64/asm/pgtable.h  |  1 -
 lib/virtio-mmio.c        |  1 -
 lib/x86/intel-iommu.c    |  5 -----
 x86/eventinj.c           |  1 -
 x86/hyperv_connections.c |  4 ----
 x86/vmx.c                | 10 ----------
 x86/vmx_tests.c          | 11 -----------
 10 files changed, 4 insertions(+), 36 deletions(-)

Comments

Konrad Rzeszutek Wilk May 10, 2019, 12:55 p.m. UTC | #1
On Thu, May 09, 2019 at 01:05:54PM -0700, Nadav Amit wrote:
> For reproducibility, it is best to zero pages before they are used.
> There are hidden assumptions on memory being zeroed (by BIOS/KVM), which
> might be broken at any given moment. The full argument appears in the
> first patch commit log.
> 
> Following the first patch that zeros the memory, the rest of the
> patch-set removes redundant zeroing do to the additional zeroing.
> 
> This patch-set is only tested on x86.

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

for all of them please.
> 
> v2->v3:
> * Typos [Alexandru]
> 
> v1->v2:
> * Change alloc_pages() as well
> * Remove redundant page zeroing [Andrew]
> 
> Nadav Amit (4):
>   lib/alloc_page: Zero allocated pages
>   x86: Remove redundant page zeroing
>   lib: Remove redundant page zeroing
>   arm: Remove redundant page zeroing
> 
>  lib/alloc_page.c         |  4 ++++
>  lib/arm/asm/pgtable.h    |  2 --
>  lib/arm/mmu.c            |  1 -
>  lib/arm64/asm/pgtable.h  |  1 -
>  lib/virtio-mmio.c        |  1 -
>  lib/x86/intel-iommu.c    |  5 -----
>  x86/eventinj.c           |  1 -
>  x86/hyperv_connections.c |  4 ----
>  x86/vmx.c                | 10 ----------
>  x86/vmx_tests.c          | 11 -----------
>  10 files changed, 4 insertions(+), 36 deletions(-)
> 
> -- 
> 2.17.1
>