public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH v5 2/5] vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices
       [not found] <20241108121742.18889-3-yi.l.liu@intel.com>
@ 2024-11-08 22:01 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-08 22:01 UTC (permalink / raw)
  To: Yi Liu; +Cc: llvm, oe-kbuild-all

Hi Yi,

kernel test robot noticed the following build errors:

[auto build test ERROR on awilliam-vfio/next]
[also build test ERROR on akpm-mm/mm-nonmm-unstable pci/next pci/for-linus linus/master awilliam-vfio/for-linus v6.12-rc6 next-20241108]
[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/Yi-Liu/ida-Add-ida_find_first_range/20241108-202010
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20241108121742.18889-3-yi.l.liu%40intel.com
patch subject: [PATCH v5 2/5] vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices
config: arm64-randconfig-001-20241109 (https://download.01.org/0day-ci/archive/20241109/202411090535.ma094bix-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241109/202411090535.ma094bix-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411090535.ma094bix-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/vfio/iommufd.c:134:3: error: implicit declaration of function 'iommufd_device_pasid_detach' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   iommufd_device_pasid_detach(vdev->iommufd_device, pasid);
                   ^
   drivers/vfio/iommufd.c:134:3: note: did you mean 'iommufd_device_detach'?
   include/linux/iommufd.h:27:6: note: 'iommufd_device_detach' declared here
   void iommufd_device_detach(struct iommufd_device *idev);
        ^
>> drivers/vfio/iommufd.c:190:10: error: implicit declaration of function 'iommufd_device_pasid_replace' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   return iommufd_device_pasid_replace(vdev->iommufd_device,
                          ^
   drivers/vfio/iommufd.c:190:10: note: did you mean 'iommufd_device_replace'?
   include/linux/iommufd.h:26:5: note: 'iommufd_device_replace' declared here
   int iommufd_device_replace(struct iommufd_device *idev, u32 *pt_id);
       ^
>> drivers/vfio/iommufd.c:197:7: error: implicit declaration of function 'iommufd_device_pasid_attach' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           rc = iommufd_device_pasid_attach(vdev->iommufd_device, pasid, pt_id);
                ^
   drivers/vfio/iommufd.c:197:7: note: did you mean 'iommufd_device_pasid_replace'?
   drivers/vfio/iommufd.c:190:10: note: 'iommufd_device_pasid_replace' declared here
                   return iommufd_device_pasid_replace(vdev->iommufd_device,
                          ^
   drivers/vfio/iommufd.c:216:2: error: implicit declaration of function 'iommufd_device_pasid_detach' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           iommufd_device_pasid_detach(vdev->iommufd_device, pasid);
           ^
   4 errors generated.


vim +/iommufd_device_pasid_detach +134 drivers/vfio/iommufd.c

   126	
   127	void vfio_iommufd_physical_unbind(struct vfio_device *vdev)
   128	{
   129		int pasid;
   130	
   131		lockdep_assert_held(&vdev->dev_set->lock);
   132	
   133		while ((pasid = ida_find_first(&vdev->pasids)) >= 0) {
 > 134			iommufd_device_pasid_detach(vdev->iommufd_device, pasid);
   135			ida_free(&vdev->pasids, pasid);
   136		}
   137	
   138		if (vdev->iommufd_attached) {
   139			iommufd_device_detach(vdev->iommufd_device);
   140			vdev->iommufd_attached = false;
   141		}
   142		iommufd_device_unbind(vdev->iommufd_device);
   143		vdev->iommufd_device = NULL;
   144	}
   145	EXPORT_SYMBOL_GPL(vfio_iommufd_physical_unbind);
   146	
   147	int vfio_iommufd_physical_attach_ioas(struct vfio_device *vdev, u32 *pt_id)
   148	{
   149		int rc;
   150	
   151		lockdep_assert_held(&vdev->dev_set->lock);
   152	
   153		if (WARN_ON(!vdev->iommufd_device))
   154			return -EINVAL;
   155	
   156		if (vdev->iommufd_attached)
   157			rc = iommufd_device_replace(vdev->iommufd_device, pt_id);
   158		else
   159			rc = iommufd_device_attach(vdev->iommufd_device, pt_id);
   160		if (rc)
   161			return rc;
   162		vdev->iommufd_attached = true;
   163		return 0;
   164	}
   165	EXPORT_SYMBOL_GPL(vfio_iommufd_physical_attach_ioas);
   166	
   167	void vfio_iommufd_physical_detach_ioas(struct vfio_device *vdev)
   168	{
   169		lockdep_assert_held(&vdev->dev_set->lock);
   170	
   171		if (WARN_ON(!vdev->iommufd_device) || !vdev->iommufd_attached)
   172			return;
   173	
   174		iommufd_device_detach(vdev->iommufd_device);
   175		vdev->iommufd_attached = false;
   176	}
   177	EXPORT_SYMBOL_GPL(vfio_iommufd_physical_detach_ioas);
   178	
   179	int vfio_iommufd_physical_pasid_attach_ioas(struct vfio_device *vdev,
   180						    u32 pasid, u32 *pt_id)
   181	{
   182		int rc;
   183	
   184		lockdep_assert_held(&vdev->dev_set->lock);
   185	
   186		if (WARN_ON(!vdev->iommufd_device))
   187			return -EINVAL;
   188	
   189		if (ida_exists(&vdev->pasids, pasid))
 > 190			return iommufd_device_pasid_replace(vdev->iommufd_device,
   191							    pasid, pt_id);
   192	
   193		rc = ida_alloc_range(&vdev->pasids, pasid, pasid, GFP_KERNEL);
   194		if (rc < 0)
   195			return rc;
   196	
 > 197		rc = iommufd_device_pasid_attach(vdev->iommufd_device, pasid, pt_id);
   198		if (rc)
   199			ida_free(&vdev->pasids, pasid);
   200	
   201		return rc;
   202	}
   203	EXPORT_SYMBOL_GPL(vfio_iommufd_physical_pasid_attach_ioas);
   204	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-08 22:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20241108121742.18889-3-yi.l.liu@intel.com>
2024-11-08 22:01 ` [PATCH v5 2/5] vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox