From: kbuild test robot <lkp@intel.com>
To: "Liu, Yi L" <yi.l.liu@intel.com>
Cc: jean-philippe@linaro.org, kevin.tian@intel.com,
kbuild-all@lists.01.org, ashok.raj@intel.com,
kvm@vger.kernel.org, iommu@lists.linux-foundation.org,
yi.y.sun@intel.com, linux-kernel@vger.kernel.org,
alex.williamson@redhat.com, jun.j.tian@intel.com,
hao.wu@intel.com
Subject: Re: [PATCH v1 4/8] vfio: Check nesting iommu uAPI version
Date: Mon, 23 Mar 2020 02:30:21 +0800 [thread overview]
Message-ID: <202003230248.73XdAD66%lkp@intel.com> (raw)
In-Reply-To: <1584880325-10561-5-git-send-email-yi.l.liu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 6618 bytes --]
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_type1_ioctl':
>> drivers/vfio/vfio_iommu_type1.c:2299:11: error: implicit declaration of function 'iommu_get_uapi_version' [-Werror=implicit-function-declaration]
2299 | return iommu_get_uapi_version();
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/iommu_get_uapi_version +2299 drivers/vfio/vfio_iommu_type1.c
2281
2282 static long vfio_iommu_type1_ioctl(void *iommu_data,
2283 unsigned int cmd, unsigned long arg)
2284 {
2285 struct vfio_iommu *iommu = iommu_data;
2286 unsigned long minsz;
2287
2288 if (cmd == VFIO_CHECK_EXTENSION) {
2289 switch (arg) {
2290 case VFIO_TYPE1_IOMMU:
2291 case VFIO_TYPE1v2_IOMMU:
2292 case VFIO_TYPE1_NESTING_IOMMU:
2293 return 1;
2294 case VFIO_DMA_CC_IOMMU:
2295 if (!iommu)
2296 return 0;
2297 return vfio_domains_have_iommu_cache(iommu);
2298 case VFIO_NESTING_IOMMU_UAPI:
> 2299 return iommu_get_uapi_version();
2300 default:
2301 return 0;
2302 }
2303 } else if (cmd == VFIO_IOMMU_GET_INFO) {
2304 struct vfio_iommu_type1_info info;
2305 struct vfio_info_cap caps = { .buf = NULL, .size = 0 };
2306 unsigned long capsz;
2307 int ret;
2308
2309 minsz = offsetofend(struct vfio_iommu_type1_info, iova_pgsizes);
2310
2311 /* For backward compatibility, cannot require this */
2312 capsz = offsetofend(struct vfio_iommu_type1_info, cap_offset);
2313
2314 if (copy_from_user(&info, (void __user *)arg, minsz))
2315 return -EFAULT;
2316
2317 if (info.argsz < minsz)
2318 return -EINVAL;
2319
2320 if (info.argsz >= capsz) {
2321 minsz = capsz;
2322 info.cap_offset = 0; /* output, no-recopy necessary */
2323 }
2324
2325 info.flags = VFIO_IOMMU_INFO_PGSIZES;
2326
2327 info.iova_pgsizes = vfio_pgsize_bitmap(iommu);
2328
2329 ret = vfio_iommu_iova_build_caps(iommu, &caps);
2330 if (ret)
2331 return ret;
2332
2333 ret = vfio_iommu_info_add_nesting_cap(iommu, &caps);
2334 if (ret)
2335 return ret;
2336
2337 if (caps.size) {
2338 info.flags |= VFIO_IOMMU_INFO_CAPS;
2339
2340 if (info.argsz < sizeof(info) + caps.size) {
2341 info.argsz = sizeof(info) + caps.size;
2342 } else {
2343 vfio_info_cap_shift(&caps, sizeof(info));
2344 if (copy_to_user((void __user *)arg +
2345 sizeof(info), caps.buf,
2346 caps.size)) {
2347 kfree(caps.buf);
2348 return -EFAULT;
2349 }
2350 info.cap_offset = sizeof(info);
2351 }
2352
2353 kfree(caps.buf);
2354 }
2355
2356 return copy_to_user((void __user *)arg, &info, minsz) ?
2357 -EFAULT : 0;
2358
2359 } else if (cmd == VFIO_IOMMU_MAP_DMA) {
2360 struct vfio_iommu_type1_dma_map map;
2361 uint32_t mask = VFIO_DMA_MAP_FLAG_READ |
2362 VFIO_DMA_MAP_FLAG_WRITE;
2363
2364 minsz = offsetofend(struct vfio_iommu_type1_dma_map, size);
2365
2366 if (copy_from_user(&map, (void __user *)arg, minsz))
2367 return -EFAULT;
2368
2369 if (map.argsz < minsz || map.flags & ~mask)
2370 return -EINVAL;
2371
2372 return vfio_dma_do_map(iommu, &map);
2373
2374 } else if (cmd == VFIO_IOMMU_UNMAP_DMA) {
2375 struct vfio_iommu_type1_dma_unmap unmap;
2376 long ret;
2377
2378 minsz = offsetofend(struct vfio_iommu_type1_dma_unmap, size);
2379
2380 if (copy_from_user(&unmap, (void __user *)arg, minsz))
2381 return -EFAULT;
2382
2383 if (unmap.argsz < minsz || unmap.flags)
2384 return -EINVAL;
2385
2386 ret = vfio_dma_do_unmap(iommu, &unmap);
2387 if (ret)
2388 return ret;
2389
2390 return copy_to_user((void __user *)arg, &unmap, minsz) ?
2391 -EFAULT : 0;
2392
2393 } else if (cmd == VFIO_IOMMU_PASID_REQUEST) {
2394 struct vfio_iommu_type1_pasid_request req;
2395 unsigned long offset;
2396
2397 minsz = offsetofend(struct vfio_iommu_type1_pasid_request,
2398 flags);
2399
2400 if (copy_from_user(&req, (void __user *)arg, minsz))
2401 return -EFAULT;
2402
2403 if (req.argsz < minsz ||
2404 !vfio_iommu_type1_pasid_req_valid(req.flags))
2405 return -EINVAL;
2406
2407 if (copy_from_user((void *)&req + minsz,
2408 (void __user *)arg + minsz,
2409 sizeof(req) - minsz))
2410 return -EFAULT;
2411
2412 switch (req.flags & VFIO_PASID_REQUEST_MASK) {
2413 case VFIO_IOMMU_PASID_ALLOC:
2414 {
2415 int ret = 0, result;
2416
2417 result = vfio_iommu_type1_pasid_alloc(iommu,
2418 req.alloc_pasid.min,
2419 req.alloc_pasid.max);
2420 if (result > 0) {
2421 offset = offsetof(
2422 struct vfio_iommu_type1_pasid_request,
2423 alloc_pasid.result);
2424 ret = copy_to_user(
2425 (void __user *) (arg + offset),
2426 &result, sizeof(result));
2427 } else {
2428 pr_debug("%s: PASID alloc failed\n", __func__);
2429 ret = -EFAULT;
2430 }
2431 return ret;
2432 }
2433 case VFIO_IOMMU_PASID_FREE:
2434 return vfio_iommu_type1_pasid_free(iommu,
2435 req.free_pasid);
2436 default:
2437 return -EINVAL;
2438 }
2439 }
2440
2441 return -ENOTTY;
2442 }
2443
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 46471 bytes --]
[-- Attachment #3: Type: text/plain, Size: 156 bytes --]
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: "Liu, Yi L" <yi.l.liu@intel.com>
Cc: kbuild-all@lists.01.org, alex.williamson@redhat.com,
eric.auger@redhat.com, kevin.tian@intel.com,
jacob.jun.pan@linux.intel.com, joro@8bytes.org,
ashok.raj@intel.com, yi.l.liu@intel.com, jun.j.tian@intel.com,
yi.y.sun@intel.com, jean-philippe@linaro.org, peterx@redhat.com,
iommu@lists.linux-foundation.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, hao.wu@intel.com
Subject: Re: [PATCH v1 4/8] vfio: Check nesting iommu uAPI version
Date: Mon, 23 Mar 2020 02:30:21 +0800 [thread overview]
Message-ID: <202003230248.73XdAD66%lkp@intel.com> (raw)
In-Reply-To: <1584880325-10561-5-git-send-email-yi.l.liu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 6618 bytes --]
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_type1_ioctl':
>> drivers/vfio/vfio_iommu_type1.c:2299:11: error: implicit declaration of function 'iommu_get_uapi_version' [-Werror=implicit-function-declaration]
2299 | return iommu_get_uapi_version();
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/iommu_get_uapi_version +2299 drivers/vfio/vfio_iommu_type1.c
2281
2282 static long vfio_iommu_type1_ioctl(void *iommu_data,
2283 unsigned int cmd, unsigned long arg)
2284 {
2285 struct vfio_iommu *iommu = iommu_data;
2286 unsigned long minsz;
2287
2288 if (cmd == VFIO_CHECK_EXTENSION) {
2289 switch (arg) {
2290 case VFIO_TYPE1_IOMMU:
2291 case VFIO_TYPE1v2_IOMMU:
2292 case VFIO_TYPE1_NESTING_IOMMU:
2293 return 1;
2294 case VFIO_DMA_CC_IOMMU:
2295 if (!iommu)
2296 return 0;
2297 return vfio_domains_have_iommu_cache(iommu);
2298 case VFIO_NESTING_IOMMU_UAPI:
> 2299 return iommu_get_uapi_version();
2300 default:
2301 return 0;
2302 }
2303 } else if (cmd == VFIO_IOMMU_GET_INFO) {
2304 struct vfio_iommu_type1_info info;
2305 struct vfio_info_cap caps = { .buf = NULL, .size = 0 };
2306 unsigned long capsz;
2307 int ret;
2308
2309 minsz = offsetofend(struct vfio_iommu_type1_info, iova_pgsizes);
2310
2311 /* For backward compatibility, cannot require this */
2312 capsz = offsetofend(struct vfio_iommu_type1_info, cap_offset);
2313
2314 if (copy_from_user(&info, (void __user *)arg, minsz))
2315 return -EFAULT;
2316
2317 if (info.argsz < minsz)
2318 return -EINVAL;
2319
2320 if (info.argsz >= capsz) {
2321 minsz = capsz;
2322 info.cap_offset = 0; /* output, no-recopy necessary */
2323 }
2324
2325 info.flags = VFIO_IOMMU_INFO_PGSIZES;
2326
2327 info.iova_pgsizes = vfio_pgsize_bitmap(iommu);
2328
2329 ret = vfio_iommu_iova_build_caps(iommu, &caps);
2330 if (ret)
2331 return ret;
2332
2333 ret = vfio_iommu_info_add_nesting_cap(iommu, &caps);
2334 if (ret)
2335 return ret;
2336
2337 if (caps.size) {
2338 info.flags |= VFIO_IOMMU_INFO_CAPS;
2339
2340 if (info.argsz < sizeof(info) + caps.size) {
2341 info.argsz = sizeof(info) + caps.size;
2342 } else {
2343 vfio_info_cap_shift(&caps, sizeof(info));
2344 if (copy_to_user((void __user *)arg +
2345 sizeof(info), caps.buf,
2346 caps.size)) {
2347 kfree(caps.buf);
2348 return -EFAULT;
2349 }
2350 info.cap_offset = sizeof(info);
2351 }
2352
2353 kfree(caps.buf);
2354 }
2355
2356 return copy_to_user((void __user *)arg, &info, minsz) ?
2357 -EFAULT : 0;
2358
2359 } else if (cmd == VFIO_IOMMU_MAP_DMA) {
2360 struct vfio_iommu_type1_dma_map map;
2361 uint32_t mask = VFIO_DMA_MAP_FLAG_READ |
2362 VFIO_DMA_MAP_FLAG_WRITE;
2363
2364 minsz = offsetofend(struct vfio_iommu_type1_dma_map, size);
2365
2366 if (copy_from_user(&map, (void __user *)arg, minsz))
2367 return -EFAULT;
2368
2369 if (map.argsz < minsz || map.flags & ~mask)
2370 return -EINVAL;
2371
2372 return vfio_dma_do_map(iommu, &map);
2373
2374 } else if (cmd == VFIO_IOMMU_UNMAP_DMA) {
2375 struct vfio_iommu_type1_dma_unmap unmap;
2376 long ret;
2377
2378 minsz = offsetofend(struct vfio_iommu_type1_dma_unmap, size);
2379
2380 if (copy_from_user(&unmap, (void __user *)arg, minsz))
2381 return -EFAULT;
2382
2383 if (unmap.argsz < minsz || unmap.flags)
2384 return -EINVAL;
2385
2386 ret = vfio_dma_do_unmap(iommu, &unmap);
2387 if (ret)
2388 return ret;
2389
2390 return copy_to_user((void __user *)arg, &unmap, minsz) ?
2391 -EFAULT : 0;
2392
2393 } else if (cmd == VFIO_IOMMU_PASID_REQUEST) {
2394 struct vfio_iommu_type1_pasid_request req;
2395 unsigned long offset;
2396
2397 minsz = offsetofend(struct vfio_iommu_type1_pasid_request,
2398 flags);
2399
2400 if (copy_from_user(&req, (void __user *)arg, minsz))
2401 return -EFAULT;
2402
2403 if (req.argsz < minsz ||
2404 !vfio_iommu_type1_pasid_req_valid(req.flags))
2405 return -EINVAL;
2406
2407 if (copy_from_user((void *)&req + minsz,
2408 (void __user *)arg + minsz,
2409 sizeof(req) - minsz))
2410 return -EFAULT;
2411
2412 switch (req.flags & VFIO_PASID_REQUEST_MASK) {
2413 case VFIO_IOMMU_PASID_ALLOC:
2414 {
2415 int ret = 0, result;
2416
2417 result = vfio_iommu_type1_pasid_alloc(iommu,
2418 req.alloc_pasid.min,
2419 req.alloc_pasid.max);
2420 if (result > 0) {
2421 offset = offsetof(
2422 struct vfio_iommu_type1_pasid_request,
2423 alloc_pasid.result);
2424 ret = copy_to_user(
2425 (void __user *) (arg + offset),
2426 &result, sizeof(result));
2427 } else {
2428 pr_debug("%s: PASID alloc failed\n", __func__);
2429 ret = -EFAULT;
2430 }
2431 return ret;
2432 }
2433 case VFIO_IOMMU_PASID_FREE:
2434 return vfio_iommu_type1_pasid_free(iommu,
2435 req.free_pasid);
2436 default:
2437 return -EINVAL;
2438 }
2439 }
2440
2441 return -ENOTTY;
2442 }
2443
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 46471 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v1 4/8] vfio: Check nesting iommu uAPI version
Date: Mon, 23 Mar 2020 02:30:21 +0800 [thread overview]
Message-ID: <202003230248.73XdAD66%lkp@intel.com> (raw)
In-Reply-To: <1584880325-10561-5-git-send-email-yi.l.liu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 6820 bytes --]
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_type1_ioctl':
>> drivers/vfio/vfio_iommu_type1.c:2299:11: error: implicit declaration of function 'iommu_get_uapi_version' [-Werror=implicit-function-declaration]
2299 | return iommu_get_uapi_version();
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/iommu_get_uapi_version +2299 drivers/vfio/vfio_iommu_type1.c
2281
2282 static long vfio_iommu_type1_ioctl(void *iommu_data,
2283 unsigned int cmd, unsigned long arg)
2284 {
2285 struct vfio_iommu *iommu = iommu_data;
2286 unsigned long minsz;
2287
2288 if (cmd == VFIO_CHECK_EXTENSION) {
2289 switch (arg) {
2290 case VFIO_TYPE1_IOMMU:
2291 case VFIO_TYPE1v2_IOMMU:
2292 case VFIO_TYPE1_NESTING_IOMMU:
2293 return 1;
2294 case VFIO_DMA_CC_IOMMU:
2295 if (!iommu)
2296 return 0;
2297 return vfio_domains_have_iommu_cache(iommu);
2298 case VFIO_NESTING_IOMMU_UAPI:
> 2299 return iommu_get_uapi_version();
2300 default:
2301 return 0;
2302 }
2303 } else if (cmd == VFIO_IOMMU_GET_INFO) {
2304 struct vfio_iommu_type1_info info;
2305 struct vfio_info_cap caps = { .buf = NULL, .size = 0 };
2306 unsigned long capsz;
2307 int ret;
2308
2309 minsz = offsetofend(struct vfio_iommu_type1_info, iova_pgsizes);
2310
2311 /* For backward compatibility, cannot require this */
2312 capsz = offsetofend(struct vfio_iommu_type1_info, cap_offset);
2313
2314 if (copy_from_user(&info, (void __user *)arg, minsz))
2315 return -EFAULT;
2316
2317 if (info.argsz < minsz)
2318 return -EINVAL;
2319
2320 if (info.argsz >= capsz) {
2321 minsz = capsz;
2322 info.cap_offset = 0; /* output, no-recopy necessary */
2323 }
2324
2325 info.flags = VFIO_IOMMU_INFO_PGSIZES;
2326
2327 info.iova_pgsizes = vfio_pgsize_bitmap(iommu);
2328
2329 ret = vfio_iommu_iova_build_caps(iommu, &caps);
2330 if (ret)
2331 return ret;
2332
2333 ret = vfio_iommu_info_add_nesting_cap(iommu, &caps);
2334 if (ret)
2335 return ret;
2336
2337 if (caps.size) {
2338 info.flags |= VFIO_IOMMU_INFO_CAPS;
2339
2340 if (info.argsz < sizeof(info) + caps.size) {
2341 info.argsz = sizeof(info) + caps.size;
2342 } else {
2343 vfio_info_cap_shift(&caps, sizeof(info));
2344 if (copy_to_user((void __user *)arg +
2345 sizeof(info), caps.buf,
2346 caps.size)) {
2347 kfree(caps.buf);
2348 return -EFAULT;
2349 }
2350 info.cap_offset = sizeof(info);
2351 }
2352
2353 kfree(caps.buf);
2354 }
2355
2356 return copy_to_user((void __user *)arg, &info, minsz) ?
2357 -EFAULT : 0;
2358
2359 } else if (cmd == VFIO_IOMMU_MAP_DMA) {
2360 struct vfio_iommu_type1_dma_map map;
2361 uint32_t mask = VFIO_DMA_MAP_FLAG_READ |
2362 VFIO_DMA_MAP_FLAG_WRITE;
2363
2364 minsz = offsetofend(struct vfio_iommu_type1_dma_map, size);
2365
2366 if (copy_from_user(&map, (void __user *)arg, minsz))
2367 return -EFAULT;
2368
2369 if (map.argsz < minsz || map.flags & ~mask)
2370 return -EINVAL;
2371
2372 return vfio_dma_do_map(iommu, &map);
2373
2374 } else if (cmd == VFIO_IOMMU_UNMAP_DMA) {
2375 struct vfio_iommu_type1_dma_unmap unmap;
2376 long ret;
2377
2378 minsz = offsetofend(struct vfio_iommu_type1_dma_unmap, size);
2379
2380 if (copy_from_user(&unmap, (void __user *)arg, minsz))
2381 return -EFAULT;
2382
2383 if (unmap.argsz < minsz || unmap.flags)
2384 return -EINVAL;
2385
2386 ret = vfio_dma_do_unmap(iommu, &unmap);
2387 if (ret)
2388 return ret;
2389
2390 return copy_to_user((void __user *)arg, &unmap, minsz) ?
2391 -EFAULT : 0;
2392
2393 } else if (cmd == VFIO_IOMMU_PASID_REQUEST) {
2394 struct vfio_iommu_type1_pasid_request req;
2395 unsigned long offset;
2396
2397 minsz = offsetofend(struct vfio_iommu_type1_pasid_request,
2398 flags);
2399
2400 if (copy_from_user(&req, (void __user *)arg, minsz))
2401 return -EFAULT;
2402
2403 if (req.argsz < minsz ||
2404 !vfio_iommu_type1_pasid_req_valid(req.flags))
2405 return -EINVAL;
2406
2407 if (copy_from_user((void *)&req + minsz,
2408 (void __user *)arg + minsz,
2409 sizeof(req) - minsz))
2410 return -EFAULT;
2411
2412 switch (req.flags & VFIO_PASID_REQUEST_MASK) {
2413 case VFIO_IOMMU_PASID_ALLOC:
2414 {
2415 int ret = 0, result;
2416
2417 result = vfio_iommu_type1_pasid_alloc(iommu,
2418 req.alloc_pasid.min,
2419 req.alloc_pasid.max);
2420 if (result > 0) {
2421 offset = offsetof(
2422 struct vfio_iommu_type1_pasid_request,
2423 alloc_pasid.result);
2424 ret = copy_to_user(
2425 (void __user *) (arg + offset),
2426 &result, sizeof(result));
2427 } else {
2428 pr_debug("%s: PASID alloc failed\n", __func__);
2429 ret = -EFAULT;
2430 }
2431 return ret;
2432 }
2433 case VFIO_IOMMU_PASID_FREE:
2434 return vfio_iommu_type1_pasid_free(iommu,
2435 req.free_pasid);
2436 default:
2437 return -EINVAL;
2438 }
2439 }
2440
2441 return -ENOTTY;
2442 }
2443
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 46471 bytes --]
next prev parent reply other threads:[~2020-03-22 18:30 UTC|newest]
Thread overview: 225+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 12:31 [PATCH v1 0/8] vfio: expose virtual Shared Virtual Addressing to VMs Liu, Yi L
2020-03-22 12:31 ` Liu, Yi L
2020-03-22 12:31 ` [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) Liu, Yi L
2020-03-22 12:31 ` Liu, Yi L
2020-03-22 16:21 ` kbuild test robot
2020-03-22 16:21 ` kbuild test robot
2020-03-22 16:21 ` kbuild test robot
2020-03-30 8:32 ` Tian, Kevin
2020-03-30 8:32 ` Tian, Kevin
2020-03-30 14:36 ` Liu, Yi L
2020-03-30 14:36 ` Liu, Yi L
2020-03-31 5:40 ` Tian, Kevin
2020-03-31 5:40 ` Tian, Kevin
2020-03-31 13:22 ` Liu, Yi L
2020-03-31 13:22 ` Liu, Yi L
2020-04-01 5:43 ` Tian, Kevin
2020-04-01 5:43 ` Tian, Kevin
2020-04-01 5:48 ` Liu, Yi L
2020-04-01 5:48 ` Liu, Yi L
2020-03-31 7:53 ` Christoph Hellwig
2020-03-31 7:53 ` Christoph Hellwig
2020-03-31 8:17 ` Liu, Yi L
2020-03-31 8:17 ` Liu, Yi L
2020-03-31 8:32 ` Liu, Yi L
2020-03-31 8:32 ` Liu, Yi L
2020-03-31 8:36 ` Liu, Yi L
2020-03-31 8:36 ` Liu, Yi L
2020-03-31 9:15 ` Christoph Hellwig
2020-03-31 9:15 ` Christoph Hellwig
2020-04-02 13:52 ` Jean-Philippe Brucker
2020-04-02 13:52 ` Jean-Philippe Brucker
2020-04-03 11:56 ` Liu, Yi L
2020-04-03 11:56 ` Liu, Yi L
2020-04-03 12:39 ` Jean-Philippe Brucker
2020-04-03 12:39 ` Jean-Philippe Brucker
2020-04-03 12:44 ` Liu, Yi L
2020-04-03 12:44 ` Liu, Yi L
2020-04-02 17:50 ` Alex Williamson
2020-04-02 17:50 ` Alex Williamson
2020-04-03 5:58 ` Tian, Kevin
2020-04-03 5:58 ` Tian, Kevin
2020-04-03 15:14 ` Alex Williamson
2020-04-03 15:14 ` Alex Williamson
2020-04-07 4:42 ` Tian, Kevin
2020-04-07 4:42 ` Tian, Kevin
2020-04-07 15:14 ` Alex Williamson
2020-04-07 15:14 ` Alex Williamson
2020-04-03 13:12 ` Liu, Yi L
2020-04-03 13:12 ` Liu, Yi L
2020-04-03 17:50 ` Alex Williamson
2020-04-03 17:50 ` Alex Williamson
2020-04-07 4:52 ` Tian, Kevin
2020-04-07 4:52 ` Tian, Kevin
2020-04-08 0:52 ` Liu, Yi L
2020-04-08 0:52 ` Liu, Yi L
2020-03-22 12:31 ` [PATCH v1 2/8] vfio/type1: Add vfio_iommu_type1 parameter for quota tuning Liu, Yi L
2020-03-22 12:31 ` Liu, Yi L
2020-03-22 17:20 ` kbuild test robot
2020-03-22 17:20 ` kbuild test robot
2020-03-22 17:20 ` kbuild test robot
2020-03-30 8:40 ` Tian, Kevin
2020-03-30 8:40 ` Tian, Kevin
2020-03-30 8:52 ` Liu, Yi L
2020-03-30 8:52 ` Liu, Yi L
2020-03-30 9:19 ` Tian, Kevin
2020-03-30 9:19 ` Tian, Kevin
2020-03-30 9:26 ` Liu, Yi L
2020-03-30 9:26 ` Liu, Yi L
2020-03-30 11:44 ` Tian, Kevin
2020-03-30 11:44 ` Tian, Kevin
2020-04-02 17:58 ` Alex Williamson
2020-04-02 17:58 ` Alex Williamson
2020-04-03 8:15 ` Liu, Yi L
2020-04-03 8:15 ` Liu, Yi L
2020-03-22 12:32 ` [PATCH v1 3/8] vfio/type1: Report PASID alloc/free support to userspace Liu, Yi L
2020-03-22 12:32 ` Liu, Yi L
2020-03-30 9:43 ` Tian, Kevin
2020-03-30 9:43 ` Tian, Kevin
2020-04-01 7:46 ` Liu, Yi L
2020-04-01 7:46 ` Liu, Yi L
2020-04-01 9:41 ` Auger Eric
2020-04-01 9:41 ` Auger Eric
2020-04-01 13:13 ` Liu, Yi L
2020-04-01 13:13 ` Liu, Yi L
2020-04-02 18:01 ` Alex Williamson
2020-04-02 18:01 ` Alex Williamson
2020-04-03 8:17 ` Liu, Yi L
2020-04-03 8:17 ` Liu, Yi L
2020-04-03 17:28 ` Alex Williamson
2020-04-03 17:28 ` Alex Williamson
2020-04-04 11:36 ` Liu, Yi L
2020-04-04 11:36 ` Liu, Yi L
2020-03-22 12:32 ` [PATCH v1 4/8] vfio: Check nesting iommu uAPI version Liu, Yi L
2020-03-22 12:32 ` Liu, Yi L
2020-03-22 18:30 ` kbuild test robot [this message]
2020-03-22 18:30 ` kbuild test robot
2020-03-22 18:30 ` kbuild test robot
2020-03-22 12:32 ` [PATCH v1 5/8] vfio/type1: Report 1st-level/stage-1 format to userspace Liu, Yi L
2020-03-22 12:32 ` Liu, Yi L
2020-03-22 16:44 ` kbuild test robot
2020-03-22 16:44 ` kbuild test robot
2020-03-22 16:44 ` kbuild test robot
2020-03-30 11:48 ` Tian, Kevin
2020-03-30 11:48 ` Tian, Kevin
2020-04-01 7:38 ` Liu, Yi L
2020-04-01 7:38 ` Liu, Yi L
2020-04-01 7:56 ` Tian, Kevin
2020-04-01 7:56 ` Tian, Kevin
2020-04-01 8:06 ` Liu, Yi L
2020-04-01 8:06 ` Liu, Yi L
2020-04-01 8:08 ` Tian, Kevin
2020-04-01 8:08 ` Tian, Kevin
2020-04-01 8:09 ` Liu, Yi L
2020-04-01 8:09 ` Liu, Yi L
2020-04-01 8:51 ` Auger Eric
2020-04-01 8:51 ` Auger Eric
2020-04-01 12:51 ` Liu, Yi L
2020-04-01 12:51 ` Liu, Yi L
2020-04-01 13:01 ` Auger Eric
2020-04-01 13:01 ` Auger Eric
2020-04-03 8:23 ` Jean-Philippe Brucker
2020-04-03 8:23 ` Jean-Philippe Brucker
2020-04-07 9:43 ` Liu, Yi L
2020-04-07 9:43 ` Liu, Yi L
2020-04-08 1:02 ` Liu, Yi L
2020-04-08 1:02 ` Liu, Yi L
2020-04-08 10:27 ` Auger Eric
2020-04-08 10:27 ` Auger Eric
2020-04-09 8:14 ` Jean-Philippe Brucker
2020-04-09 8:14 ` Jean-Philippe Brucker
2020-04-09 9:01 ` Auger Eric
2020-04-09 9:01 ` Auger Eric
2020-04-09 12:47 ` Liu, Yi L
2020-04-09 12:47 ` Liu, Yi L
2020-04-10 3:28 ` Auger Eric
2020-04-10 3:28 ` Auger Eric
2020-04-10 3:48 ` Liu, Yi L
2020-04-10 3:48 ` Liu, Yi L
2020-04-10 12:30 ` Liu, Yi L
2020-04-10 12:30 ` Liu, Yi L
2020-04-02 19:20 ` Alex Williamson
2020-04-02 19:20 ` Alex Williamson
2020-04-03 11:59 ` Liu, Yi L
2020-04-03 11:59 ` Liu, Yi L
2020-03-22 12:32 ` [PATCH v1 6/8] vfio/type1: Bind guest page tables to host Liu, Yi L
2020-03-22 12:32 ` Liu, Yi L
2020-03-22 18:10 ` kbuild test robot
2020-03-22 18:10 ` kbuild test robot
2020-03-22 18:10 ` kbuild test robot
2020-03-30 12:46 ` Tian, Kevin
2020-03-30 12:46 ` Tian, Kevin
2020-04-01 9:13 ` Liu, Yi L
2020-04-01 9:13 ` Liu, Yi L
2020-04-02 2:12 ` Tian, Kevin
2020-04-02 2:12 ` Tian, Kevin
2020-04-02 8:05 ` Liu, Yi L
2020-04-02 8:05 ` Liu, Yi L
2020-04-03 8:34 ` Jean-Philippe Brucker
2020-04-03 8:34 ` Jean-Philippe Brucker
2020-04-07 10:33 ` Liu, Yi L
2020-04-07 10:33 ` Liu, Yi L
2020-04-09 8:28 ` Jean-Philippe Brucker
2020-04-09 8:28 ` Jean-Philippe Brucker
2020-04-09 9:15 ` Liu, Yi L
2020-04-09 9:15 ` Liu, Yi L
2020-04-09 9:38 ` Jean-Philippe Brucker
2020-04-09 9:38 ` Jean-Philippe Brucker
2020-04-02 19:57 ` Alex Williamson
2020-04-02 19:57 ` Alex Williamson
2020-04-03 13:30 ` Liu, Yi L
2020-04-03 13:30 ` Liu, Yi L
2020-04-03 18:11 ` Alex Williamson
2020-04-03 18:11 ` Alex Williamson
2020-04-04 10:28 ` Liu, Yi L
2020-04-04 10:28 ` Liu, Yi L
2020-04-11 5:52 ` Liu, Yi L
2020-04-11 5:52 ` Liu, Yi L
2020-03-22 12:32 ` [PATCH v1 7/8] vfio/type1: Add VFIO_IOMMU_CACHE_INVALIDATE Liu, Yi L
2020-03-22 12:32 ` Liu, Yi L
2020-03-30 12:58 ` Tian, Kevin
2020-03-30 12:58 ` Tian, Kevin
2020-04-01 7:49 ` Liu, Yi L
2020-04-01 7:49 ` Liu, Yi L
2020-03-31 7:56 ` Christoph Hellwig
2020-03-31 7:56 ` Christoph Hellwig
2020-03-31 10:48 ` Liu, Yi L
2020-03-31 10:48 ` Liu, Yi L
2020-04-02 20:24 ` Alex Williamson
2020-04-02 20:24 ` Alex Williamson
2020-04-03 6:39 ` Tian, Kevin
2020-04-03 6:39 ` Tian, Kevin
2020-04-03 15:31 ` Jacob Pan
2020-04-03 15:31 ` Jacob Pan
2020-04-03 15:34 ` Alex Williamson
2020-04-03 15:34 ` Alex Williamson
2020-04-08 2:28 ` Liu, Yi L
2020-04-08 2:28 ` Liu, Yi L
2020-04-16 10:40 ` Liu, Yi L
2020-04-16 10:40 ` Liu, Yi L
2020-04-16 12:09 ` Tian, Kevin
2020-04-16 12:09 ` Tian, Kevin
2020-04-16 12:42 ` Auger Eric
2020-04-16 12:42 ` Auger Eric
2020-04-16 13:28 ` Tian, Kevin
2020-04-16 13:28 ` Tian, Kevin
2020-04-16 15:12 ` Auger Eric
2020-04-16 15:12 ` Auger Eric
2020-04-16 14:40 ` Alex Williamson
2020-04-16 14:40 ` Alex Williamson
2020-04-16 14:48 ` Alex Williamson
2020-04-16 14:48 ` Alex Williamson
2020-04-17 6:03 ` Liu, Yi L
2020-04-17 6:03 ` Liu, Yi L
2020-03-22 12:32 ` [PATCH v1 8/8] vfio/type1: Add vSVA support for IOMMU-backed mdevs Liu, Yi L
2020-03-22 12:32 ` Liu, Yi L
2020-03-30 13:18 ` Tian, Kevin
2020-03-30 13:18 ` Tian, Kevin
2020-04-01 7:51 ` Liu, Yi L
2020-04-01 7:51 ` Liu, Yi L
2020-04-02 20:33 ` Alex Williamson
2020-04-02 20:33 ` Alex Williamson
2020-04-03 13:39 ` Liu, Yi L
2020-04-03 13:39 ` Liu, Yi L
2020-03-26 12:56 ` [PATCH v1 0/8] vfio: expose virtual Shared Virtual Addressing to VMs Liu, Yi L
2020-03-26 12:56 ` Liu, Yi L
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=202003230248.73XdAD66%lkp@intel.com \
--to=lkp@intel.com \
--cc=alex.williamson@redhat.com \
--cc=ashok.raj@intel.com \
--cc=hao.wu@intel.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe@linaro.org \
--cc=jun.j.tian@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yi.l.liu@intel.com \
--cc=yi.y.sun@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.