Hi Xie, [FYI, it's a private test report for your RFC patch.] [auto build test ERROR on vhost/linux-next] [also build test ERROR on next-20210223] [cannot apply to lwn/docs-next linus/master v5.11] [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/Xie-Yongji/Introduce-VDUSE-vDPA-Device-in-Userspace/20210223-200222 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next config: mips-allyesconfig (attached as .config) compiler: mips-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/5d6a89bab8457978e07279c3326381353c1474f3 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Xie-Yongji/Introduce-VDUSE-vDPA-Device-in-Userspace/20210223-200222 git checkout 5d6a89bab8457978e07279c3326381353c1474f3 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/vdpa/vdpa_user/iova_domain.c: In function 'vduse_domain_release': >> drivers/vdpa/vdpa_user/iova_domain.c:416:2: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] 416 | vfree(domain->bounce_pages); | ^~~~~ | kvfree drivers/vdpa/vdpa_user/iova_domain.c: In function 'vduse_domain_create': >> drivers/vdpa/vdpa_user/iova_domain.c:452:25: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration] 452 | domain->bounce_pages = vzalloc(bounce_pfns * sizeof(struct page *)); | ^~~~~~~ | kvzalloc drivers/vdpa/vdpa_user/iova_domain.c:452:23: warning: assignment to 'struct page **' from 'int' makes pointer from integer without a cast [-Wint-conversion] 452 | domain->bounce_pages = vzalloc(bounce_pfns * sizeof(struct page *)); | ^ cc1: some warnings being treated as errors vim +416 drivers/vdpa/vdpa_user/iova_domain.c 97cdf3b268ace7 Xie Yongji 2021-02-23 407 97cdf3b268ace7 Xie Yongji 2021-02-23 408 static int vduse_domain_release(struct inode *inode, struct file *file) 97cdf3b268ace7 Xie Yongji 2021-02-23 409 { 97cdf3b268ace7 Xie Yongji 2021-02-23 410 struct vduse_iova_domain *domain = file->private_data; 97cdf3b268ace7 Xie Yongji 2021-02-23 411 97cdf3b268ace7 Xie Yongji 2021-02-23 412 vduse_domain_free_bounce_pages(domain, 0, domain->bounce_size); 97cdf3b268ace7 Xie Yongji 2021-02-23 413 put_iova_domain(&domain->stream_iovad); 97cdf3b268ace7 Xie Yongji 2021-02-23 414 put_iova_domain(&domain->consistent_iovad); 97cdf3b268ace7 Xie Yongji 2021-02-23 415 vhost_iotlb_free(domain->iotlb); 97cdf3b268ace7 Xie Yongji 2021-02-23 @416 vfree(domain->bounce_pages); 97cdf3b268ace7 Xie Yongji 2021-02-23 417 kfree(domain); 97cdf3b268ace7 Xie Yongji 2021-02-23 418 97cdf3b268ace7 Xie Yongji 2021-02-23 419 return 0; 97cdf3b268ace7 Xie Yongji 2021-02-23 420 } 97cdf3b268ace7 Xie Yongji 2021-02-23 421 97cdf3b268ace7 Xie Yongji 2021-02-23 422 static const struct file_operations vduse_domain_fops = { 97cdf3b268ace7 Xie Yongji 2021-02-23 423 .mmap = vduse_domain_mmap, 97cdf3b268ace7 Xie Yongji 2021-02-23 424 .release = vduse_domain_release, 97cdf3b268ace7 Xie Yongji 2021-02-23 425 }; 97cdf3b268ace7 Xie Yongji 2021-02-23 426 97cdf3b268ace7 Xie Yongji 2021-02-23 427 void vduse_domain_destroy(struct vduse_iova_domain *domain) 97cdf3b268ace7 Xie Yongji 2021-02-23 428 { 97cdf3b268ace7 Xie Yongji 2021-02-23 429 fput(domain->file); 97cdf3b268ace7 Xie Yongji 2021-02-23 430 } 97cdf3b268ace7 Xie Yongji 2021-02-23 431 97cdf3b268ace7 Xie Yongji 2021-02-23 432 struct vduse_iova_domain * 97cdf3b268ace7 Xie Yongji 2021-02-23 433 vduse_domain_create(unsigned long iova_limit, size_t bounce_size) 97cdf3b268ace7 Xie Yongji 2021-02-23 434 { 97cdf3b268ace7 Xie Yongji 2021-02-23 435 struct vduse_iova_domain *domain; 97cdf3b268ace7 Xie Yongji 2021-02-23 436 struct file *file; 97cdf3b268ace7 Xie Yongji 2021-02-23 437 unsigned long bounce_pfns = PAGE_ALIGN(bounce_size) >> PAGE_SHIFT; 97cdf3b268ace7 Xie Yongji 2021-02-23 438 97cdf3b268ace7 Xie Yongji 2021-02-23 439 if (iova_limit <= bounce_size) 97cdf3b268ace7 Xie Yongji 2021-02-23 440 return NULL; 97cdf3b268ace7 Xie Yongji 2021-02-23 441 97cdf3b268ace7 Xie Yongji 2021-02-23 442 domain = kzalloc(sizeof(*domain), GFP_KERNEL); 97cdf3b268ace7 Xie Yongji 2021-02-23 443 if (!domain) 97cdf3b268ace7 Xie Yongji 2021-02-23 444 return NULL; 97cdf3b268ace7 Xie Yongji 2021-02-23 445 97cdf3b268ace7 Xie Yongji 2021-02-23 446 domain->iotlb = vhost_iotlb_alloc(0, 0); 97cdf3b268ace7 Xie Yongji 2021-02-23 447 if (!domain->iotlb) 97cdf3b268ace7 Xie Yongji 2021-02-23 448 goto err_iotlb; 97cdf3b268ace7 Xie Yongji 2021-02-23 449 97cdf3b268ace7 Xie Yongji 2021-02-23 450 domain->iova_limit = iova_limit; 97cdf3b268ace7 Xie Yongji 2021-02-23 451 domain->bounce_size = PAGE_ALIGN(bounce_size); 97cdf3b268ace7 Xie Yongji 2021-02-23 @452 domain->bounce_pages = vzalloc(bounce_pfns * sizeof(struct page *)); 97cdf3b268ace7 Xie Yongji 2021-02-23 453 if (!domain->bounce_pages) 97cdf3b268ace7 Xie Yongji 2021-02-23 454 goto err_page; 97cdf3b268ace7 Xie Yongji 2021-02-23 455 97cdf3b268ace7 Xie Yongji 2021-02-23 456 file = anon_inode_getfile("[vduse-domain]", &vduse_domain_fops, 97cdf3b268ace7 Xie Yongji 2021-02-23 457 domain, O_RDWR); 97cdf3b268ace7 Xie Yongji 2021-02-23 458 if (IS_ERR(file)) 97cdf3b268ace7 Xie Yongji 2021-02-23 459 goto err_file; 97cdf3b268ace7 Xie Yongji 2021-02-23 460 97cdf3b268ace7 Xie Yongji 2021-02-23 461 domain->file = file; 97cdf3b268ace7 Xie Yongji 2021-02-23 462 spin_lock_init(&domain->iotlb_lock); 97cdf3b268ace7 Xie Yongji 2021-02-23 463 init_iova_domain(&domain->stream_iovad, 97cdf3b268ace7 Xie Yongji 2021-02-23 464 IOVA_ALLOC_SIZE, IOVA_START_PFN); 97cdf3b268ace7 Xie Yongji 2021-02-23 465 init_iova_domain(&domain->consistent_iovad, 97cdf3b268ace7 Xie Yongji 2021-02-23 466 PAGE_SIZE, bounce_pfns); 97cdf3b268ace7 Xie Yongji 2021-02-23 467 97cdf3b268ace7 Xie Yongji 2021-02-23 468 return domain; 97cdf3b268ace7 Xie Yongji 2021-02-23 469 err_file: 97cdf3b268ace7 Xie Yongji 2021-02-23 470 vfree(domain->bounce_pages); 97cdf3b268ace7 Xie Yongji 2021-02-23 471 err_page: 97cdf3b268ace7 Xie Yongji 2021-02-23 472 vhost_iotlb_free(domain->iotlb); 97cdf3b268ace7 Xie Yongji 2021-02-23 473 err_iotlb: 97cdf3b268ace7 Xie Yongji 2021-02-23 474 kfree(domain); 97cdf3b268ace7 Xie Yongji 2021-02-23 475 return NULL; 97cdf3b268ace7 Xie Yongji 2021-02-23 476 } 97cdf3b268ace7 Xie Yongji 2021-02-23 477 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org