[arm-platforms:kvm/protected-memory 15/16] arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2184:9: error: implicit declaration of function 'ioremap_cache_force'; did you mean
kernel test robot
lkp at intel.com
Wed Sep 16 22:52:01 EDT 2020
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm/protected-memory
head: d9455e6eabef4b9be5f33c418a8046e0389edade
commit: 7e178d6590c1e43e5df2d65490a273d030798d3b [15/16] KVM: Handle protected memory in __kvm_map_gfn()/__kvm_unmap_gfn()
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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
git checkout 7e178d6590c1e43e5df2d65490a273d030798d3b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All error/warnings (new ones prefixed by >>):
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'hva_to_pfn_slow':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1864:26: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
1864 | down_read(¤t->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1867:25: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
1867 | up_read(¤t->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1872:24: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
1872 | up_read(¤t->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function '__kvm_map_gfn':
>> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2184:9: error: implicit declaration of function 'ioremap_cache_force'; did you mean 'ioremap_cache'? [-Werror=implicit-function-declaration]
2184 | hva = ioremap_cache_force(pfn_to_hpa(pfn), PAGE_SIZE);
| ^~~~~~~~~~~~~~~~~~~
| ioremap_cache
>> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2184:7: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2184 | hva = ioremap_cache_force(pfn_to_hpa(pfn), PAGE_SIZE);
| ^
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'map_page_atomic':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2360:2: error: implicit declaration of function 'set_pte'; did you mean 'set_tb'? [-Werror=implicit-function-declaration]
2360 | set_pte(pte, mk_pte(page, PAGE_KERNEL));
| ^~~~~~~
| set_tb
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'unmap_page_atomic':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2368:2: error: implicit declaration of function '__flush_tlb_one_kernel'; did you mean '__flush_tlb_pending'? [-Werror=implicit-function-declaration]
2368 | __flush_tlb_one_kernel((unsigned long)vaddr);
| ^~~~~~~~~~~~~~~~~~~~~~
| __flush_tlb_pending
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'protect_memory':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2801:31: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
2801 | if (down_write_killable(&mm->mmap_sem))
| ^~~~~~~~
| mmap_base
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2855:16: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
2855 | up_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
cc1: some warnings being treated as errors
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=7e178d6590c1e43e5df2d65490a273d030798d3b
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms kvm/protected-memory
git checkout 7e178d6590c1e43e5df2d65490a273d030798d3b
vim +2184 arch/powerpc/kvm/../../../virt/kvm/kvm_main.c
2149
2150 static int __kvm_map_gfn(struct kvm_memslots *slots, gfn_t gfn,
2151 struct kvm_host_map *map,
2152 struct gfn_to_pfn_cache *cache,
2153 bool atomic)
2154 {
2155 kvm_pfn_t pfn;
2156 void *hva = NULL;
2157 struct page *page = KVM_UNMAPPED_PAGE;
2158 struct kvm_memory_slot *slot = __gfn_to_memslot(slots, gfn);
2159 bool protected = false;
2160 u64 gen = slots->generation;
2161
2162 if (!map)
2163 return -EINVAL;
2164
2165 if (cache) {
2166 if (!cache->pfn || cache->gfn != gfn ||
2167 cache->generation != gen) {
2168 if (atomic)
2169 return -EAGAIN;
2170 kvm_cache_gfn_to_pfn(slot, gfn, cache, gen);
2171 }
2172 pfn = cache->pfn;
2173 } else {
2174 if (atomic)
2175 return -EAGAIN;
2176 pfn = gfn_to_pfn_memslot_protected(slot, gfn, &protected);
2177 }
2178 if (is_error_noslot_pfn(pfn))
2179 return -EINVAL;
2180
2181 if (protected) {
2182 if (atomic)
2183 return -EAGAIN;
> 2184 hva = ioremap_cache_force(pfn_to_hpa(pfn), PAGE_SIZE);
2185 } else if (pfn_valid(pfn)) {
2186 page = pfn_to_page(pfn);
2187 if (atomic)
2188 hva = kmap_atomic(page);
2189 else
2190 hva = kmap(page);
2191 #ifdef CONFIG_HAS_IOMEM
2192 } else if (!atomic) {
2193 hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
2194 } else {
2195 return -EINVAL;
2196 #endif
2197 }
2198
2199 if (!hva)
2200 return -EFAULT;
2201
2202 map->page = page;
2203 map->hva = hva;
2204 map->pfn = pfn;
2205 map->gfn = gfn;
2206 map->protected = protected;
2207
2208 return 0;
2209 }
2210
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 70419 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200917/786d777e/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list