[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202011170334.hUtdwv6l-lkp@intel.com>
Date: Tue, 17 Nov 2020 03:30:03 +0800
From: kernel test robot <lkp@...el.com>
To: Eric Auger <eric.auger@...hat.com>, eric.auger.pro@...il.com,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, kvmarm@...ts.cs.columbia.edu, will@...nel.org,
joro@...tes.org, maz@...nel.org, robin.murphy@....com
Cc: kbuild-all@...ts.01.org
Subject: Re: [PATCH v11 05/13] vfio/pci: Register an iommu fault handler
Hi Eric,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.10-rc4]
[also build test WARNING on next-20201116]
[cannot apply to 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]
url: https://github.com/0day-ci/linux/commits/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20201116-190742
base: 09162bc32c880a791c6c0668ce0745cf7958f576
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/747ef402696e1192684908ca99f06f3d68466c04
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20201116-190742
git checkout 747ef402696e1192684908ca99f06f3d68466c04
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/vfio.h:16,
from drivers/vfio/pci/vfio_pci.c:26:
include/uapi/linux/vfio.h:1231:34: error: field 'config' has incomplete type
1231 | struct iommu_pasid_table_config config; /* used on SET */
| ^~~~~~
>> drivers/vfio/pci/vfio_pci.c:339:5: warning: no previous prototype for 'vfio_pci_iommu_dev_fault_handler' [-Wmissing-prototypes]
339 | int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/vfio_pci_iommu_dev_fault_handler +339 drivers/vfio/pci/vfio_pci.c
338
> 339 int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data)
340 {
341 struct vfio_pci_device *vdev = (struct vfio_pci_device *)data;
342 struct vfio_region_dma_fault *reg =
343 (struct vfio_region_dma_fault *)vdev->fault_pages;
344 struct iommu_fault *new;
345 u32 head, tail, size;
346 int ret = -EINVAL;
347
348
349 if (WARN_ON(!reg))
350 return ret;
351
352 mutex_lock(&vdev->fault_queue_lock);
353
354 head = reg->head;
355 tail = reg->tail;
356 size = reg->nb_entries;
357
358 new = (struct iommu_fault *)(vdev->fault_pages + reg->offset +
359 head * reg->entry_size);
360
361 if (CIRC_SPACE(head, tail, size) < 1) {
362 ret = -ENOSPC;
363 goto unlock;
364 }
365
366 *new = *fault;
367 reg->head = (head + 1) % size;
368 ret = 0;
369 unlock:
370 mutex_unlock(&vdev->fault_queue_lock);
371 return ret;
372 }
373
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (77008 bytes)
Powered by blists - more mailing lists