All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Cc: vijay.kilari@gmail.com
Subject: Re: [Qemu-devel] [PATCH v3 7/9] cutils: Rewrite x86 buffer zero checking
Date: Tue, 13 Sep 2016 17:47:59 +0200	[thread overview]
Message-ID: <a7d4e9a2-416b-d73e-e2b9-0a2a7ead2856@redhat.com> (raw)
In-Reply-To: <bbd2e6f9-9f3c-43ef-ea01-09e9656c4c5f@redhat.com>



On 13/09/2016 16:49, Paolo Bonzini wrote:
> 
> 
> On 13/09/2016 16:17, Paolo Bonzini wrote:
>>
>>
>> On 13/09/2016 15:26, Paolo Bonzini wrote:
>>> I need this on top to fix compilation with older compilers:
>>>
>>> diff --git a/util/bufferiszero.c b/util/bufferiszero.c
>>> index 3b39f82..1ce6b7a 100644
>>> --- a/util/bufferiszero.c
>>> +++ b/util/bufferiszero.c
>>> @@ -71,13 +71,13 @@ buffer_zero_int(const void *buf, size_t len)
>>>
>>>  #if defined(CONFIG_AVX2_OPT) || defined(__SSE2__)
>>>  #include <cpuid.h>
>>> -#include <x86intrin.h>
>>>
>>>  /* Note that we're going to check for LEN >= 64 for all of these.  */
>>>
>>>  #ifdef CONFIG_AVX2_OPT
>>>  #pragma GCC push_options
>>>  #pragma GCC target("avx2")
>>> +#include <immintrin.h>
>>>
>>>  static bool
>>>  buffer_zero_avx2(const void *buf, size_t len)
>>> @@ -181,6 +181,8 @@ buffer_zero_sse4(const void *buf, size_t len)
>>>  #pragma GCC target("sse2")
>>>  #endif /* CONFIG_AVX2_OPT */
>>>
>>> +#include <emmintrin.h>
>>> +
>>>  static bool
>>>  buffer_zero_sse2(const void *buf, size_t len)
>>>  {
>>>
>>
>> Nope, not enough on GCC 4.8:
>>
>> $ nm util/bufferiszero.o
>> 0000000000000000 b buffer_accel
>> 0000000000000430 T buffer_is_zero
>> 0000000000000240 t buffer_zero_avx
>> 0000000000000330 t buffer_zero_avx2
>> 0000000000000000 t buffer_zero_int
>> 00000000000000b0 t buffer_zero_sse2
>> 0000000000000190 t buffer_zero_sse4
>> 0000000000000008 b cpuid_cache
>>                  U _GLOBAL_OFFSET_TABLE_
>> 0000000000000000 t init_cpuid_cache
>>                  U _mm_cmpeq_epi8
>>                  U _mm_loadu_si128
>>                  U _mm_movemask_epi8
>>                  U _mm_setzero_si128
>>                  U _mm_testz_si128
>> 00000000000003d0 T test_buffer_is_zero_next_accel
>>
>> Since I have no idea what's going on, I'm dropping these the last three
>> patches.
> 
> I still have no idea what's going on, but dropping this patch is enough.

Ok, it's the AVX version, the failure somehow is related to vptest not
being in AVX1.

Paolo

  reply	other threads:[~2016-09-13 15:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29 18:46 [Qemu-devel] [PATCH v3 0/9] Improve buffer_is_zero Richard Henderson
2016-08-29 18:46 ` [Qemu-devel] [PATCH v3 1/9] cutils: Move buffer_is_zero and subroutines to a new file Richard Henderson
2016-08-29 18:46 ` [Qemu-devel] [PATCH v3 3/9] cutils: Export only buffer_is_zero Richard Henderson
2016-08-29 18:46 ` [Qemu-devel] [PATCH v3 4/9] cutils: Rearrange buffer_is_zero acceleration Richard Henderson
2016-08-29 18:46 ` [Qemu-devel] [PATCH v3 5/9] cutils: Add test for buffer_is_zero Richard Henderson
2016-08-29 18:46 ` [Qemu-devel] [PATCH v3 6/9] cutils: Add generic prefetch Richard Henderson
2016-08-29 18:46 ` [Qemu-devel] [PATCH v3 7/9] cutils: Rewrite x86 buffer zero checking Richard Henderson
2016-09-13 13:26   ` Paolo Bonzini
2016-09-13 14:17     ` Paolo Bonzini
2016-09-13 14:49       ` Paolo Bonzini
2016-09-13 15:47         ` Paolo Bonzini [this message]
2016-08-29 18:46 ` [Qemu-devel] [PATCH v3 8/9] cutils: Remove aarch64 " Richard Henderson
2016-08-29 18:46 ` [Qemu-devel] [PATCH v3 9/9] cutils: Remove ppc " Richard Henderson
2016-08-30 11:48 ` [Qemu-devel] [PATCH v3 0/9] Improve buffer_is_zero Paolo Bonzini
2016-09-05 15:08 ` Dr. David Alan Gilbert

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=a7d4e9a2-416b-d73e-e2b9-0a2a7ead2856@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=vijay.kilari@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.