Re: [PATCH] vringh: use bvec_kmap_local

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christoph,

kernel test robot noticed the following build errors:

[auto build test ERROR on mst-vhost/linux-next]
[also build test ERROR on linus/master v6.15-rc4 next-20250430]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Christoph-Hellwig/vringh-use-bvec_kmap_local/20250430-220531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
patch link:    https://lore.kernel.org/r/20250430140004.2724391-1-hch%40lst.de
patch subject: [PATCH] vringh: use bvec_kmap_local
config: arm64-randconfig-003-20250501 (https://download.01.org/0day-ci/archive/20250501/202505011754.RqgPPZa9-lkp@xxxxxxxxx/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250501/202505011754.RqgPPZa9-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505011754.RqgPPZa9-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/vhost/vringh.c:1332:36: error: incompatible pointer types passing 'struct bio_vec *' to parameter of type 'struct page *' [-Werror,-Wincompatible-pointer-types]
    1332 |                 __virtio16 *to = kmap_local_page(&ivec.iov.bvec[0]);
         |                                                  ^~~~~~~~~~~~~~~~~
   include/linux/highmem.h:96:50: note: passing argument to parameter 'page' here
      96 | static inline void *kmap_local_page(struct page *page);
         |                                                  ^
   1 error generated.


vim +1332 drivers/vhost/vringh.c

  1304	
  1305	static inline int putu16_iotlb(const struct vringh *vrh,
  1306				       __virtio16 *p, u16 val)
  1307	{
  1308		struct iotlb_vec ivec;
  1309		union {
  1310			struct iovec iovec;
  1311			struct bio_vec bvec;
  1312		} iov;
  1313		__virtio16 tmp;
  1314		int ret;
  1315	
  1316		ivec.iov.iovec = &iov.iovec;
  1317		ivec.count = 1;
  1318	
  1319		/* Atomic write is needed for putu16 */
  1320		ret = iotlb_translate(vrh, (u64)(uintptr_t)p, sizeof(*p),
  1321				      NULL, &ivec, VHOST_MAP_RO);
  1322		if (ret < 0)
  1323			return ret;
  1324	
  1325		tmp = cpu_to_vringh16(vrh, val);
  1326	
  1327		if (vrh->use_va) {
  1328			ret = __put_user(tmp, (__virtio16 __user *)ivec.iov.iovec[0].iov_base);
  1329			if (ret)
  1330				return ret;
  1331		} else {
> 1332			__virtio16 *to = kmap_local_page(&ivec.iov.bvec[0]);
  1333	
  1334			WRITE_ONCE(*to, tmp);
  1335			kunmap_local(to);
  1336		}
  1337	
  1338		return 0;
  1339	}
  1340	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux