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 v24 5/8] vfio iommu: Implementation of ioctl for dirty pages tracking
Date: Sun, 31 May 2020 13:51:12 +0800	[thread overview]
Message-ID: <202005311304.JA524nm6%lkp@intel.com> (raw)
In-Reply-To: <1590697854-21364-6-git-send-email-kwankhede@nvidia.com>

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

Hi Kirti,

I love your patch! Perhaps something to improve:

[auto build test WARNING on v5.7-rc7]
[also build test WARNING on next-20200529]
[cannot apply to vfio/next]
[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/20200531-020103
base:    9cb1fd0efd195590b828b9b865421ad345a4a145
config: i386-randconfig-s031-20200531 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-243-gc100a7ab-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=i386 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:952:37: sparse: sparse: cast removes address space '<asn:1>' of expression
>> drivers/vfio/vfio_iommu_type1.c:952:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] <asn:1> *from @@     got void const * @@
   drivers/vfio/vfio_iommu_type1.c:952:37: sparse:     expected void const [noderef] <asn:1> *from
>> drivers/vfio/vfio_iommu_type1.c:952:37: sparse:     got void const *
   drivers/vfio/vfio_iommu_type1.c:959:27: sparse: sparse: cast removes address space '<asn:1>' of expression
>> drivers/vfio/vfio_iommu_type1.c:959:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] <asn:1> *to @@     got void * @@
   drivers/vfio/vfio_iommu_type1.c:959:27: sparse:     expected void [noderef] <asn:1> *to
>> drivers/vfio/vfio_iommu_type1.c:959:27: sparse:     got void *

vim +952 drivers/vfio/vfio_iommu_type1.c

   932	
   933	static int update_user_bitmap(u64 __user *bitmap, struct vfio_dma *dma,
   934				      dma_addr_t base_iova, size_t pgsize)
   935	{
   936		unsigned long pgshift = __ffs(pgsize);
   937		unsigned long nbits = dma->size >> pgshift;
   938		unsigned long bit_offset = (dma->iova - base_iova) >> pgshift;
   939		unsigned long copy_offset = bit_offset / BITS_PER_LONG;
   940		unsigned long shift = bit_offset % BITS_PER_LONG;
   941		unsigned long leftover;
   942	
   943		/* mark all pages dirty if all pages are pinned and mapped. */
   944		if (dma->iommu_mapped)
   945			bitmap_set(dma->bitmap, 0, nbits);
   946	
   947		if (shift) {
   948			bitmap_shift_left(dma->bitmap, dma->bitmap, shift,
   949					  nbits + shift);
   950	
   951			if (copy_from_user(&leftover,
 > 952					   (const void *)(bitmap + copy_offset),
   953					   sizeof(leftover)))
   954				return -EFAULT;
   955	
   956			bitmap_or(dma->bitmap, dma->bitmap, &leftover, shift);
   957		}
   958	
 > 959		if (copy_to_user((void *)(bitmap + copy_offset), dma->bitmap,
   960				 DIRTY_BITMAP_BYTES(nbits + shift)))
   961			return -EFAULT;
   962	
   963		return 0;
   964	}
   965	

---
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: 42831 bytes --]

  reply	other threads:[~2020-05-31  5:51 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 20:30 [PATCH Kernel v24 0/8] Add UAPIs to support migration for VFIO devices Kirti Wankhede
2020-05-28 20:30 ` Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 1/8] vfio: UAPI for migration interface for device state Kirti Wankhede
2020-05-28 20:30   ` Kirti Wankhede
2020-09-28 16:51   ` Stefan Hajnoczi
2020-09-28 16:51     ` Stefan Hajnoczi
2020-05-28 20:30 ` [PATCH Kernel v24 2/8] vfio iommu: Remove atomicity of ref_count of pinned pages Kirti Wankhede
2020-05-28 20:30   ` Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 3/8] vfio iommu: Cache pgsize_bitmap in struct vfio_iommu Kirti Wankhede
2020-05-28 20:30   ` Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 4/8] vfio iommu: Add ioctl definition for dirty pages tracking Kirti Wankhede
2020-05-28 20:30   ` Kirti Wankhede
2020-09-28 17:06   ` Stefan Hajnoczi
2020-09-28 17:06     ` Stefan Hajnoczi
2020-05-28 20:30 ` [PATCH Kernel v24 5/8] vfio iommu: Implementation of ioctl " Kirti Wankhede
2020-05-28 20:30   ` Kirti Wankhede
2020-05-31  5:51   ` kbuild test robot [this message]
2020-05-31  9:53   ` kbuild test robot
2020-06-02 15:51   ` Kirti Wankhede
2020-06-02 15:51     ` Kirti Wankhede
2020-06-02 16:44     ` Alex Williamson
2020-06-02 16:44       ` Alex Williamson
2020-05-28 20:30 ` [PATCH Kernel v24 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap Kirti Wankhede
2020-05-28 20:30   ` Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 7/8] vfio iommu: Add migration capability to report supported features Kirti Wankhede
2020-05-28 20:30   ` Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 8/8] vfio: Selective dirty page tracking if IOMMU backed device pins pages Kirti Wankhede
2020-05-28 20:30   ` Kirti Wankhede
2020-05-29 21:09 ` [PATCH Kernel v24 0/8] Add UAPIs to support migration for VFIO devices Alex Williamson
2020-05-29 21:09   ` Alex Williamson
2020-07-21  2:43 ` Xiang Zheng
2020-07-21  2:43   ` Xiang Zheng
2020-07-21 22:43   ` Alex Williamson
2020-07-21 22:43     ` Alex Williamson
2020-07-22  2:55     ` Xiang Zheng
2020-07-22  2:55       ` Xiang Zheng
2020-07-22  3:24       ` Tian, Kevin
2020-07-22  3:24         ` Tian, Kevin
2020-09-29  8:27 ` Stefan Hajnoczi
2020-09-29  8:27   ` Stefan Hajnoczi
2020-09-29 19:52   ` Alex Williamson
2020-09-29 19:52     ` Alex Williamson

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=202005311304.JA524nm6%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.