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>, Kevin Tian <kevin.tian@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [yiliu1765-iommufd:wip/iommufd_pasid-0823 89/95] drivers/iommu/iommufd/device.c:303:14: error: implicit declaration of function 'msi_device_has_isolated_msi'
Date: Thu, 24 Aug 2023 21:59:32 +0800	[thread overview]
Message-ID: <202308242104.f534pPlY-lkp@intel.com> (raw)

tree:   https://github.com/yiliu1765/iommufd.git wip/iommufd_pasid-0823
head:   67dfdbe108fe147464b91e9e510e8ceedd87deda
commit: 294d410b98d4dd1f218297860f0507b271384939 [89/95] iommufd: Add iommufd_device_bind_pasid()
config: arc-randconfig-r004-20230824 (https://download.01.org/0day-ci/archive/20230824/202308242104.f534pPlY-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230824/202308242104.f534pPlY-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/202308242104.f534pPlY-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/iommu/iommufd/device.c: In function 'iommufd_device_bind_pasid':
>> drivers/iommu/iommufd/device.c:303:14: error: implicit declaration of function 'msi_device_has_isolated_msi' [-Werror=implicit-function-declaration]
     303 |             !msi_device_has_isolated_msi(dev)) {
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/msi_device_has_isolated_msi +303 drivers/iommu/iommufd/device.c

   260	
   261	/**
   262	 * iommufd_device_bind_pasid - Bind a virtual device to an iommu fd
   263	 * @ictx: iommufd file descriptor
   264	 * @dev: Pointer to the parent physical device struct
   265	 * @pasid: the pasid value representing vRID of this virtual device
   266	 * @id: Output ID number to return to userspace for this device
   267	 *
   268	 * The virtual device always tags its DMA with the provided pasid.
   269	 * A successful bind allows the pasid to be used in other iommufd
   270	 * operations e.g. attach/detach and returns struct iommufd_device
   271	 * pointer, otherwise returns error pointer.
   272	 *
   273	 * There is no ownership check per pasid. A driver using this API
   274	 * must already claim the DMA ownership over the parent device and
   275	 * the pasid is allocated by the driver itself.
   276	 *
   277	 * PASID is a device capability so unlike iommufd_device_bind() it
   278	 * has no iommu group associated.
   279	 *
   280	 * The caller must undo this with iommufd_device_unbind()
   281	 */
   282	struct iommufd_device *iommufd_device_bind_pasid(struct iommufd_ctx *ictx,
   283							 struct device *dev,
   284							 u32 pasid, u32 *id)
   285	{
   286		struct iommufd_device *idev;
   287		int rc;
   288	
   289		/*
   290		 * iommufd always sets IOMMU_CACHE because we offer no way for userspace
   291		 * to restore cache coherency.
   292		 */
   293		if (!device_iommu_capable(dev, IOMMU_CAP_CACHE_COHERENCY))
   294			return ERR_PTR(-EINVAL);
   295	
   296		/*
   297		 * No iommu supports pasid-granular msi message today. Here we
   298		 * just check whether the parent device can do safe interrupts.
   299		 * Isolation between virtual devices within the parent device
   300		 * relies on the parent driver to enforce.
   301		 */
   302		if (!iommufd_selftest_is_mock_dev(dev) &&
 > 303		    !msi_device_has_isolated_msi(dev)) {
   304			rc = iommufd_allow_unsafe_interrupts(dev);
   305			if (rc)
   306				return ERR_PTR(rc);
   307		}
   308	
   309		idev = iommufd_alloc_device(ictx, dev);
   310		if (IS_ERR(idev))
   311			return idev;
   312		idev->default_pasid = pasid;
   313	
   314		/*
   315		 * If the caller fails after this success it must call
   316		 * iommufd_unbind_device() which is safe since we hold this refcount.
   317		 * This also means the device is a leaf in the graph and no other object
   318		 * can take a reference on it.
   319		 */
   320		iommufd_object_finalize(ictx, &idev->obj);
   321		*id = idev->obj.id;
   322		return idev;
   323	}
   324	EXPORT_SYMBOL_NS_GPL(iommufd_device_bind_pasid, IOMMUFD);
   325	

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

                 reply	other threads:[~2023-08-24 14:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202308242104.f534pPlY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kevin.tian@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.