tree:
git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
arm64-ro-page-tables-pkvm
head: 013c3cfada2933235858e3db49db939379e7003f
commit: 013c3cfada2933235858e3db49db939379e7003f [63/63] mm: HACK provide target address
when migrating a PMD entry
config: powerpc64-randconfig-r005-20210309 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
820f508b08d7c94b2dd7847e9710d2bc36d3dd45)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id...
git remote add ardb
git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm64-ro-page-tables-pkvm
git checkout 013c3cfada2933235858e3db49db939379e7003f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> mm/huge_memory.c:2031:48: error: incompatible pointer types
passing 'pgtable_t' (aka 'pte_t *') to parameter of type 'struct page
*' [-Werror,-Wincompatible-pointer-types]
set_pmd_at(mm, haddr, pmd,
__pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
^~~~~~~
arch/powerpc/include/asm/pgtable-be-types.h:24:41: note: expanded from macro
'__pmd'
#define __pmd(x) ((pmd_t) { cpu_to_be64(x) })
^
include/uapi/linux/byteorder/big_endian.h:37:51: note: expanded from macro
'__cpu_to_be64'
#define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
^
arch/powerpc/include/asm/io.h:938:53: note: passing argument to parameter
'page' here
static inline phys_addr_t page_to_phys(struct page *page)
^
mm/huge_memory.c:2031:59: error: use of undeclared identifier 'PMD_TYPE_TABLE'
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
^
mm/huge_memory.c:2198:48: error: incompatible pointer types passing 'pgtable_t'
(aka 'pte_t *') to parameter of type 'struct page *'
[-Werror,-Wincompatible-pointer-types]
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
^~~~~~~
arch/powerpc/include/asm/pgtable-be-types.h:24:41: note: expanded from macro
'__pmd'
#define __pmd(x) ((pmd_t) { cpu_to_be64(x) })
^
include/uapi/linux/byteorder/big_endian.h:37:51: note: expanded from macro
'__cpu_to_be64'
#define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
^
arch/powerpc/include/asm/io.h:938:53: note: passing argument to parameter
'page' here
static inline phys_addr_t page_to_phys(struct page *page)
^
mm/huge_memory.c:2198:59: error: use of undeclared identifier 'PMD_TYPE_TABLE'
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
^
4 errors generated.
vim +2031 mm/huge_memory.c
1998
1999 static void __split_huge_zero_page_pmd(struct vm_area_struct *vma,
2000 unsigned long haddr, pmd_t *pmd)
2001 {
2002 struct mm_struct *mm = vma->vm_mm;
2003 pgtable_t pgtable;
2004 pmd_t _pmd;
2005 int i;
2006
2007 /*
2008 * Leave pmd empty until pte is filled note that it is fine to delay
2009 * notification until mmu_notifier_invalidate_range_end() as we are
2010 * replacing a zero pmd write protected page with a zero pte write
2011 * protected page.
2012 *
2013 * See Documentation/vm/mmu_notifier.rst
2014 */
2015 pmdp_huge_clear_flush(vma, haddr, pmd);
2016
2017 pgtable = pgtable_trans_huge_withdraw(mm, pmd);
2018 pmd_populate(mm, &_pmd, pgtable);
2019
2020 for (i = 0; i < HPAGE_PMD_NR; i++, haddr += PAGE_SIZE) {
2021 pte_t *pte, entry;
2022 entry = pfn_pte(my_zero_pfn(haddr), vma->vm_page_prot);
2023 entry = pte_mkspecial(entry);
2024 pte = pte_offset_map(&_pmd, haddr);
2025 VM_BUG_ON(!pte_none(*pte));
2026 set_pte_at(mm, haddr, pte, entry);
2027 pte_unmap(pte);
2028 }
2029 smp_wmb(); /* make pte visible before pmd */
2030 //pmd_populate(mm, pmd, pgtable);
2031 set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) |
PMD_TYPE_TABLE));
2032 }
2033
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org