[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/15] util/bufferiszero: assign length_to_accel value for each ac
From: |
Paolo Bonzini |
Subject: |
[PULL 06/15] util/bufferiszero: assign length_to_accel value for each accelerator case |
Date: |
Thu, 2 Apr 2020 15:06:31 -0400 |
From: Robert Hoo <address@hidden>
Because in unit test, init_accel() will be called several times, each with
different accelerator type.
Signed-off-by: Robert Hoo <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
util/bufferiszero.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/util/bufferiszero.c b/util/bufferiszero.c
index 663903553a..b8012532e4 100644
--- a/util/bufferiszero.c
+++ b/util/bufferiszero.c
@@ -254,13 +254,16 @@ static void init_accel(unsigned cache)
bool (*fn)(const void *, size_t) = buffer_zero_int;
if (cache & CACHE_SSE2) {
fn = buffer_zero_sse2;
+ length_to_accel = 64;
}
#ifdef CONFIG_AVX2_OPT
if (cache & CACHE_SSE4) {
fn = buffer_zero_sse4;
+ length_to_accel = 64;
}
if (cache & CACHE_AVX2) {
fn = buffer_zero_avx2;
+ length_to_accel = 64;
}
#endif
#ifdef CONFIG_AVX512F_OPT
--
2.18.2
- [PULL 00/15] Misc patches for 5.0-rc2, Paolo Bonzini, 2020/04/02
- [PULL 02/15] hw/isa/superio: Correct the license text, Paolo Bonzini, 2020/04/02
- [PULL 01/15] hw/scsi/vmw_pvscsi: Remove assertion for kick after reset, Paolo Bonzini, 2020/04/02
- [PULL 03/15] virtio-iommu: depend on PCI, Paolo Bonzini, 2020/04/02
- [PULL 04/15] softmmu: fix crash with invalid -M memory-backend=, Paolo Bonzini, 2020/04/02
- [PULL 06/15] util/bufferiszero: assign length_to_accel value for each accelerator case,
Paolo Bonzini <=
- [PULL 07/15] util/bufferiszero: improve avx2 accelerator, Paolo Bonzini, 2020/04/02
- [PULL 08/15] vl: fix broken IPA range for ARM -M virt with KVM enabled, Paolo Bonzini, 2020/04/02
- [PULL 11/15] target/i386: do not set unsupported VMX secondary execution controls, Paolo Bonzini, 2020/04/02
- [PULL 12/15] migration: fix cleanup_bh leak on resume, Paolo Bonzini, 2020/04/02
- [PULL 09/15] i386: hvf: Reset IRQ inhibition after moving RIP, Paolo Bonzini, 2020/04/02
- [PULL 14/15] object-add: don't create return value if failed, Paolo Bonzini, 2020/04/02
- [PULL 05/15] MAINTAINERS: Add an entry for the HVF accelerator, Paolo Bonzini, 2020/04/02
- [PULL 13/15] qmp: fix leak on callbacks that return both value and error, Paolo Bonzini, 2020/04/02
- [PULL 10/15] serial: Fix double migration data, Paolo Bonzini, 2020/04/02
- [PULL 15/15] xen: fixup RAM memory region initialization, Paolo Bonzini, 2020/04/02