From: kernel test robot <lkp@intel.com>
To: Abhishek Sahu <abhsahu@nvidia.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Alex Williamson <alex.williamson@redhat.com>
Subject: [linux-next:master 11904/14198] drivers/vfio/pci/vfio_pci_config.c:411:20: sparse: sparse: restricted pci_power_t degrades to integer
Date: Sat, 28 May 2022 13:10:08 +0800 [thread overview]
Message-ID: <202205281333.Mw1XyMXP-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d3fde8ff50ab265749704bd7fbcf70d35235421f
commit: 2b2c651baf1c24414be4f76b152de80fae7c7786 [11904/14198] vfio/pci: Invalidate mmaps and block the access in D3hot power state
config: csky-randconfig-s032-20220524 (https://download.01.org/0day-ci/archive/20220528/202205281333.Mw1XyMXP-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 11.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-14-g5a0004b5-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2b2c651baf1c24414be4f76b152de80fae7c7786
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 2b2c651baf1c24414be4f76b152de80fae7c7786
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash drivers/vfio/pci/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/vfio/pci/vfio_pci_config.c:411:20: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_config.c:411:38: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_config.c:705:13: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_config.c:705:22: sparse: sparse: restricted pci_power_t degrades to integer
vim +411 drivers/vfio/pci/vfio_pci_config.c
397
398 /* Caller should hold memory_lock semaphore */
399 bool __vfio_pci_memory_enabled(struct vfio_pci_core_device *vdev)
400 {
401 struct pci_dev *pdev = vdev->pdev;
402 u16 cmd = le16_to_cpu(*(__le16 *)&vdev->vconfig[PCI_COMMAND]);
403
404 /*
405 * Memory region cannot be accessed if device power state is D3.
406 *
407 * SR-IOV VF memory enable is handled by the MSE bit in the
408 * PF SR-IOV capability, there's therefore no need to trigger
409 * faults based on the virtual value.
410 */
> 411 return pdev->current_state < PCI_D3hot &&
412 (pdev->no_command_memory || (cmd & PCI_COMMAND_MEMORY));
413 }
414
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-05-28 5:10 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=202205281333.Mw1XyMXP-lkp@intel.com \
--to=lkp@intel.com \
--cc=abhsahu@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
/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).