From: kernel test robot <lkp@intel.com>
To: Jay Zhou <jianjay.zhou@huawei.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: kbuild-all@lists.01.org, alex.williamson@redhat.com,
cohuck@redhat.com, maoming.maoming@huawei.com,
jianjay.zhou@huawei.com, weidong.huang@huawei.com
Subject: Re: [PATCH] vfio dma_map/unmap: optimized for hugetlbfs pages
Date: Tue, 21 Jul 2020 07:38:02 +0800 [thread overview]
Message-ID: <202007210706.UbJTakUg%lkp@intel.com> (raw)
In-Reply-To: <20200720082947.1770-1-jianjay.zhou@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 4305 bytes --]
Hi Jay,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on vfio/next]
[also build test ERROR on linux/master linus/master v5.8-rc6 next-20200720]
[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/Jay-Zhou/vfio-dma_map-unmap-optimized-for-hugetlbfs-pages/20200720-163157
base: https://github.com/awilliam/linux-vfio.git next
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/vfio/vfio_iommu_type1.c:522:52: error: 'HUGE_MAX_HSTATE' undeclared here (not in a function)
522 | struct vfio_hupetlbpage_info vfio_hugetlbpage_info[HUGE_MAX_HSTATE] = {
| ^~~~~~~~~~~~~~~
In file included from include/linux/mm.h:679,
from include/linux/scatterlist.h:8,
from include/linux/iommu.h:10,
from drivers/vfio/vfio_iommu_type1.c:27:
include/linux/huge_mm.h:319:25: error: braced-group within expression allowed only inside a function
319 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
| ^
drivers/vfio/vfio_iommu_type1.c:523:45: note: in expansion of macro 'HPAGE_PMD_SHIFT'
523 | {vfio_hugetlbpage_2M, PMD_SIZE, ~((1ULL << HPAGE_PMD_SHIFT) - 1)},
| ^~~~~~~~~~~~~~~
include/linux/huge_mm.h:323:25: error: braced-group within expression allowed only inside a function
323 | #define HPAGE_PUD_SHIFT ({ BUILD_BUG(); 0; })
| ^
drivers/vfio/vfio_iommu_type1.c:524:45: note: in expansion of macro 'HPAGE_PUD_SHIFT'
524 | {vfio_hugetlbpage_1G, PUD_SIZE, ~((1ULL << HPAGE_PUD_SHIFT) - 1)},
| ^~~~~~~~~~~~~~~
drivers/vfio/vfio_iommu_type1.c: In function 'hugetlb_is_last_page':
>> drivers/vfio/vfio_iommu_type1.c:554:81: warning: parameter 'type' set but not used [-Wunused-but-set-parameter]
554 | static bool hugetlb_is_last_page(unsigned long addr, enum vfio_hugetlbpage_type type)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
vim +/HUGE_MAX_HSTATE +522 drivers/vfio/vfio_iommu_type1.c
521
> 522 struct vfio_hupetlbpage_info vfio_hugetlbpage_info[HUGE_MAX_HSTATE] = {
523 {vfio_hugetlbpage_2M, PMD_SIZE, ~((1ULL << HPAGE_PMD_SHIFT) - 1)},
524 {vfio_hugetlbpage_1G, PUD_SIZE, ~((1ULL << HPAGE_PUD_SHIFT) - 1)},
525 };
526
527 static bool is_hugetlbpage(unsigned long pfn, enum vfio_hugetlbpage_type *type)
528 {
529 struct page *page = NULL;
530
531 if (!pfn_valid(pfn) || !type)
532 return false;
533
534 page = pfn_to_page(pfn);
535 /* only check for hugetlbfs pages */
536 if (!page || !PageHuge(page))
537 return false;
538
539 switch (compound_order(compound_head(page))) {
540 case PMD_ORDER:
541 *type = vfio_hugetlbpage_2M;
542 break;
543 case PUD_ORDER:
544 *type = vfio_hugetlbpage_1G;
545 break;
546 default:
547 return false;
548 }
549
550 return true;
551 }
552
553 /* Is the addr in the last page in hugetlbfs pages? */
> 554 static bool hugetlb_is_last_page(unsigned long addr, enum vfio_hugetlbpage_type type)
555 {
556 unsigned int num = 0;
557
558 num = hugetlb_get_resdual_pages(addr & ~(PAGE_SIZE - 1), type);
559
560 if (num == 1)
561 return true;
562 else
563 return false;
564 }
565
---
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: 74593 bytes --]
prev parent reply other threads:[~2020-07-20 23:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 8:29 Jay Zhou
2020-07-20 14:24 ` kernel test robot
2020-07-20 22:46 ` Alex Williamson
2020-07-21 13:28 ` Zhoujian (jay)
2020-08-13 6:11 ` 答复: " Maoming (maoming, Cloud Infrastructure Service Product Dept.)
2020-07-22 0:48 ` Peter Xu
2020-07-20 23:38 ` kernel test robot [this message]
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=202007210706.UbJTakUg%lkp@intel.com \
--to=lkp@intel.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=jianjay.zhou@huawei.com \
--cc=kbuild-all@lists.01.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maoming.maoming@huawei.com \
--cc=weidong.huang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®