[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling |
Date: |
Thu, 18 Jul 2019 10:15:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 |
On 18/07/19 06:55, Jing Liu wrote:
>>
>> + *eax = kvm_arch_get_supported_cpuid(cs->kvm_state, 0x7,
>> + count, R_EAX);
> This needs to be firstly checked as follows, otherwise some
> architectures would fail to compile.
>
> What about hvf and tcg CPUID 07 EAX value?
>
> + /* Maximum ECX value for sub-leaves */
> + if (kvm_enabled()) {
> + *eax = kvm_arch_get_supported_cpuid(cs->kvm_state, 0x7,
> + count, R_EAX);
> + } else if (hvf_enabled()) {
> + *eax = hvf_get_supported_cpuid(0x7, count, R_EAX);
> + } else {
> + *eax = 0;
> + }
>
Good question. You need to add a new property, for example
cpuid_level_func7, whose code would be modeled around cpuid_level (and a
field cpuid_min_level_func7 whose code would be modeled around
cpuid_min_level).
Then CPUID[7,0].EAX is set automatically to 0 or 1 depending on whether
BF16 is enabled or not.
Paolo
- [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling, Jing Liu, 2019/07/11
- Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling, no-reply, 2019/07/11
- Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling, Jing Liu, 2019/07/18
- Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling, Jing Liu, 2019/07/19
- Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling, Paolo Bonzini, 2019/07/19
- Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling, Jing Liu, 2019/07/21
- Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling, Paolo Bonzini, 2019/07/22
- Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling, Jing Liu, 2019/07/24
- Re: [Qemu-devel] [PATCH v1] x86: Intel AVX512_BF16 feature enabling, Paolo Bonzini, 2019/07/24