lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] KVMM: Memory and interface related changes
Hi Anastassios,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.7-rc6]
[cannot apply to kvm/linux-next kvmarm/next tip/x86/core next-20200515]
[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/Anastassios-Nanos/Expose-KVM-API-to-Linux-Kernel/20200518-150402
base: b9bbe6ed63b2b9f2c9ee5cbd0f2c946a2723f4ce
config: i386-randconfig-a016-20200518 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

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

All errors (new ones prefixed by >>, old ones prefixed by <<):

arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'hva_to_pfn_slow':
>> arch/x86/kvm/../../../virt/kvm/kvm_main.c:1837:4: error: 'npages_local' undeclared (first use in this function)
npages_local = 1;
^
arch/x86/kvm/../../../virt/kvm/kvm_main.c:1837:4: note: each undeclared identifier is reported only once for each function it appears in

vim +/npages_local +1837 arch/x86/kvm/../../../virt/kvm/kvm_main.c

1800
1801 /*
1802 * The slow path to get the pfn of the specified host virtual address,
1803 * 1 indicates success, -errno is returned if error is detected.
1804 */
1805 static int hva_to_pfn_slow(unsigned long addr, bool *async, bool write_fault,
1806 bool *writable, kvm_pfn_t *pfn)
1807 {
1808 unsigned int flags = FOLL_HWPOISON;
1809 struct page *page;
1810 int npages = 0;
1811
1812 might_sleep();
1813
1814 if (writable)
1815 *writable = write_fault;
1816
1817 if (write_fault)
1818 flags |= FOLL_WRITE;
1819 if (async)
1820 flags |= FOLL_NOWAIT;
1821
1822 if (kvmm_valid_addr(addr)) {
1823 npages = 1;
1824 page = vmalloc_to_page((void *)addr);
1825 } else {
1826 npages = get_user_pages_unlocked(addr, 1, &page, flags);
1827 }
1828 if (npages != 1)
1829 return npages;
1830
1831 /* map read fault as writable if possible */
1832 if (unlikely(!write_fault) && writable) {
1833 struct page *wpage;
1834 int lnpages = 0;
1835
1836 if (kvmm_valid_addr(addr)) {
> 1837 npages_local = 1;
1838 wpage = vmalloc_to_page((void *)addr);
1839 } else {
1840 lnpages = __get_user_pages_fast(addr, 1, 1, &wpage);
1841 }
1842
1843 if (lnpages == 1) {
1844 *writable = true;
1845 put_page(page);
1846 page = wpage;
1847 }
1848 }
1849 *pfn = page_to_pfn(page);
1850 return npages;
1851 }
1852

---
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-05-18 11:15    [W:3.286 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site