lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 3 Dec 2022 17:05:26 +0800
From:   kernel test robot <lkp@...el.com>
To:     Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, alex.williamson@...hat.com,
        jgg@...dia.com, yishaih@...dia.com, kevin.tian@...el.com,
        linuxarm@...wei.com, liulongfang@...wei.com,
        prime.zeng@...ilicon.com
Subject: Re: [PATCH 4/4] hisi_acc_vfio_pci: Enable PRE_COPY flag

Hi Shameer,

I love your patch! Yet something to improve:

[auto build test ERROR on awilliam-vfio/for-linus]
[also build test ERROR on linus/master v6.1-rc7 next-20221202]
[cannot apply to awilliam-vfio/next]
[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/Shameer-Kolothum/hisi_acc_vfio_pci-Add-PRE_COPY-migration-feature-support/20221123-193542
base:   https://github.com/awilliam/linux-vfio.git for-linus
patch link:    https://lore.kernel.org/r/20221123113236.896-5-shameerali.kolothum.thodi%40huawei.com
patch subject: [PATCH 4/4] hisi_acc_vfio_pci: Enable PRE_COPY flag
config: arm64-allyesconfig
compiler: aarch64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/0a0337a53f36cbe7185cefb1365816476e10bdf7
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Shameer-Kolothum/hisi_acc_vfio_pci-Add-PRE_COPY-migration-feature-support/20221123-193542
        git checkout 0a0337a53f36cbe7185cefb1365816476e10bdf7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c: In function 'hisi_acc_vf_precopy_ioctl':
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:772:34: error: storage size of 'info' isn't known
     772 |         struct vfio_precopy_info info;
         |                                  ^~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:776:20: error: 'VFIO_MIG_GET_PRECOPY_INFO' undeclared (first use in this function)
     776 |         if (cmd != VFIO_MIG_GET_PRECOPY_INFO)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:776:20: note: each undeclared identifier is reported only once for each function it appears in
   In file included from include/uapi/linux/posix_types.h:5,
                    from include/uapi/linux/types.h:14,
                    from include/linux/types.h:6,
                    from include/linux/kasan-checks.h:5,
                    from include/asm-generic/rwonce.h:26,
                    from arch/arm64/include/asm/rwonce.h:71,
                    from include/linux/compiler.h:246,
                    from include/linux/dev_printk.h:14,
                    from include/linux/device.h:15,
                    from drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:6:
   include/linux/stddef.h:16:33: error: invalid use of undefined type 'struct vfio_precopy_info'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:33:10: note: in expansion of macro 'offsetof'
      33 |         (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
         |          ^~~~~~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:779:17: note: in expansion of macro 'offsetofend'
     779 |         minsz = offsetofend(struct vfio_precopy_info, dirty_bytes);
         |                 ^~~~~~~~~~~
   include/linux/stddef.h:24:55: error: invalid use of undefined type 'struct vfio_precopy_info'
      24 | #define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
         |                                                       ^~
   include/linux/stddef.h:33:35: note: in expansion of macro 'sizeof_field'
      33 |         (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
         |                                   ^~~~~~~~~~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:779:17: note: in expansion of macro 'offsetofend'
     779 |         minsz = offsetofend(struct vfio_precopy_info, dirty_bytes);
         |                 ^~~~~~~~~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:787:41: error: 'VFIO_DEVICE_STATE_PRE_COPY' undeclared (first use in this function); did you mean 'VFIO_DEVICE_STATE_STOP_COPY'?
     787 |         if (hisi_acc_vdev->mig_state != VFIO_DEVICE_STATE_PRE_COPY) {
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                         VFIO_DEVICE_STATE_STOP_COPY
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:772:34: warning: unused variable 'info' [-Wunused-variable]
     772 |         struct vfio_precopy_info info;
         |                                  ^~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c: In function 'hisi_acc_vf_set_device_state':
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:957:56: error: 'VFIO_DEVICE_STATE_PRE_COPY' undeclared (first use in this function); did you mean 'VFIO_DEVICE_STATE_STOP_COPY'?
     957 |         if (cur == VFIO_DEVICE_STATE_RUNNING && new == VFIO_DEVICE_STATE_PRE_COPY) {
         |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                        VFIO_DEVICE_STATE_STOP_COPY
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c: In function 'hisi_acc_vfio_pci_migrn_init_dev':
>> drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:1345:65: error: 'VFIO_MIGRATION_PRE_COPY' undeclared (first use in this function); did you mean 'VFIO_MIGRATION_STOP_COPY'?
    1345 |         core_vdev->migration_flags = VFIO_MIGRATION_STOP_COPY | VFIO_MIGRATION_PRE_COPY;
         |                                                                 ^~~~~~~~~~~~~~~~~~~~~~~
         |                                                                 VFIO_MIGRATION_STOP_COPY


vim +1345 drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c

  1332	
  1333	static int hisi_acc_vfio_pci_migrn_init_dev(struct vfio_device *core_vdev)
  1334	{
  1335		struct hisi_acc_vf_core_device *hisi_acc_vdev = container_of(core_vdev,
  1336				struct hisi_acc_vf_core_device, core_device.vdev);
  1337		struct pci_dev *pdev = to_pci_dev(core_vdev->dev);
  1338		struct hisi_qm *pf_qm = hisi_acc_get_pf_qm(pdev);
  1339	
  1340		hisi_acc_vdev->vf_id = pci_iov_vf_id(pdev) + 1;
  1341		hisi_acc_vdev->pf_qm = pf_qm;
  1342		hisi_acc_vdev->vf_dev = pdev;
  1343		mutex_init(&hisi_acc_vdev->state_mutex);
  1344	
> 1345		core_vdev->migration_flags = VFIO_MIGRATION_STOP_COPY | VFIO_MIGRATION_PRE_COPY;
  1346		core_vdev->mig_ops = &hisi_acc_vfio_pci_migrn_state_ops;
  1347	
  1348		return vfio_pci_core_init_dev(core_vdev);
  1349	}
  1350	

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

View attachment "config" of type "text/plain" (362634 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ