From: kernel test robot <lkp@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: arch/x86/kvm/mmu/mmu.c:686:18: sparse: sparse: cast to non-scalar
Date: Fri, 24 Jul 2020 10:04:14 +0800 [thread overview]
Message-ID: <202007241007.bIfiYFX8%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3568 bytes --]
Hi Paolo,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d15be546031cf65a0fc34879beca02fd90fe7ac7
commit: c50d8ae3a1274f32c9033bbb0e1c5b3115da2112 KVM: x86: create mmu/ subdirectory
date: 8 months ago
config: i386-randconfig-s002-20200724 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-93-g4c6cbe55-dirty
git checkout c50d8ae3a1274f32c9033bbb0e1c5b3115da2112
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/x86/kvm/mmu/mmu.c:686:18: sparse: sparse: cast to non-scalar
arch/x86/kvm/mmu/mmu.c:705:18: sparse: sparse: cast to non-scalar
arch/x86/kvm/mmu/mmu.c:724:18: sparse: sparse: cast to non-scalar
arch/x86/kvm/mmu/mmu.c:4759:57: sparse: sparse: cast truncates bits from constant value (ffffff33 becomes 33)
arch/x86/kvm/mmu/mmu.c:4761:56: sparse: sparse: cast truncates bits from constant value (ffffff0f becomes f)
arch/x86/kvm/mmu/mmu.c:4763:57: sparse: sparse: cast truncates bits from constant value (ffffff55 becomes 55)
vim +686 arch/x86/kvm/mmu/mmu.c
c2a2ac2b563ccc3 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 680
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 681 static void __set_spte(u64 *sptep, u64 spte)
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 682 {
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 683 union split_spte *ssptep, sspte;
a9221dd5ec125fb arch/x86/kvm/mmu.c Avi Kivity 2010-06-06 684
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 685 ssptep = (union split_spte *)sptep;
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 @686 sspte = (union split_spte)spte;
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 687
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 688 ssptep->spte_high = sspte.spte_high;
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 689
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 690 /*
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 691 * If we map the spte from nonpresent to present, We should store
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 692 * the high bits firstly, then set present bit, so cpu can not
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 693 * fetch this spte while we are setting the spte.
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 694 */
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 695 smp_wmb();
603e0651cfc8562 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 696
b19ee2ff3b287fe arch/x86/kvm/mmu.c Nadav Amit 2016-05-11 697 WRITE_ONCE(ssptep->spte_low, sspte.spte_low);
a9221dd5ec125fb arch/x86/kvm/mmu.c Avi Kivity 2010-06-06 698 }
a9221dd5ec125fb arch/x86/kvm/mmu.c Avi Kivity 2010-06-06 699
:::::: The code at line 686 was first introduced by commit
:::::: 603e0651cfc8562b103454d7ded71f3ad1eb3a37 KVM: MMU: do not need atomicly to set/clear spte
:::::: TO: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
:::::: CC: Avi Kivity <avi@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27779 bytes --]
reply other threads:[~2020-07-24 2:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202007241007.bIfiYFX8%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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
Powered by JetHome