]> git.proxmox.com Git - mirror_qemu.git/commit - util/bufferiszero.c
util: add util function buffer_zero_avx512()
authorRobert Hoo <robert.hu@linux.intel.com>
Sat, 29 Feb 2020 12:34:35 +0000 (20:34 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Mar 2020 22:02:21 +0000 (23:02 +0100)
commit27f08ea1c7abf04125f6f9f23b8ba2f8c20e95b6
treed662b5e1b0feb05cedcdab370651c895abc41c97
parent6b8cd447efdad1d8bb637904e5077900d063e05d
util: add util function buffer_zero_avx512()

And intialize buffer_is_zero() with it, when Intel AVX512F is
available on host.

This function utilizes Intel AVX512 fundamental instructions which
is faster than its implementation with AVX2 (in my unit test, with
4K buffer, on CascadeLake SP, ~36% faster, buffer_zero_avx512() V.S.
buffer_zero_avx2()).

Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/cpuid.h
util/bufferiszero.c