qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]