lkml.org 
[lkml]   [2020]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 5/8] vfio/type1: Report 1st-level/stage-1 format to userspace
Hi Yi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on vfio/next]
[also build test ERROR on v5.6-rc6 next-20200320]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Liu-Yi-L/vfio-expose-virtual-Shared-Virtual-Addressing-to-VMs/20200322-213259
base: https://github.com/awilliam/linux-vfio.git next
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=arm64

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

drivers/vfio/vfio_iommu_type1.c: In function 'vfio_iommu_get_stage1_format':
>> drivers/vfio/vfio_iommu_type1.c:2273:4: error: 'DOMAIN_ATTR_PASID_FORMAT' undeclared (first use in this function)
2273 | DOMAIN_ATTR_PASID_FORMAT, &format)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/vfio/vfio_iommu_type1.c:2273:4: note: each undeclared identifier is reported only once for each function it appears in
drivers/vfio/vfio_iommu_type1.c: In function 'vfio_iommu_type1_ioctl':
drivers/vfio/vfio_iommu_type1.c:2355:11: error: implicit declaration of function 'iommu_get_uapi_version' [-Werror=implicit-function-declaration]
2355 | return iommu_get_uapi_version();
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/DOMAIN_ATTR_PASID_FORMAT +2273 drivers/vfio/vfio_iommu_type1.c

2257
2258 static int vfio_iommu_get_stage1_format(struct vfio_iommu *iommu,
2259 u32 *stage1_format)
2260 {
2261 struct vfio_domain *domain;
2262 u32 format = 0, tmp_format = 0;
2263 int ret;
2264
2265 mutex_lock(&iommu->lock);
2266 if (list_empty(&iommu->domain_list)) {
2267 mutex_unlock(&iommu->lock);
2268 return -EINVAL;
2269 }
2270
2271 list_for_each_entry(domain, &iommu->domain_list, next) {
2272 if (iommu_domain_get_attr(domain->domain,
> 2273 DOMAIN_ATTR_PASID_FORMAT, &format)) {
2274 ret = -EINVAL;
2275 format = 0;
2276 goto out_unlock;
2277 }
2278 /*
2279 * format is always non-zero (the first format is
2280 * IOMMU_PASID_FORMAT_INTEL_VTD which is 1). For
2281 * the reason of potential different backed IOMMU
2282 * formats, here we expect to have identical formats
2283 * in the domain list, no mixed formats support.
2284 * return -EINVAL to fail the attempt of setup
2285 * VFIO_TYPE1_NESTING_IOMMU if non-identical formats
2286 * are detected.
2287 */
2288 if (tmp_format && tmp_format != format) {
2289 ret = -EINVAL;
2290 format = 0;
2291 goto out_unlock;
2292 }
2293
2294 tmp_format = format;
2295 }
2296 ret = 0;
2297
2298 out_unlock:
2299 if (format)
2300 *stage1_format = format;
2301 mutex_unlock(&iommu->lock);
2302 return ret;
2303 }
2304

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-03-22 17:46    [W:0.449 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site