From: Jing Liu <jing2.liu@linux.intel.com>
To: Wanpeng Li <kernellwp@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm <kvm@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] KVM: x86: expose AVX512_BF16 feature to guest
Date: Mon, 15 Jul 2019 19:05:17 +0800 [thread overview]
Message-ID: <332e8951-e6bb-8394-490d-26c8154712b9@linux.intel.com> (raw)
In-Reply-To: <CANRm+CzOp6orH+7sqCQjLuxsYRccfq7H-o4QBcgxGfT-=RaJ-w@mail.gmail.com>
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
next prev parent reply other threads:[~2019-07-15 11:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 5:49 [PATCH v1] KVM: x86: expose AVX512_BF16 feature to guest Jing Liu
2019-07-13 10:37 ` Paolo Bonzini
2019-07-15 2:46 ` Jing Liu
2019-07-15 6:06 ` Wanpeng Li
2019-07-15 11:05 ` Jing Liu [this message]
2019-07-15 11:56 ` Paolo Bonzini
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=332e8951-e6bb-8394-490d-26c8154712b9@linux.intel.com \
--to=jing2.liu@linux.intel.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).