All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH Kernel v23 5/8] vfio iommu: Implementation of ioctl for dirty pages tracking
Date: Wed, 27 May 2020 19:22:44 +0800	[thread overview]
Message-ID: <202005271936.SGM8eVEe%lkp@intel.com> (raw)
In-Reply-To: <1589998088-3250-6-git-send-email-kwankhede@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 3456 bytes --]

Hi Kirti,

I love your patch! Perhaps something to improve:

[auto build test WARNING on vfio/next]
[also build test WARNING on v5.7-rc7 next-20200526]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Kirti-Wankhede/Add-UAPIs-to-support-migration-for-VFIO-devices/20200521-060843
base:   https://github.com/awilliam/linux-vfio.git next
config: x86_64-randconfig-s021-20200527 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-240-gf0fe1cd9-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

   drivers/vfio/vfio_iommu_type1.c:981:48: sparse: sparse: cast removes address space '<asn:1>' of expression
>> drivers/vfio/vfio_iommu_type1.c:981:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] <asn:1> *from @@     got unsigned long long [usertype] * @@
   drivers/vfio/vfio_iommu_type1.c:981:61: sparse:     expected void const [noderef] <asn:1> *from
   drivers/vfio/vfio_iommu_type1.c:981:61: sparse:     got unsigned long long [usertype] *
   drivers/vfio/vfio_iommu_type1.c:988:27: sparse: sparse: cast removes address space '<asn:1>' of expression
>> drivers/vfio/vfio_iommu_type1.c:988:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] <asn:1> *to @@     got unsigned long long [usertype] * @@
   drivers/vfio/vfio_iommu_type1.c:988:40: sparse:     expected void [noderef] <asn:1> *to
   drivers/vfio/vfio_iommu_type1.c:988:40: sparse:     got unsigned long long [usertype] *

vim +981 drivers/vfio/vfio_iommu_type1.c

   962	
   963	static int update_user_bitmap(u64 __user *bitmap, struct vfio_dma *dma,
   964				      dma_addr_t base_iova, size_t pgsize)
   965	{
   966		unsigned long pgshift = __ffs(pgsize);
   967		unsigned long nbits = dma->size >> pgshift;
   968		unsigned long bit_offset = (dma->iova - base_iova) >> pgshift;
   969		unsigned long copy_offset = bit_offset / BITS_PER_LONG;
   970		unsigned long shift = bit_offset % BITS_PER_LONG;
   971		unsigned long leftover;
   972	
   973		/* mark all pages dirty if all pages are pinned and mapped. */
   974		if (dma->iommu_mapped)
   975			bitmap_set(dma->bitmap, 0, nbits);
   976	
   977		if (shift) {
   978			bitmap_shift_left(dma->bitmap, dma->bitmap, shift,
   979					  nbits + shift);
   980	
 > 981			if (copy_from_user(&leftover, (u64 *)bitmap + copy_offset,
   982					   sizeof(leftover)))
   983				return -EFAULT;
   984	
   985			bitmap_or(dma->bitmap, dma->bitmap, &leftover, shift);
   986		}
   987	
 > 988		if (copy_to_user((u64 *)bitmap + copy_offset, dma->bitmap,
   989				 DIRTY_BITMAP_BYTES(nbits + shift)))
   990			return -EFAULT;
   991	
   992		return 0;
   993	}
   994	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 41585 bytes --]

  reply	other threads:[~2020-05-27 11:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 18:08 [PATCH Kernel v23 0/8] Add UAPIs to support migration for VFIO devices Kirti Wankhede
2020-05-20 18:08 ` Kirti Wankhede
2020-05-20 18:08 ` [PATCH Kernel v23 1/8] vfio: UAPI for migration interface for device state Kirti Wankhede
2020-05-20 18:08   ` Kirti Wankhede
2020-05-25 14:30   ` Cornelia Huck
2020-05-25 14:30     ` Cornelia Huck
2020-05-20 18:08 ` [PATCH Kernel v23 2/8] vfio iommu: Remove atomicity of ref_count of pinned pages Kirti Wankhede
2020-05-20 18:08   ` Kirti Wankhede
2020-05-20 18:08 ` [PATCH Kernel v23 3/8] vfio iommu: Cache pgsize_bitmap in struct vfio_iommu Kirti Wankhede
2020-05-20 18:08   ` Kirti Wankhede
2020-05-20 18:08 ` [PATCH Kernel v23 4/8] vfio iommu: Add ioctl definition for dirty pages tracking Kirti Wankhede
2020-05-20 18:08   ` Kirti Wankhede
2020-05-25 14:41   ` Cornelia Huck
2020-05-25 14:41     ` Cornelia Huck
2020-05-20 18:08 ` [PATCH Kernel v23 5/8] vfio iommu: Implementation of ioctl " Kirti Wankhede
2020-05-20 18:08   ` Kirti Wankhede
2020-05-27 11:22   ` kbuild test robot [this message]
2020-05-20 18:08 ` [PATCH Kernel v23 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap Kirti Wankhede
2020-05-20 18:08   ` Kirti Wankhede
2020-05-20 18:08 ` [PATCH Kernel v23 7/8] vfio iommu: Add migration capability to report supported features Kirti Wankhede
2020-05-20 18:08   ` Kirti Wankhede
2020-05-20 18:08 ` [PATCH Kernel v23 8/8] vfio: Selective dirty page tracking if IOMMU backed device pins pages Kirti Wankhede
2020-05-20 18:08   ` Kirti Wankhede
2020-05-28  4:47 ` [PATCH Kernel v23 0/8] Add UAPIs to support migration for VFIO devices Yan Zhao
2020-05-28  4:47   ` Yan Zhao
2020-05-28 21:03   ` Kirti Wankhede
2020-05-28 21:03     ` Kirti Wankhede

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=202005271936.SGM8eVEe%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.