lkml.org 
[lkml]   [2019]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1] KVM: x86: expose AVX512_BF16 feature to guest
From
Date


On 7/15/2019 2:06 PM, Wanpeng Li wrote:
> On Sat, 13 Jul 2019 at 18:40, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> On 11/07/19 07:49, Jing Liu wrote:
>>> AVX512 BFLOAT16 instructions support 16-bit BFLOAT16 floating-point
>>> format (BF16) for deep learning optimization.
>>>
>>> Intel adds AVX512 BFLOAT16 feature in CooperLake, which is CPUID.7.1.EAX[5].
>>>
>>> Detailed information of the CPUID bit can be found here,
>>> https://software.intel.com/sites/default/files/managed/c5/15/\
>>> architecture-instruction-set-extensions-programming-reference.pdf.
>>>
>>> Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
>>> ---
>>>
[...]
> /home/kernel/data/kvm/arch/x86/kvm//cpuid.c: In function ‘do_cpuid_7_mask’:
> ./include/linux/kernel.h:819:29: warning: comparison of distinct
> pointer types lacks a cast
> (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
> ^
> ./include/linux/kernel.h:833:4: note: in expansion of macro ‘__typecheck’
> (__typecheck(x, y) && __no_side_effects(x, y))
> ^
> ./include/linux/kernel.h:843:24: note: in expansion of macro ‘__safe_cmp’
> __builtin_choose_expr(__safe_cmp(x, y), \
> ^
> ./include/linux/kernel.h:852:19: note: in expansion of macro ‘__careful_cmp’
> #define min(x, y) __careful_cmp(x, y, <)
> ^
> /home/kernel/data/kvm/arch/x86/kvm//cpuid.c:377:16: note: in expansion
> of macro ‘min’
> entry->eax = min(entry->eax, 1);
> ^
>
Thanks for the information.

This warning would be fixed by changing to
entry->eax = min(entry->eax, (u32)1);

@Paolo, sorry for trouble. Would you mind if I re-send?

Jing

\
 
 \ /
  Last update: 2019-07-15 13:05    [W:0.072 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site