* [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'
@ 2023-08-24 13:59 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-24 13:59 UTC (permalink / raw)
To: Yi Liu, Kevin Tian; +Cc: oe-kbuild-all
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-24 14:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 13:59 [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' kernel test robot
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.