All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yi Liu <yi.l.liu@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v5 2/5] vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices
Date: Fri, 8 Nov 2024 23:52:52 +0800	[thread overview]
Message-ID: <202411082315.10rfpMKh-lkp@intel.com> (raw)
In-Reply-To: <20241108121742.18889-3-yi.l.liu@intel.com>

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: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20241108/202411082315.10rfpMKh-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241108/202411082315.10rfpMKh-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/202411082315.10rfpMKh-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/vfio/iommufd.c: In function 'vfio_iommufd_physical_unbind':
>> drivers/vfio/iommufd.c:134:17: error: implicit declaration of function 'iommufd_device_pasid_detach'; did you mean 'iommufd_device_detach'? [-Werror=implicit-function-declaration]
     134 |                 iommufd_device_pasid_detach(vdev->iommufd_device, pasid);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 iommufd_device_detach
   drivers/vfio/iommufd.c: In function 'vfio_iommufd_physical_pasid_attach_ioas':
>> drivers/vfio/iommufd.c:190:24: error: implicit declaration of function 'iommufd_device_pasid_replace'; did you mean 'iommufd_device_replace'? [-Werror=implicit-function-declaration]
     190 |                 return iommufd_device_pasid_replace(vdev->iommufd_device,
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                        iommufd_device_replace
>> drivers/vfio/iommufd.c:197:14: error: implicit declaration of function 'iommufd_device_pasid_attach'; did you mean 'iommufd_device_attach'? [-Werror=implicit-function-declaration]
     197 |         rc = iommufd_device_pasid_attach(vdev->iommufd_device, pasid, pt_id);
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         |              iommufd_device_attach
   cc1: some warnings being treated as errors


vim +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

  reply	other threads:[~2024-11-08 15:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 12:17 [PATCH v5 0/5] vfio-pci support pasid attach/detach Yi Liu
2024-11-08 12:17 ` [PATCH v5 1/5] ida: Add ida_find_first_range() Yi Liu
2024-11-08 12:17 ` [PATCH v5 2/5] vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices Yi Liu
2024-11-08 15:52   ` kernel test robot [this message]
2024-11-08 22:01   ` kernel test robot
2024-11-08 12:17 ` [PATCH v5 3/5] vfio: VFIO_DEVICE_[AT|DE]TACH_IOMMUFD_PT support pasid Yi Liu
2024-11-12  0:02   ` Alex Williamson
2024-11-12  1:53     ` Yi Liu
2024-11-08 12:17 ` [PATCH v5 4/5] vfio: Add vfio_copy_user_data() Yi Liu
2024-11-12  0:03   ` Alex Williamson
2024-11-12  9:18     ` Yi Liu
2024-11-12 13:52       ` Alex Williamson
2024-11-13  7:22         ` Yi Liu
2024-11-14 18:19           ` Alex Williamson
2024-11-15 12:10             ` Yi Liu
2024-11-08 12:17 ` [PATCH v5 5/5] iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability Yi Liu
2024-12-11  2:43   ` Zhangfei Gao
2024-12-11  3:12     ` Yi Liu

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=202411082315.10rfpMKh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yi.l.liu@intel.com \
    /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.