lkml.org 
[lkml]   [2022]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[jgunthorpe:vfio_kvm_no_group 2/11] arch/powerpc/kvm/../../../virt/kvm/vfio.c:356:58: error: cast to pointer from integer of different size
tree:   https://github.com/jgunthorpe/linux vfio_kvm_no_group
head: 0a779a04652d97c98d71a1538a37f89145dba9ed
commit: c068aae365aaf0ecde7abf0842298c59d7ed0d9c [2/11] kvm/vfio: Reduce the scope of PPC #ifdefs
config: powerpc-randconfig-c003-20220414 (https://download.01.org/0day-ci/archive/20220416/202204160410.A4xlb0e3-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/jgunthorpe/linux/commit/c068aae365aaf0ecde7abf0842298c59d7ed0d9c
git remote add jgunthorpe https://github.com/jgunthorpe/linux
git fetch --no-tags jgunthorpe vfio_kvm_no_group
git checkout c068aae365aaf0ecde7abf0842298c59d7ed0d9c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

arch/powerpc/kvm/../../../virt/kvm/vfio.c: In function 'kvm_vfio_set_group':
>> arch/powerpc/kvm/../../../virt/kvm/vfio.c:356:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
356 | return kvm_vfio_group_set_spapr_tce(dev, (void __user *)arg);
| ^
cc1: all warnings being treated as errors


vim +356 arch/powerpc/kvm/../../../virt/kvm/vfio.c

26d16e3ba7292b Jason Gunthorpe 2022-03-30 338
26d16e3ba7292b Jason Gunthorpe 2022-03-30 339 static int kvm_vfio_set_group(struct kvm_device *dev, long attr, u64 arg)
26d16e3ba7292b Jason Gunthorpe 2022-03-30 340 {
26d16e3ba7292b Jason Gunthorpe 2022-03-30 341 int32_t __user *argp = (int32_t __user *)(unsigned long)arg;
26d16e3ba7292b Jason Gunthorpe 2022-03-30 342 int32_t fd;
26d16e3ba7292b Jason Gunthorpe 2022-03-30 343
26d16e3ba7292b Jason Gunthorpe 2022-03-30 344 switch (attr) {
26d16e3ba7292b Jason Gunthorpe 2022-03-30 345 case KVM_DEV_VFIO_GROUP_ADD:
26d16e3ba7292b Jason Gunthorpe 2022-03-30 346 if (get_user(fd, argp))
26d16e3ba7292b Jason Gunthorpe 2022-03-30 347 return -EFAULT;
26d16e3ba7292b Jason Gunthorpe 2022-03-30 348 return kvm_vfio_group_add(dev, fd);
26d16e3ba7292b Jason Gunthorpe 2022-03-30 349
26d16e3ba7292b Jason Gunthorpe 2022-03-30 350 case KVM_DEV_VFIO_GROUP_DEL:
26d16e3ba7292b Jason Gunthorpe 2022-03-30 351 if (get_user(fd, argp))
26d16e3ba7292b Jason Gunthorpe 2022-03-30 352 return -EFAULT;
26d16e3ba7292b Jason Gunthorpe 2022-03-30 353 return kvm_vfio_group_del(dev, fd);
26d16e3ba7292b Jason Gunthorpe 2022-03-30 354
26d16e3ba7292b Jason Gunthorpe 2022-03-30 355 case KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE:
26d16e3ba7292b Jason Gunthorpe 2022-03-30 @356 return kvm_vfio_group_set_spapr_tce(dev, (void __user *)arg);
ec53500fae421e Alex Williamson 2013-10-30 357 }
ec53500fae421e Alex Williamson 2013-10-30 358
ec53500fae421e Alex Williamson 2013-10-30 359 return -ENXIO;
ec53500fae421e Alex Williamson 2013-10-30 360 }
ec53500fae421e Alex Williamson 2013-10-30 361

:::::: The code at line 356 was first introduced by commit
:::::: 26d16e3ba7292b7fce26d25a2ba8f44b8c28ffe3 kvm/vfio: Move KVM_DEV_VFIO_GROUP_* ioctls into functions

:::::: TO: Jason Gunthorpe <jgg@nvidia.com>
:::::: CC: Jason Gunthorpe <jgg@nvidia.com>

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-04-15 22:10    [W:0.061 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site