kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: weiqi <weiqi4@huawei.com>
Cc: kbuild-all@lists.01.org, alexander.h.duyck@linux.intel.com,
	alex.williamson@redhat.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, pbonzini@redhat.com,
	x86@kernel.org, wei qi <weiqi4@huawei.com>
Subject: Re: [PATCH 2/2] KVM: add support for page hinting
Date: Tue, 18 Feb 2020 19:45:46 +0800	[thread overview]
Message-ID: <202002181951.gpLa20LD%lkp@intel.com> (raw)
In-Reply-To: <1578408399-20092-3-git-send-email-weiqi4@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 3281 bytes --]

Hi weiqi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on kvm/linux-next]
[also build test ERROR on vfio/next vhost/linux-next]
[cannot apply to v5.6-rc2 next-20200217]
[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/weiqi/page-hinting-add-passthrough-support/20200108-152941
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   ld: arch/x86/kvm/x86.o: in function `kvm_vfio_ummap_range':
>> arch/x86/kvm/x86.c:4880: undefined reference to `vfio_dma_find'
>> ld: arch/x86/kvm/x86.c:4889: undefined reference to `vfio_munmap_pages'
   ld: arch/x86/kvm/mmu/mmu.o: in function `kvm_vfio_mmap_range':
>> arch/x86/kvm/mmu/mmu.c:4302: undefined reference to `vfio_dma_find'
>> ld: arch/x86/kvm/mmu/mmu.c:4321: undefined reference to `vfio_mmap_pages'

vim +4880 arch/x86/kvm/x86.c

  4838	
  4839	#include <linux/vfio.h>
  4840	static void kvm_vfio_ummap_range(struct kvm *kvm, struct kvm_device *tmp,
  4841					gfn_t gfn, int npages, unsigned long hva)
  4842	{
  4843		struct kvm_vfio *kv = tmp->private;
  4844		struct kvm_vfio_group *kvg;
  4845	
  4846		list_for_each_entry(kvg, &kv->group_list, node) {
  4847			struct vfio_group *group = kvg->vfio_group;
  4848			struct vfio_device *it, *device = NULL;
  4849	
  4850			list_for_each_entry(it, &group->device_list, group_next) {
  4851				unsigned long page_size, page_size_base;
  4852				unsigned long addr;
  4853				int size;
  4854				unsigned long old_pfn = 0;
  4855				int ret = 0;
  4856				size_t unmapped = npages;
  4857				gfn_t iova_gfn = gfn;
  4858				unsigned long iova_hva = hva;
  4859	
  4860				device = it;
  4861				while (unmapped) {
  4862					addr = gfn_to_hva(kvm, iova_gfn);
  4863					page_size_base = page_size =
  4864							kvm_host_page_size(kvm,
  4865							iova_gfn);
  4866	
  4867					if (addr != iova_hva)
  4868						return;
  4869	
  4870					while ((iova_gfn << PAGE_SHIFT) &
  4871						(page_size - 1))
  4872						page_size >>= 1;
  4873	
  4874					while (addr & (page_size - 1))
  4875						page_size >>= 1;
  4876	
  4877					if (page_size_base != page_size)
  4878						return;
  4879	
> 4880					size = vfio_dma_find(device->dev, iova_gfn,
  4881							page_size >> PAGE_SHIFT,
  4882							&old_pfn);
  4883					if (!size)
  4884						return;
  4885	
  4886					if (!old_pfn)
  4887						return;
  4888	
> 4889					ret = vfio_munmap_pages(device->dev,
  4890							iova_gfn, page_size);
  4891					unmapped -= page_size >> PAGE_SHIFT;
  4892					iova_hva += page_size;
  4893					iova_gfn += page_size >> PAGE_SHIFT;
  4894				}
  4895			}
  4896		}
  4897	}
  4898	

---
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: 28600 bytes --]

  reply	other threads:[~2020-02-18 11:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 14:46 [PATCH 0/2] page hinting add passthrough support weiqi
2020-01-07 14:46 ` [PATCH 1/2] vfio: add mmap/munmap API for page hinting weiqi
2020-01-07 15:22   ` Alex Williamson
2020-01-10 18:10   ` kbuild test robot
2020-01-10 18:10   ` [RFC PATCH] vfio: vfio_iommu_iova_to_phys() can be static kbuild test robot
2020-01-07 14:46 ` [PATCH 2/2] KVM: add support for page hinting weiqi
2020-02-18 11:45   ` kbuild test robot [this message]
2020-01-07 16:37 ` [PATCH 0/2] page hinting add passthrough support Alexander Duyck

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=202002181951.gpLa20LD%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=weiqi4@huawei.com \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).