[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/6] meson: require compiler support for chosen x86-64 instru
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 6/6] meson: require compiler support for chosen x86-64 instructions |
Date: |
Thu, 20 Jun 2024 16:01:33 +0100 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
On Thu, Jun 20, 2024 at 03:02:54PM +0200, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> meson.build | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meson.build b/meson.build
> index 54e6b09f4fb..c5360fbd299 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2863,6 +2863,7 @@ have_cpuid_h = cc.links('''
> config_host_data.set('CONFIG_CPUID_H', have_cpuid_h)
>
> config_host_data.set('CONFIG_AVX2_OPT', get_option('avx2') \
> + .enable_auto_if(get_option('x86_version') >= '3') \
> .require(have_cpuid_h, error_message: 'cpuid.h not available, cannot
> enable AVX2') \
> .require(cc.links('''
> #include <cpuid.h>
> @@ -2875,6 +2876,7 @@ config_host_data.set('CONFIG_AVX2_OPT',
> get_option('avx2') \
> '''), error_message: 'AVX2 not available').allowed())
>
> config_host_data.set('CONFIG_AVX512BW_OPT', get_option('avx512bw') \
> + .enable_auto_if(get_option('x86_version') >= '4') \
> .require(have_cpuid_h, error_message: 'cpuid.h not available, cannot
> enable AVX512BW') \
> .require(cc.links('''
> #include <cpuid.h>
I'm not sure this makes sense. The CONFIG_AVX* options are used only
to validate whether the toolchain has support for this. The QEMU
code then has a runtime, so it automagically uses AVX2/AVX512
if-and-only-if running on a suitably new CPU. IOW, we want this
enabled always when the toolchain supports it, regardless of what
x86_version is set.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [PATCH 0/6] host/i386: allow configuring the x86-64 baseline, Paolo Bonzini, 2024/06/20
- [PATCH 2/6] Revert "host/i386: assume presence of SSSE3", Paolo Bonzini, 2024/06/20
- [PATCH 1/6] Revert "host/i386: assume presence of POPCNT", Paolo Bonzini, 2024/06/20
- [PATCH 3/6] Revert "host/i386: assume presence of SSE2", Paolo Bonzini, 2024/06/20
- [PATCH 4/6] meson: allow configuring the x86-64 baseline, Paolo Bonzini, 2024/06/20
- [PATCH 6/6] meson: require compiler support for chosen x86-64 instructions, Paolo Bonzini, 2024/06/20
- Re: [PATCH 6/6] meson: require compiler support for chosen x86-64 instructions,
Daniel P . Berrangé <=
- [PATCH 5/6] meson: remove dead optimization option, Paolo Bonzini, 2024/06/20